How to debug panel crash on load?

Home Forums General Panels, Components, Macros How to debug panel crash on load?

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #118135
    shooking
    Blocked
      • Topics: 14
      • Replies: 60
      • Total: 74

      Hi all

      So I am trying to “export” my panel to others can use it.
      If I open it in my working directory then all is good.
      I dumbly put the panel into a zip and uploaded it to my sourceforge. When I pull the zip down, it fails.

      So I made a new local directory, copied my panel there. It wont start.
      Ah I have “resources” in it …so I copied these to the directory.
      Still crashes

      I dont see the C:\Program Files (x86)\Ctrlr\Ctrlr-x64.exe.crash file

      what’s a good way to debug this – I just want to be able to distribute my panel to get some feedback.

      Feeback from myself: Your panel dont work! (Yes it does .. ah I see!)

      3: UnhandledExceptionFilter + 0x1ea
      4: memset + 0x1b32
      5: _C_specific_handler + 0x96
      6: _chkstk + 0x11f
      7: RtlRaiseException + 0x399
      8: RtlRaiseException + 0x153
      9: RaiseException + 0x69
      10: CxxThrowException + 0xad
      15: is_exception_typeof + 0x1078
      16: RtlCaptureContext + 0x566
      27: BaseThreadInitThunk + 0x14
      28: RtlUserThreadStart + 0x21

      #118138
      shooking
      Blocked
        • Topics: 14
        • Replies: 60
        • Total: 74

        Interesting – if I run as admin

        3: UnhandledExceptionFilter + 0x1a0
        4: RtlCaptureStackContext + 0x197c8
        5: RtlGetAppContainerNamedObjectPath + 0xb4
        and complains about a 32 bit version 🙂

        It claims it wants to write the file to Ctrlr-Win32.exe.crash – which it doesnt.

        I tried to build from source by my VS2019 preview doesnt want to play nicely.
        I might try to fire up Linux.

        #118139
        shooking
        Blocked
          • Topics: 14
          • Replies: 60
          • Total: 74

          Dange . and then it DID flash up my panel and write out a crash dump

          C:\Program Files (x86)\Ctrlr>more Ctrlr-Win32.exe.crash
          Ctrlr crash at: 30 Apr 2020 17:26:35
          Stack trace:
          3: UnhandledExceptionFilter + 0x1a0
          4: RtlCaptureStackContext + 0x197c8
          5: RtlGetAppContainerNamedObjectPath + 0xb4

          which is what the GUI popped up.
          so some object path error?

          #118140
          shooking
          Blocked
            • Topics: 14
            • Replies: 60
            • Total: 74

            ok I found Ctrlr caches stuff in my AppData/Roaming/Ctrlr

            But still crash – original panel loads ok.
            Any hints on how to successfully expert?

            I did see Export but this doesnt seem to help.
            I tried exporting XNL, “exe” which produces a bzpanel … I left names same … crash.

            #118198
            shooking
            Blocked
              • Topics: 14
              • Replies: 60
              • Total: 74

              ok so I _think_ I found either a bug or at least a regression in 6.x v 5.x

              SHORT VERSION

              I can load my panel even with logic error into 5.x but not into 6.x.
              Is this some sort of regression???

              LONGER VERSION

              I am still to stupid to work out how to build the latest source from git.
              But I found my VM that I used to build RPi from (with the cross compiler).
              And of course this has an older G++ on it, so I hacked similar makefile changes, and convinced Linux to build debug version base on a 5.x codebase.

              Long and the short of it – I stupidly edited the panel XML to remove path from the various directories.
              I didnt want f:\Interests\Synths\K1r all over the place … well Atom already knows how that’s gonna work out!!

              So in 5.x I could debug on Linux. And with one panel it complains about assertion in Juce code. BUT crucially it loads. A bit of a bug – it dont like my f:\ … but it wont let me change it .. so I have to change that via vim and XML.

              On Windows I installed my old and new Ctrl in two separate directories.
              You have to be careful about the ~/AppData/Roaming … and 5.x will load my modified panel (where I create a path f:\temp\Ctrlr in front of all resources/panel).
              Linux complains about this f:\ and wont let me edit it.

              Let me give a concrete example:

              Fixed thanks to my debugging and working in 5.x
              shooking@MUSICPC /cygdrive/f/temp/Ctrlr
              $ grep “F:” MyMultiPanel000.panel
              luaPanelOSCReceived=”– None” panelFilePath=”F:\temp\Ctrlr\MyMultiPanel000.panel”
              resourceSize=”1049″ resourceFile=”backdrop_texture.jpg” resourceSourceFile=”F:\temp\Ctrlr\backdrop_texture.jpg”
              resourceSize=”32270″ resourceFile=”K1rCardImage_crop.jpg” resourceSourceFile=”F:\temp\Ctrlr\K1rCardImage_crop.jpg”
              resourceSize=”341672″ resourceFile=”k1r_fader.png” resourceSourceFile=”F:\temp\Ctrlr\k1r_fader.png”
              resourceSize=”288674″ resourceFile=”64×64.png” resourceSourceFile=”F:\temp\Ctrlr\64×64.png”
              resourceSourceFile=”F:\temp\Ctrlr\bidirect_64x64.png”
              uiFileListFileDoubleClicked=”loadSysexFromDisk” uiFileListCurrentRoot=”F:\temp\Ctrlr”

              before you can imagine I removed the f:\temnp\Ctrlr and hoped Ctrlr would look in .\

              I attach pictures from the debug on 5.x

              If I could work out how to build on 6.x I am confident I can be a useful resource to the community.

              In the meantime I think I will recommend to anyone wanting to use my panel to use 5.x Ctrlr since 6.x is not playing as nice as I would like

              Attachments:
              You must be logged in to view attached files.
              #118202
              goodweather
              Participant
                • Topics: 45
                • Replies: 550
                • Total: 595
                • ★★★

                Interesting to see you doing questions and answers 😉
                I also think you are mixing a lot of things and maybe making things even more complicated than they are.
                Let’s split the problem(s) in pieces…

                1. Only use 5.3.201 (Windows) or 5.3.198 (MacOS). They are stable and the ones to use when building panels.
                Building the complete Ctrlr from source files is another story that I have never bothered because at the moment I don’t have the need for but you may of course have some. Unfortunately I cannot help you with that.

                2. Ctrlr crashing.
                I don’t know what the messages means. I’m sometime getting an unexpected crash (even in stable version) when I’m clicking on a modulator that I want to edit. I’m doing VERY frequent saves so it doesn’t hurt my work and hopefully it doesn’t happen often.

                3. Ctrlr crashing when opening a panel
                In that case there is a problem with your panel. You need to do 2 things: secure that Ctrlr can run again then remove the issue from your panel.

                To secure that Ctrlr can run again, you indeed need to go to the cache directory in AppData/Roaming/Ctrlr.
                Make a backup of the file Ctrlr.settings into Ctrlr – Backup.settings (in case of).
                Copy the file Ctrlr.settings into Ctrlr – Empty.settings
                Edit that file with Notepad++ and remove all data between ““. This will remove the last panel loaded. Save your Ctrlr – Empty.settings file
                Replace the Ctrlr.settings file with a copy of the Ctrlr – Empty.settings file.
                Your Ctrlr program is now good to go.

                Cleaning your panel is another more tricky story and you should try to remember what you changed last before the last Save and the start of crashes.
                Usually issues are coming from modulators having the same name.
                You need to search in the .panel file that you edit with Notepad++ and that you can correct like that.
                If you don’t find things, then one way to proceed is to remove modulators by chunks until your panel can restart correctly. By reducing the size of the things you remove,you will identify the culprit modulator.
                Very easy to do with an editor: delete a chunk, save, test in Ctrlr, undo delete, do another delete, save, test in Ctrlr,…

                Good luck!

                #118213
                shooking
                Blocked
                  • Topics: 14
                  • Replies: 60
                  • Total: 74

                  I tend to do that (talk to myself) – trouble of having an Autistic brain 🙁

                  Somehow I found a 6.x build and “assumed” that oh the main page must just be out of date. Thanks for confirming I should be using a 5.x Ctrlr.

                  I accept that my issue was mostly due to me “hardcore” editing the XML – 5.x handles this better than 6.x.
                  I had seen a number of posts with similar issue – Crash but no debug strategy – that’s why I built to debug at lowest level and this lead me to realise “ah … Ctrlr expects path in a certain format” – which I had hacked [[did I mention my day job is uncovering insecure assumptions that dev’s make?]].

                  In this case, it does seem that there is an issue even in 5.x.
                  My F:\temp causes assertion failure on Linux – Linux then does not allow me to edit that “invalid” entry (short of vim the panel with all the issues that hit).

                  Simply to say in breaking my panel I learnt a lot more about Ctrlr – and I seems my RPi build is still ok for me to use since it is based on the latest stable codebase – thanks for helping to confirm that.

                  Now to check I can release my panel under 5.x and “ship it”.

                  Thanks again
                  Steve

                  #118214
                  goodweather
                  Participant
                    • Topics: 45
                    • Replies: 550
                    • Total: 595
                    • ★★★

                    Hahaha! I understand now the job influence 😉

                  Viewing 8 posts - 1 through 8 (of 8 total)
                  • The forum ‘Panels, Components, Macros’ is closed to new topics and replies.
                  There is currently 0 users and 71 guests online
                  No users are currently active
                  Forum Statistics
                  Threads: 2,495, Posts: 17,374, Members: 77,605
                  Most users ever online was 12 on January 22, 2019 3:47 pm
                  Ctrlr