Archive: FindNext and nsisXML (by Wizou)


FindNext and nsisXML (by Wizou)
Hi,

I'm updating an old script that doesn't work anymore and I came across a crash I can figure out.

Here's the code:


FindFirst $R0 $R1 "$INSTDIR\res\NCMachineDescription\*.xml"
nsisXML::Create
${While} $R1 != ""
nsisXML::Load /NOUNLOAD "$INSTDIR\res\NCMachineDescription\$R1"
; some irrelevant code
FindNext $R0 $R1
${EndWhile}


It works fine before the search hit the last file but when it's done the FindNext function make the installer crash (runtime error). FindNext never returns an empty value.
If I remove the call to nsisXML::Load it works. I tried changing $R0 for another var but the crash still occurs.

I couldn't reproduce the crash with the above snippets, so I highly suspect the "; some irrelevant code" line


you can add DetailPrint "$R0 $R1" before FindNext to check whether everything is normal