HISE Logo Forum
    • Categories
    • Register
    • Login

    Unzipping in the plugin crashing the browser

    Scheduled Pinned Locked Moved General Questions
    46 Posts 4 Posters 1.7k 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.
    • LindonL
      Lindon @DanH
      last edited by Lindon

      @DanH it wont even open in VS!!!

      I open projucer File>Save Project and open in IDE

      VS opens, I select Debug>Start Debugging(F5)

      I get thisL:
      8fa59a9d-0e0e-435c-8f4c-560d2345f25d-image.png

      No sign of the app actually starting..

      HISE Development for hire.
      www.channelrobot.com

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

        @Lindon ok I stepped past all these breakpoints got it to loaad and run and got this when it crashes:
        225c1203-6238-40ce-9408-18ae36179290-image.png

        some sort of read access violation???

        HISE Development for hire.
        www.channelrobot.com

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

          @Lindon I’m in the pub (suggest you do the same 😅). But what size is the file you’re trying to unzip?

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

            @DanH just back from the pub --- 1.4Gb...

            HISE Development for hire.
            www.channelrobot.com

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

              @Lindon ok, unlikely to be that then. Did you send your code to @d-healey to look at? Feel free to send my way as well.

              d.healeyD 1 Reply Last reply Reply Quote 0
              • 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+i8OUjHVoecR3ixMPWinZ9vq1lzauMnWmpzqcE5sEJ4UgR6WPoG3OJ1Hl6VaA4y87GnbbyDFj1qRkBeI09q876oAOTtVorK38MfvJDQOtc6lT3SimDBYdqidIyPOgMlK6P+V5RfS4td5z4ZEHDUuvbc.RXweaY4fZG+ZW8l0eFmkrfd0LthtPmQYFdqV+pJ2agRJTb5jLUrSnUzLEd79BwbaTiveOLPpiYRZhv.gtuPxGsv53oXzyO+LQUTdD2dgSOuQN2vrGZCIg0gKHFufv.wDZzmHrGwm.ANIBV5FMBCBLbWlQAdDDrLp+F.ZyvBPxWTKBqIs9m1B7odS5DlzxwkGvNQanQWSEpb7vRC6hfqaAYBCKFIRNqxw6LY7lq16Q5wuBYB5e.jlsZIu0bi.yuHlugVm9YTvoV8xLFHsiJAM0o+AEKtxrq8nPNmQA29.oTyzUZZ.qxtEBzXwQYPvM32aBBu41GqZ0gYNmV0AKeLZYT7xZmlP4kLimeXiGMkRUOPBCpVU7jvaf5lsWFVFj5MvcaYn5wjxw.5n2jCvJUgemoc7mpJJ5fc.8MMMYxVsUtVRnRbalwdYl2EvHUV5XtoZV.cDtfuYWC+2dWipM0hKRKUbTqFnDtmNmqdas5Hk4R3e+7fiXNF1poTG32btwIPJ3cD+RnucQim.+xaaPK3UG.PqXWt0OrrsTQBmHRP.kYex0qZt2U2cwJg+77tB6o5TXcXFPsWMK6R9.0PCGNLw1WjJA5dEA59kAJuhNON20un5tRXHeWkvzk28JQhaFjR8ZWiPv5ehWr+15QEVbmnRwe6RU8gqxZyhQ5LUBlxZ8JaEu5bafOLjLiKlNygw8uAdjlIcB7RBtSYRwTUZ9FKvGRpmvm3HimtbpWvcdM7CYOx10ZO3fCdcwvyaMX.FIoSxjL2lyovgykFfxvMFNfC.TVgaQ0g2+uM75+JEef+PgKd114XssvQnX88AGKG4ee+imLgG6VSv886+KueluSdlNyITSOk4LBn50+rrTn.yDygnqTbI1FvqFdgsPtMJiYfQbURt.VlTZrCJ6UZryRijTVrQ+x3hlO3iJtatFfSp72SE3eJJS6PxaHgOvqcq1jT38MuLNF29eNzCY6Xd3Nf4K1ALOZGv7k6.lGuCX9pc.yW+NwfOs7Gxb5zhqCfhgGm2k1y6XECprxqBI+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
                                            • First post
                                              Last post

                                            28

                                            Online

                                            1.8k

                                            Users

                                            12.0k

                                            Topics

                                            104.7k

                                            Posts