cocos-engine icon indicating copy to clipboard operation
cocos-engine copied to clipboard

double se::Value::toDouble() const: assertion "_type == Type::Number || _type == Type::Boolean || _type == Type::BigInt || _type == Type::String" failed

Open GamewolfLongMan opened this issue 1 year ago • 4 comments

Cocos Creator version

3.8.2

System information

android

Issue description

C:/ProgramData/cocos/editors/Creator/3.8.2/resources/resources/3d/engine/native/cocos/bindings/jswrapper/Value.cpp:451: double se::Value::toDouble() const: assertion "_type == Type::Number || _type == Type::Boolean || _type == Type::BigInt || _type == Type::String" failed get error afte assetManager.loadBundle

Relevant error log output

擷取

Steps to reproduce

some asset get this error some not . I dont know why

Minimal reproduction project

No response

GamewolfLongMan avatar May 20 '24 06:05 GamewolfLongMan

Encountered the same problem.

smallmain avatar May 20 '24 09:05 smallmain

I found the problem was that the data of a certain prefab was corrupted:

    "_lpos": {
      "__type__": "cc.Vec3",
      "x": 0,
      "y": 160,
      "z": 0
    },
    "_lrot": {
      "__type__": "cc.Quat",
      "x": null,
      "y": null,
      "z": null,
      "w": null
    },
    "_lscale": {
      "__type__": "cc.Vec3",
      "x": 1,
      "y": 1,
      "z": 0
    },

_lrot is null, but i don't know why this is happening. The only rotation-related operation I performed on this node was this.node.setWorldRotation(Quat.IDENTITY);

Error data should not be serialized:

  • Verify before storing.
  • Also related to this proposal: https://github.com/cocos/cocos-engine/issues/15941

After this problem occurs, it is very difficult to debug, and it will be fine without loading. It is a time bomb.

smallmain avatar May 21 '24 01:05 smallmain

This is not the only one prefab with this problem. one day some prefab get broken and I dont know why

GamewolfLongMan avatar May 21 '24 05:05 GamewolfLongMan

It's possible the same issue which was fixed at https://github.com/cocos/cocos-engine/pull/16935 You could try to customize the engine , rebuild the engine and see whether it still exists.

dumganhar avatar May 22 '24 03:05 dumganhar