![]() |
#1 |
Junior Member
Join Date: May 2006
Location: San Francisco, CA
Posts: 25
|
async Leave callback for MUI page causing evilness
I have a verification function as a callback when you leave the Components Page, i.e.:
code: Unfortunately during this process you can still click on the Components Page. You can select/deselect components, click install again, which can lead to corrupt installer messages and installer crashes. I display a banner in the method, but it takes 1-2 seconds to load the DLL so you can still click on the buttons. I disable the Install button, but you can still select components. Is there a way to lock the dialog? I have a few ideas on workarounds: A) Load the banner DLL earlier. Is there a way to load a plugin DLL explicitly without calling a plugin function? I suppose I can do "Banner::destroy /NOUNLOAD" but that seem really hacky. B) Use the next page's PRE callback instead, and then go back to the Components Page if the conditions aren't met. But this isn't ideal from a usability standpoint because it will seem to the user that they're already in the install progress, which they're not. I'd appreciate any suggestions/corrections. Thanks, bobics |
![]() |
![]() |
![]() |
#2 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,358
|
why not just disable the component list aswell?
IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#3 |
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
I cannot reproduce this. Please attach a complete example.
As for loading the Banner faster, it's probably due to the solid compression. Simply ReserveFile it on the top of the script. NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
![]() |
![]() |
![]() |
#4 |
Junior Member
Join Date: May 2006
Location: San Francisco, CA
Posts: 25
|
I spent some time stripping down my installer and discovered that it has something to do with the FindProcDLL I'm using, http://nsis.sourceforge.net/FindProcDLL_plug-in (although it may not be *specific* to that DLL). If you double-click on "install" very quickly, you should see the error. I've included the repro script below, and attached a screenshot of the error.
code: |
![]() |
![]() |
![]() |
#5 |
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
I still can't reproduce. Which version of NSIS are you using?
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
![]() |
![]() |
![]() |
#6 |
Junior Member
Join Date: May 2006
Location: San Francisco, CA
Posts: 25
|
NSIS 2.28 - I am using several other plugins (but as I understand it, they won't be include if they aren't used).
Otherwise the only file that's different from a stock install is the Banner.dll (due to the banner hanging bug, forums.winamp.com/showthread.php?s=&threadid=270838&highlight=banner) You have to double-click very quickly in this sample... perhaps your computer is too fast? ![]() |
![]() |
![]() |
![]() |
#7 |
Junior Member
Join Date: May 2006
Location: San Francisco, CA
Posts: 25
|
Anders - thanks for you suggestion. In case anyone else might find it useful, I used the following:
code: kichik - Since I'm using the above workaround, I think our installer is okay for now but it's still probably better to figure out why the dialog is not blocking. Would it help if I performed a clean install of NSIS and try to repro? |
![]() |
![]() |
![]() |
#8 |
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Please attach your script.
Stu |
![]() |
![]() |
![]() |
#9 |
Junior Member
Join Date: May 2006
Location: San Francisco, CA
Posts: 25
|
Hi Stu - I pasted the script in its entirety above, but here it is again as an attachment.
Thanks - Andy |
![]() |
![]() |
![]() |
#10 |
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Not that one
![]() I mean your actual script because we cannot reproduce the problem with that one. Stu |
![]() |
![]() |
![]() |
#11 |
Junior Member
Join Date: May 2006
Location: San Francisco, CA
Posts: 25
|
Unfortunately I don't think my company would allow me to post my script in it's entirety... what I can do is try to come up with a more reproducible case. I'll post again when I do. Also if it helps I can make available a compiled setup.
|
![]() |
![]() |
![]() |
#12 |
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
Thanks, fixed. The decompression function messed with the message loop when it shouldn't have.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
![]() |
![]() |
![]() |
#13 |
Junior Member
Join Date: May 2006
Location: San Francisco, CA
Posts: 25
|
Thanks for the fix and update!
|
![]() |
![]() |
![]() |
#14 |
Junior Member
Join Date: May 2006
Location: San Francisco, CA
Posts: 25
|
Hmm, I just added a custom dialog using nsDialogs.nsh and I saw the same type of installer crash when clicking on the "Next" button really quickly twice. So I think this bug still exists.
I'm using the same workaround of disabling the next button in the leave callback of the custom dialog. |
![]() |
![]() |
![]() |
#15 |
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
I can't reproduce. I'll need an example again.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
![]() |
![]() |
![]() |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|