Understanding C3 Crashes (R23)

0 favourites
  • 6 posts
From the Asset Store
Minimalist Crash Balls is a game where the goal is to hit the ball on the portal, with 20 different levels :)
  • Hi all,

    I've been trying to import my main C2 project in C3 and it seems to import but then crashes. I'll post the log below. My main question is how can I find out what is causing the crash. It could be a single malformed line in my project but there doesn't seem to be anything I can use to find it (eg a line number, etc)

    the explanation doesn't seem to make sense to me as the first parameter of tokenat should be a string.

    So this is not a bug, but asking for some help on how to debug a crash in C3. At the moment it seems to be undoable.

    R

    -----------------

    Error report information

    Type: unhandled rejection

    Reason: Invalid parameter: 'tokenat' parameter 1 does not take 'string'

    Construct 3 version: r23

    URL: https://editor.construct.net/

    Date: Sun Apr 30 2017 22:41:18 GMT+0100 (GMT Daylight Time)

    Uptime: 65.6 s

    Platform information

    Browser: Chrome

    Browser version: 57.0.2987.133

    Browser engine: Blink

    Browser architecture: 64-bit

    Context: browser

    Operating system: Windows

    Operating system version: 10

    Operating system architecture: 64-bit

    Device type: desktop

    Device pixel ratio: 1

    Logical CPU cores: 4

    User agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36

    WebGL information

    Version string: WebGL 2.0 (OpenGL ES 3.0 Chromium)

    Numeric version: 2

    Supports NPOT textures: yes

    Vendor: Google Inc.

    Renderer: ANGLE (Intel(R) HD Graphics 4000 Direct3D11 vs_5_0 ps_5_0)

    Major performance caveat: no

    Maximum texture size: 16384

    Point size range: 1 to 1024

    Extensions: EXT_color_buffer_float, EXT_disjoint_timer_query_webgl2, EXT_texture_filter_anisotropic, OES_texture_float_linear, WEBGL_compressed_texture_s3tc, WEBGL_debug_renderer_info, WEBGL_debug_shaders, WEBGL_lose_context

  • How do you use the tokenat? The usual usage is

    tokenat("string", X, "|")
    [/code:2mm7l1ft] The paramenters are 0 based so
    
    "string" - the string you want to read the token out of
    X - The number that defines the position of the token <-- This is where it complains to get a string instead of a number
    "|" - seperator
    
    So if you search your event sheets in C2 for tokenat and review the lines do you find any errors? Else it is probably an import error.
  • I've seen in a couple of bug reports that there's a slight incompatibility between C2 and C3 in validating expressions. C2 actually allows some invalid expressions; C3 correctly rejects them, but then this causes problems opening projects that happen to use these invalid expressions.

    I think one case is using a global number variable, and putting it in an expression that expects a string. So for example you might have done something like tokenat(NumberVariable, 0, ","). It's invalid to use a number variable for the string parameter, but due to an oversight C2 lets you get away with that. It's not something I'm keen to make C3 allow as well, since stricter error checking is better - that's a mistake that you probably want Construct to tell you about.

    So I'd review your project for all uses of 'tokenat' and make sure they're really valid.

  • Ashley

    I expect that you are right and that C2 is slightly more forgiving. It is the sort of thing i'd expect when going between interpreters.

    The problem is that i have 100's of tokenat statements in this existing project.

    So without going through every single tokenat, is there any way to identify where in the project this might be occuring? even just throwing out the line of text or the event that caused the crash would be helpful.

    R

  • Not right now I guess, I think I'll need to put better error checking in C3 to report where exactly it happened.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • it'd be appreciated as at the moment it crashes out and really is a blocker in moving my existing project

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