Suddenly an error message

0 favourites
  • 6 posts
From the Asset Store
7 Errors
$15 USD
7 Errors is a game where you have to find the 7 mistakes before time runs out. Can you find all 7? Have fun looking.
  • Can someone tell me why?

    assertion failure: Calling expvalue.set_string without string type

  • How to report bug

    Without more context, or an eye on your code, no way to say why.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Kyatric I can't post a capx as it's my whole game ready to be published on the app store. It happened suddenly, for no apparent reason and happens only on a specific layout.

    It would be useful to know what kind of error it is instead of this popup that doesn't really help me.

    This is the whole thing: i.imgur.com/6a64I.png

    Ashley any idea where the problem could be?

  • The error is coming from the calljs plugin, hence cjs_plugin.js.

    The ReadExecutionReturn expression is not returning a string.

    I can replicate the error with two actions:

    CallJS| execute "0"

    Text | set text to CallJS.ReadExecutionReturn

    It's not a fatal since "0" is returned just fine. The assertion failure is also triggered when calling ReadExecutionReturn if js code with syntax errors is run.

    To eliminate the assert edit \CallJS\runtime.js and find ReadExecutionReturn which should look like this:

         exps.ReadExecutionReturn = function (ret)     
         {
              ret.set_string(this.returnValue);
         };

    and change it to this:

         exps.ReadExecutionReturn = function (ret)     
         {
              ret.set_string(String(this.returnValue));
         };
  • R0J0hound thank you, you are amazing. It appears that something changed in Chrome that returns this error, tomorrow I check everything and I'll let you know if I find out something. Meanwhile thanks.

  • It's a bug in the plugin. You are not allowed to call ret.set_string() with a non-string type - it will break the runtime. So set_string enforces this and shows that error if you pass it something which isn't a string. It's the plugin's responsibility to check the variable type and ensure it's always a string. (Just returning an empty string if it's not a string type is an easy way to handle it, for example)

    Tip: if you get an error like that, in Chrome's dev tools open preview_prelude.js and put a breakpoint in assert2 after the "if (!cnd)" line (meaning the assertion has failed). Then just before getting that error dialog Chrome will break in the debugger and you'll have the full call stack to browse and see what went wrong and what the variables are at the time of the call, etc.

    Closing as it's a third party plugin bug.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)