Unzipping in the plugin crashing the browser
-
@DanH just back from the pub --- 1.4Gb...
-
-
@Lindon Follow the call stack
Click the line that mentions the extractZipFile function and see what's going on.
-
@d-healey ok so doing that shows me this:
So there's a problem with the thread, and I have this in my pre-processors:
Would that make any difference?
-
@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?
-
This post is deleted! -
@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.
-
@DanH Thanks but thats not possible with the distribution partner we are using.
-
@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?
-
@DanH the plug-in does everything...
-
@Lindon the crash happens because you‘re extracting the zip archive in the message thread. How and where are you calling the method?
-
@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=1Run it in Hise and it all works fine, compile it and run it ....crash.
HiseSnippet 1137.3ocsV80iaTCD2ataq5tkhnR7x8lIOsABQIkRAQEP3xcAEwcWiZJmPUHU4rqSh640Nx16cW.NI9pvq7oiuAkY1cSxldoUnHZdXUl+7yyOOd7LdnQGysVsg3E77Ey4DuOvezBkaVuYLghL3HhmuuqcGxgKlyrVdBwyaueDM4ErOI+2+78GxjLULesJB4bsHlehHU3VqcX2eRHk8YI7mKRq38i5NHVq5ok5LfF642lLmEeAaJ+LF5VMeh2cNNQ3zlQNliaId6enNYwnY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rrTn.yDygnqTbI1FvqFdgsPtMJiYfQbURt.VlTZrCJ6UZryRijTVrQ+x3hlO3iJtatFfSp72SE3eJJS6PxaHgOvqcq1jT38MuLNF29eNzCY6Xd3Nf4K1ALOZGv7k6.lGuCX9pc.yW+NwfOs7Gxb5zhqCfhgGm2k1y6XECprxqBI+KF7UzW
-
@Lindon does it crash if you defer the script?
-
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...
-
@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 intodevelop
, 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-Hart oh, and if you're at it, slap that commit afterwards too, it's bad coding day over here...
-
@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.
-
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.
-
@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? :)
-
Now. The time is now.