C3 crashing when infinite while loop

0 favourites
  • 8 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 :)
  • In the process of troubling shooting some code I mistakenly started on the wrong layout that initializes data for my while loop. So it went into an infinite loop... which then crashes my game preview AND the C3 editor and I lose my changes.

    In C2 this was never a problem, the worst that could happen is that Chrome would crash.

    Is there any plans to fix this? It's pretty bad to have the entire app crash when you make an error.

  • Enable worker mode. This makes the runtime run in its own thread separate to the editor, so if it hangs it can be stopped separately. At some point we'll make this the default.

  • Are you talking about when it crashes like it exits and it doesn't display an error message? I've been trying to reproduce those to report them but it's difficult to get an accurate test but this happens commonly if you close a debugger preview after you made some changes to the code while it is opened.

    And for anyone that doesn't know how to use worker mode just do this:

    1) Select your project folder

    2) Click on "view properties"

    3) You'll find it under the "ADVANCED" section >> "Use worker" tick box.

  • thank you Ashley and this fixed it, I just reproduced the crash.

    to make it crash, all I did was load a table in one Event Sheet (I used the CSV addon) and then I loop through the table on a different Event Sheet. Because the loop is looping until it finds something, it goes indefinitely because the table is empty since I accidentally started my Preview on the wrong EventSheet and not on the one where I load the table.

  • No worries but I think what I'm talking about is a different issue, and I'm still having trouble reproducing it exactly. Just that a lot of the time when I have the debugger running on the side while I make changes then close it, it will soft crash construct all together. Even with worker mode switch on for the layouts, it's still happening.

  • I used the CSV addon

    In C2 this was never a problem, the worst that could happen is that Chrome would crash.

    hi, you are probably using the plugin that i converted.

    if it works in C2runtime and crashes in C3runtime, there may be a problem with the plugin. if you send me a minimal project file, i can check it.

  • Eren yes I am using the one you converted.. but it's not the plug-in. It is my mistake.

    in ES Sheet 1 - I load the CSV

    in ES Sheet 2 - I loop through the CSV until I get 10 random names

    Sometimes when I hit "Preview" and it loads ES Sheet 2 without going into ES Sheet1. So it infinitely loops since the CSV is empty.

    thanks for being concerned though!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ashley, btw Gamepad doesn't trigger properly using Worker Mode. I can reproduce it in my project. However it won't reproduce in a small stand alone project which makes me think it's performance related since my project is large. Is Worker Mode sensitive to performance? more-so than non-worker mode?

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