Unable to run IOS build on simulator for cocos creator

Hi,
My build works well in browser and on fb instant as well.
But while trying to create the same build for IOS it fails with
Assertion failed: (_type == Type::Number || _type == Type::Boolean || _type == Type::BigInt || _type == Type::String), function toDouble, file Value.cpp, line 450.

If i use the node which was taken from the repo then im getting this issue
But if i remove everything and create the same node with same properties and animation clips in mac it works fine.

The project was originally created and published using windows. If switching from windows to mac creates some issue please help me out for that

Attaching screenshot FYR.

We will need the call stack, you can break at the crash point using a debug build. Don’t stop the program, you will see the call stack in the middle bar (between code editor and console)

The error shows that you are converting an illegal typed parameter to double, need to find out which function is being called to know what’s the issue

From the log and discussion provided in Discord, it may be related to the reuse of destroyed Node, can you share the logic of scene switching and persistent node setup

After my login, i use

director.addPersistRootNode(this.node);
director.loadScene(“Game”);

Here’s a test project which you can use.
Test.zip

I attached a breakpoint for exception thrown for objective C.
Here’s what I get:
Exception NSException * “data parameter is nil” 0x00006000013f56e0

The same code works fine on editor or browser. But fails on IOS simulator.

On continuing the execution it crashes.

@sarvagya62 the engine version is v3.7.2, right?

Yes it is 3.7.2

Ok, i will take a look.

@sarvagya62 which scene did you test? Game or LoadingScene?

Loading scene

Got it, thanks.

@sarvagya62 the reason is that, the value of ArenaPopup._lrot in Game.scene is error. The value is

"_lrot": {
      "__type__": "cc.Quat",
      "x": null,
      "y": null,
      "z": null,
      "w": null
    },

As you can see, the value of x, y, z, w is null. null is not a valid value. I don’t know why the values are invalid. It is an issue of editor. I synchronized the information to my colleague, he will continue to look into it.

As for arena popup. The node is disabled and it’s scale is x:0, y:0, and z:0
The values of the scale are changed using animation graph.

How can it be rectified?

Also, if you create the arena popup node as it is in this scene again from scratch then it doesn’t give this error.
But if i copy this node from another scene then im getting this error.

I just tried changing these null value to the below one’s and it works.
But i think the animation graph might not work if I change these
“_lrot”: {
type”: “cc.Quat”,
“x”: 0,
“y”: 0,
“z”: 0,
“w”: 1
},

Yep, i think it is an issue of editor. My colleague is looking into it.

I don’t see the animation graph resource in the project you provided, have you edited the animation for the node that has the problem when you have an anomaly in the data?
This problem is reported first time.We will add type check in later version to avoid it.But it’s better to know how it happened.

Animation graph is not the issue.

How it happened?
I created an empty project on my windows system and implemented everything, even published the same on FB instant games without any issues.

When I used the same code on MAC to create an IOS build without any changes, it started giving me this error.

Also, when I tried upgrading the editor to 3.8.0, the IOS build failed in the editor and gave me an error stating Please check if Xcode is installed. Whereas, didn’t face any of these issues with 3.7.2.

As of now for IOS, I just tried changing these null value to the below one’s and it works for all the possible null places in my Game scene.
“_lrot”: {
“type”: “cc.Quat”,
“x”: 0,
“y”: 0,
“z”: 0,
“w”: 1
}

The thing is that the same code base should work on any environment irrespective of OS.
I checked for the Game scene in my windows as well and I’m having null values there as well in lrot.