Navigation

    Fuze Arena Logo
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Help
    • Discord

    Fuze software crashing, unexpectedly.

    Help
    4
    10
    391
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • _
      _JKDOS F last edited by

      My program is wrapped inside a conditional loop, and outside that loop I have a menu screen. With it, I have "Press (B) to quit". If (B) is pressed, a boolean condition is set so that the main loop is never executed. When running the program, pressing (B) on the menu screen will crash Fuze and go back to the Nintendo Switch home screen. Seems Fuze is not happy about skipping the main loop.

      Condensed Example

      menu = true
      leave = false
      
      // menu
      while menu loop
          joy = controls(0)
          // other commands
          // ....
          // ...
          if joy.a then
              menu  = !menu
          endif
          if joy.b then
              leave = !leave
              menu  = !menu
          endif
      repeat
      
      //main loop
      while !leave loop
          // main program code
      repeat
      
      1 Reply Last reply Reply Quote 0
      • _
        _JKDOS F last edited by

        May be related to this: https://fuzearena.com/forum/topic/165/timers-produce-wired-errors-and-also-some-fuze-crashes/2

        1 Reply Last reply Reply Quote 0
        • Dave
          Dave Fuze Team last edited by

          Hi @_JKDOS

          I've just tried this same program and I'm not getting a crash.

          I tried it exactly as you've written above and also with a clear() and update() in the menu loop. Neither give me a crash.

          If I could request, could you add me as a friend please and share the program in question. Please let me know the name of the program too.
          Friend code: SW-5139-4176-1902

          _ 1 Reply Last reply Reply Quote 0
          • _
            _JKDOS F @Dave last edited by _JKDOS

            @Dave Try this 2019-09-10.jpg

            The "You pressed B" loop isn't needed, but I added it just to show the the program is crashing when it reaches the end of the main sub (Line 34).

            1 Reply Last reply Reply Quote 0
            • Dave
              Dave Fuze Team last edited by

              Just got home dude and I'll be out for a short walk for a little bit but will be trying this later!

              _ 1 Reply Last reply Reply Quote 0
              • _
                _JKDOS F @Dave last edited by

                @Dave Thanks. I'll be heading to the gym after I get off work. So no hurry.

                1 Reply Last reply Reply Quote 0
                • Martin
                  Martin Fuze Team last edited by Martin

                  It's related to the timer, or should I say, I suspect it's related to the timer. The top one doesn't crash the bottom one does. Comment out the timer from the bottom one and it too doesn't crash.

                  I thought that perhaps the timer needed to be stopped before exiting the loop but that didn't help.

                  1 Reply Last reply Reply Quote 0
                  • Discostew
                    Discostew F last edited by

                    Is there a reason for the SetTimer function to have "-1" set for the counter?

                    _ 1 Reply Last reply Reply Quote 0
                    • _
                      _JKDOS F @Discostew last edited by

                      @Discostew said in Fuze software crashing, unexpectedly.:

                      Is there a reason for the SetTimer function to have "-1" set for the counter?

                      It makes the timer have unlimited repetitions. Extremely useful unless you only want your timer to run a specific number of times. That being said, it being -1 makes no difference in this.

                      It seems once you set a timer, programs are not allowed to finish without crashing. I'll have to wait for Fuze to patch that.

                      Discostew 1 Reply Last reply Reply Quote 1
                      • Discostew
                        Discostew F @_JKDOS last edited by

                        @_JKDOS Unlimited repetitions? I did not know that. Hopefully it isn't just converted to an unsigned number internally (which in this case would be the maximum value of 4,294,967,295 if UINT32), as that would mean in time it would stop.

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post