HISE Logo Forum
    • Categories
    • Register
    • Login

    Unzipping in the plugin crashing the browser

    Scheduled Pinned Locked Moved General Questions
    46 Posts 4 Posters 1.6k Views
    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.
    • d.healeyD
      d.healey @DanH
      last edited by

      @Lindon Follow the call stack

      c5c75ca7-5476-4fb9-8898-dcd977fe9bb8-image.png

      Click the line that mentions the extractZipFile function and see what's going on.

      Libre Wave - Freedom respecting instruments and effects
      My Patreon - HISE tutorials
      YouTube Channel - Public HISE tutorials

      LindonL 1 Reply Last reply Reply Quote 0
      • LindonL
        Lindon @d.healey
        last edited by Lindon

        @d-healey ok so doing that shows me this:

        e9200574-8ff3-47c4-a743-e8a09de6736c-image.png

        So there's a problem with the thread, and I have this in my pre-processors:

        24147a9c-a857-4a13-9809-cefd31970331-image.png

        Would that make any difference?

        HISE Development for hire.
        www.channelrobot.com

        LindonL 1 Reply Last reply Reply Quote 0
        • LindonL
          Lindon @Lindon
          last edited by

          @Christoph-Hart --- -you will want to see this answer I think:

          ..aaaaaand the answer is yes. If I set all the preprocessor commands I need to use the unlocker to off(zero) then the unzip code works fine.

          So I need the unlocker and I need the unzipper - How do I proceed?

          HISE Development for hire.
          www.channelrobot.com

          DanHD 2 Replies Last reply Reply Quote 0
          • DanHD
            DanH @Lindon
            last edited by

            This post is deleted!
            1 Reply Last reply Reply Quote 0
            • DanHD
              DanH @Lindon
              last edited by

              @Lindon I actually use a separate standalone app as part of the installation process. It downloads the samples, unzips and installs them, creates the link file, and can handle the license activation too. So when the user opens the actual plugin for the first time they don't have anything to do, it works right off the bat.

              Potentially a way around this.

              LindonL 1 Reply Last reply Reply Quote 0
              • LindonL
                Lindon @DanH
                last edited by

                @DanH Thanks but thats not possible with the distribution partner we are using.

                HISE Development for hire.
                www.channelrobot.com

                DanHD 1 Reply Last reply Reply Quote 1
                • DanHD
                  DanH @Lindon
                  last edited by

                  @Lindon will users have to download the zip file when they open the plugin for the first time or will it already have been downloaded?

                  LindonL 1 Reply Last reply Reply Quote 0
                  • LindonL
                    Lindon @DanH
                    last edited by

                    @DanH the plug-in does everything...

                    HISE Development for hire.
                    www.channelrobot.com

                    Christoph HartC 1 Reply Last reply Reply Quote 0
                    • Christoph HartC
                      Christoph Hart @Lindon
                      last edited by

                      @Lindon the crash happens because you‘re extracting the zip archive in the message thread. How and where are you calling the method?

                      LindonL 1 Reply Last reply Reply Quote 0
                      • LindonL
                        Lindon @Christoph Hart
                        last edited by

                        @Christoph-Hart said in Unzipping in the plugin crashing the browser:

                        @Lindon the crash happens because you‘re extracting the zip archive in the message thread. How and where are you calling the method?

                        Okay well I wasn't aware I was doing that, all I am doing is calling the unzip function from a button callback.

                        Here's a simple (thanks to Dave) example of what is happening. You just need to have a folder called testZips on the desktop with at least one zip file in it.

                        Load this snippet into HISE and it runs fine, compile it and it runs fine....

                        Now, put this in your extra definitions in preferences:

                        USE_COPY_PROTECTION=1
                        USE_SCRIPT_COPY_PROTECTION=1
                        HISE_DEACTIVATE_OVERLAY=1

                        Run it in Hise and it all works fine, compile it and run it ....crash.

                        HiseSnippet 1137.3ocsV80iaTCD2ataq5tkhnR7x8lIOsABQIkRAQEP3xcAEwcWiZJmPUHU4rqSh640Nx16cW.NI9pvq7oiuAkY1cSxldoUnHZdXUl+7yyOOd7LdnQGysVsg3E77Ey4DuOvezBkaVuYLghL3HhmuuqcGxgKlyrVdBwyaueDM4ErOI+2+78GxjLULesJB4bsHlehHU3VqcX2eRHk8YI7mKRq38i5NHVq5ok5LfF642lLmEeAaJ+LF5VMeh2cNNQ3zlQNliaId6enNYwnY5qTE9etvJFK4nPGxHXgJT2WKSPFiZI8lIjICWtcsDXUFtdyuWwl+i8OUjHVoecR3ixMPWinZ9vq1lzauMnWmpzqcE5sEJ4UgR6WPoG3OJ1Hl6VaA4y87GnbbyDFj1qRkBeI09q876oAOTtVorK38MfvJDQOtc6lT3S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k1y6XECprxqBI+KF7UzW
                        

                        HISE Development for hire.
                        www.channelrobot.com

                        d.healeyD 1 Reply Last reply Reply Quote 0
                        • d.healeyD
                          d.healey @Lindon
                          last edited by

                          @Lindon does it crash if you defer the script?

                          Libre Wave - Freedom respecting instruments and effects
                          My Patreon - HISE tutorials
                          YouTube Channel - Public HISE tutorials

                          LindonL 1 Reply Last reply Reply Quote 0
                          • LindonL
                            Lindon @d.healey
                            last edited by Lindon

                            @d-healey

                            Synth.deferCallbacks(true);

                            -- still crashes.

                            -- thank God because it would have been a NIGHTMARE to have to revisit years of work to assess if it would still work in this case...

                            HISE Development for hire.
                            www.channelrobot.com

                            Christoph HartC 1 Reply Last reply Reply Quote 1
                            • Christoph HartC
                              Christoph Hart @Lindon
                              last edited by

                              @Lindon Ah that was annoying.

                              If you didn't unlock the unlocker, it bypass the audio rendering (good, it's not activated) and therefore will stay in the "pre initialisation" stage (good) which uses a different kind of execution model for script functions, namely just run everything synchronously (good, results in faster loading times). This leads to your extract function running on the UI thread (not so good) which doesn't have a thread handle (bad) so trying to grab that for checking if the extraction should abort resulted in that crash (catastrophic).

                              I've introduced another stage between "running as usual" and "waiting for the activation to complete", so now your extract call is being executed during this stage (good) which properly defers it to the scripting thread where it belongs (good).

                              So I've committed a fix, but it's on the new_dispatcher branch which is my best friend for the last three weeks. It's close to being merged back into develop, so if you want to do me a solid, just grab that branch and report back if there are any issues. It's a complete rewrite of the module attribute notification system (among other things) and will result in HISE 3.7.0 (it might be even a big enough change for HISE 4.0.0).

                              However if you're already in panic mode for getting your product ASAP, just backport those changes to the current develop branch, shouldn't be too complicated.

                              Christoph HartC LindonL d.healeyD 3 Replies Last reply Reply Quote 2
                              • Christoph HartC
                                Christoph Hart @Christoph Hart
                                last edited by

                                @Christoph-Hart oh, and if you're at it, slap that commit afterwards too, it's bad coding day over here...

                                1 Reply Last reply Reply Quote 1
                                • LindonL
                                  Lindon @Christoph Hart
                                  last edited by Lindon

                                  @Christoph-Hart hang on are you saying that if I run the unlocker and it executes OK and unlocks the plugin before I try and run the unzip then it would work anyway?

                                  But in my example(s) I'm trying to run the unzip before the unlock has happened so thats the problem???

                                  If so then - I just run these the other way round unlock first then unzip...

                                  so the be clear in the existing version of HISE:

                                  LOCKED>UNZIP> == fail

                                  but

                                  LOCKED>UNLOCKED>UNZIP == works..

                                  ?? Or am I all off track here...

                                  fingers crossed its this cause getting this out the door soon(ish) would be nice, but I will def. take a run at the new version for you if you like.

                                  HISE Development for hire.
                                  www.channelrobot.com

                                  Christoph HartC 1 Reply Last reply Reply Quote 0
                                  • Christoph HartC
                                    Christoph Hart @Lindon
                                    last edited by

                                    hang on are you saying that if I run the unlocker and it executes OK and unlocks the plugin before I try and run the unzip then it would work anyway?

                                    Yes.

                                    But in my example(s) I'm trying to run the unzip before the unlock has happened so thats the problem???

                                    Yes.

                                    I just run these the other way round unlock first then unzip...

                                    Yes or use the fix I added to ensure it works both ways.

                                    take a run at the new version for you if you like.

                                    Yes.

                                    LindonL 1 Reply Last reply Reply Quote 2
                                    • d.healeyD
                                      d.healey @Christoph Hart
                                      last edited by

                                      @Christoph-Hart said in Unzipping in the plugin crashing the browser:

                                      if you want to do me a solid, just grab that branch and report back if there are any issues.

                                      When you do want me to start telling you what doesn't work when building on Linux? :)

                                      Libre Wave - Freedom respecting instruments and effects
                                      My Patreon - HISE tutorials
                                      YouTube Channel - Public HISE tutorials

                                      Christoph HartC 1 Reply Last reply Reply Quote 0
                                      • Christoph HartC
                                        Christoph Hart @d.healey
                                        last edited by

                                        Now. The time is now.

                                        1 Reply Last reply Reply Quote 1
                                        • LindonL
                                          Lindon @Christoph Hart
                                          last edited by

                                          @Christoph-Hart frankly - you are the man.

                                          Okay I will go build this and with luck ship it then move to the image you asked me to look at - I will give you a shout just before in case I'm "too late to the party"....

                                          HISE Development for hire.
                                          www.channelrobot.com

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

                                          49

                                          Online

                                          1.7k

                                          Users

                                          11.7k

                                          Topics

                                          101.9k

                                          Posts