I.e. on my installer's startup, where I've got an interactive feedback through an NSD_OnChange, it will very often fail.. I'll enter some gobbledygook into the edit control and suddenly - randomly - it'll start working. After that it'll tend to keep working, but every once in a while it'll break again as well and once again it returns an empty string.
I am using the 8192-character version of makensis, and this seems to be the culprit somehow; reverting to the regular build solves the issue - but creates a new one 😉
I can't share the actual installer code, but here's a sample that will replicate the behavior - albeit less severely so.
!include "MUI2.nsh"
!include "nsDialogs.nsh"
OutFile "test.exe"
Page Custom test
Var dialog
Var editcontrol
Var label
Var hwnd
Function test
nsDialogs::Create 1018
Pop $dialog
${NSD_CreateText} 0% 3% 100% 8% "Testing"
Pop $editcontrol
${NSD_OnChange} $editcontrol editchanged
${NSD_CreateLabel} 0% 12% 100% 70% "Testing"
Pop $label
nsDialogs::Show
FunctionEnd
Function editchanged
Pop $hwnd
${NSD_GetText} $hwnd $0
${NSD_SetText} $label $0
FunctionEnd
Section
SectionEnd
!insertmacro MUI_LANGUAGE "English" Tests to run:1. Enter some text. It should get replicated in the label below the edit contol.
2. Copy the text and paste it a bunch of times - eventually (at 256 characters), the label will not show the text anymore.
At this point, if you erase your text, the label may either update again or it will stay empty.
( in the standard build, you can enter well beyond 256 characters without problem. )
3. Paste your text a whole lot more - eventually, the installer will simply crash to desktop.
Unfortunately this is not exactly the same scenario as in my actual installer - as it has far less than 256 characters in it; but I'd imagine the problems are related if not the exact same in origin.
Thoughts? Thanks in advance! 🙂