160 Dictionary Entries made with "Repeat" condition freezes C3 Editor and Preview. [SOLVED]

  • SOLVED: The Bug has nothing to do with the Repeat loop, I was just diving by 0 somewhere else and it caused the crash. Huge thank you to Kriand for finding my error!

    Just today I opened my Construct project and it suddenly started freezing the Chrome tab with construct 3 and the preview project whenever I try to preview it.

    I was using the beta release r118, then r119, now I've copied the whole code into a new file that is in release r111, but still chrome, standalone and firefox all freeze the editor and the preview window due to this condition.

    + System: Repeat 160 times

    + (no conditions)

    -----> Val: Add key "Bar"&loopindex+1&"Progress" with value 0

    -----> Val: Add key "Bar"&loopindex+1&"TotalFills" with value loopindex=0?1:0

    -----> Val: Add key "Bar"&loopindex+1&"Number" with value loopindex+1

    -----> Val: Add key "Bar"&loopindex+1&"Income" with value (loopindex+1)^2

    -----> Val: Add key "Bar"&loopindex+1&"Speed" with value 1

    -----> Val: Add key "Bar"&loopindex+1&"Width" with value 8+((loopindex)×1.8)

    -----> Val: Add key "Bar"&loopindex+1&"WidthRandomScale" with value loopindex=0?1:1+((loopindex)÷2)

    -----> Val: Add key "Bar"&loopindex+1&"WidthActual" with value 0

    The loop is part of a function to setup the dictionary entries that the game uses, and gets called once at the start of the game.

    I've already tried disabling and enabling different "Val" Additions (Val being a dictionary), and after removing "Speed" it worked, but now it again freezes.

    It doesnt freeze with repeat being on 1, everything above that and C3 and the Preview freeze.

    For the last 3 days everything was working fine, and I don't think I can really find a workaround for this essential component.

    Anyone have any idea what this may be?

    Edit: Added clarification that the loop gets called on once at the start of the layout.

  • When does the loop start? As you describe it, the loop would go through every tick. Or is this event under 'On Start of Layout'?

  • It is in a function that gets called once at the start of the game, with a bunch of other dictionary entries.

  • Just tested it with 'Repeat 1000 times' and adding some keys similar to yours. The preview is running fine. Maybe sharing your project can help to find a solution.

  • Now, after changing some of the code, and removing the loop, it still freezes C3. It was working fine an hour ago, and now its broken again.

    How do I share a project here? I don't see an option to attach a file.

  • You have to use cloud storage (Onedrive, Google Drive, Dropbox...) to share a file.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It first starts the Loader layout, and then after "SetupGame" it goes to the Game layout, and somewhere in the Loader layout it almost always freezes C3.

    Edit: the color and the moving square are to see that it freezes.

  • When i disable this action, it stops crashing. It is because SpeedRegulator is set to 0, so you want to divide a value by 0 which is infinit. Set SpeedRegulator to some other value.

  • Oh my god, thank you SO MUCH for finding that mistake! I'm SO happy that you found it.

    Thank you Kriand! :D

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