Archive: messagebox plugin fails after 3 calls


messagebox plugin fails after 3 calls
I found the messageboxplugin very usefull when you want to display "yes" "always yes" "no" "always No".

However it crashes the whole installer/uninstaller after the 3rd call (2 times is ok)

I use the current version 0.98beta3 from here http://nsis.sourceforge.net/MessageBox_plug-in


Could someone inspect my code below.


# show example of the button width changes
messagebox::show MB_DEFBUTTON4|MB_TOPMOST "testing is fun" "0,103" "andforth.andforthespecial...MB_ABORTRETRYIGNORE|MB_TOPMOSTif you can...? if you can...? dghfkjg$\n" "la la la la la la la w$\nwwwwwwwww! wwwwwwwwww" "asdasd!" IDYES IDNO
Pop $0
DetailPrint "messagebox call 1 returned... $0"
# show example of the button width changes
messagebox::show MB_DEFBUTTON4|MB_TOPMOST "testing is fun" "0,103" "andforth.andforthespecial...MB_ABORTRETRYIGNORE|MB_TOPMOSTif you can...? if you can...? dghfkjg$\n" "la la la la la la la w$\nwwwwwwwww! wwwwwwwwww" "asdasd!" IDYES IDNO
Pop $0
DetailPrint "messagebox call 1 returned... $0"
# show example of the button width changes
messagebox::show MB_DEFBUTTON4|MB_TOPMOST "testing is fun" "0,103" "andforth.andforthespecial...MB_ABORTRETRYIGNORE|MB_TOPMOSTif you can...? if you can...? dghfkjg$\n" "la la la la la la la w$\nwwwwwwwww! wwwwwwwwww" "asdasd!" IDYES IDNO
Pop $0
DetailPrint "messagebox call 1 returned... $0"
# show example of the button width changes
messagebox::show MB_DEFBUTTON4|MB_TOPMOST "testing is fun" "0,103" "andforth.andforthespecial...MB_ABORTRETRYIGNORE|MB_TOPMOSTif you can...? if you can...? dghfkjg$\n" "la la la la la la la w$\nwwwwwwwww! wwwwwwwwww" "asdasd!" IDYES IDNO
Pop $0
DetailPrint "messagebox call 1 returned... $0"


my project attached
I attach here my sampleproject that crashes


Re: messagebox plugin fails after 3 calls
Hi!

I tested this code and it works! Have you tried this code on another machine as well?

Cheers

Bruno


well i tried it and it does crash..........what os do you use bholliger..........because it crashes on my XP SP2


It crashes on my WinXP German and NSIS 2.33 and also NSIS 2.34. I have no idea if that might related to the AdvUninstallLog also used in the install script. Adib.


It looks that I must not enable /NOUNLOAD or SetPluginUnload alwaysoff otherwise it will crash.
Can someone confirm this behaviour of messagebox plugin?


Using no unloading will ensure that global variables retain their values in the plug-in. If the plug-in was not written to work in this way, then you should enable plug-in unloading.

Stu