Old 12th July 2018, 10:47   #41
TrifonovS
Senior Member
 
Join Date: Apr 2009
Location: Bulgaria
Posts: 171
I don't call it in a section. Here is a part of my code:

PHP Code:
...

!
define MUI_PAGE_CUSTOMFUNCTION_SHOW InstFilesShow
!insertmacro MUI_PAGE_INSTFILES
...

; Function 
that is called when the installation dialog is shown
Function InstFilesShow
  
Set a function that will receive the messages to the parent window
  
${WndSubclass_Subclass$HWNDPARENT GetWinMessage $GetWinMessage $GetWinMessage
FunctionEnd
...

; Function 
that receives the messages to the parent window
Function GetWinMessage
  
${If} $= ${WM_QUERYENDSESSION}
  ...

  ${EndIf}
  ...
FunctionEnd 
TrifonovS is offline   Reply With Quote
Old 13th July 2018, 08:48   #42
TrifonovS
Senior Member
 
Join Date: Apr 2009
Location: Bulgaria
Posts: 171
I'm currently simplifying my script to be able to reproduce the problem easier. Unfortunately this is not an easy task, because the script is very complex. However I came to much simpler code that uses WndSubclass plug-in together with my special macro that makes copy of some files from the installer to some Windows folders. Now I can reproduce another crash, but I still think that the reason is the same. My macro contains on two places the following line:
PHP Code:
SetOutPath "$TEMP
First time when this line is executed, I see the correct path in the Details:
PHP Code:
Output folderC:\Users\UserName\AppData\Local\Temp 
But the second time when this line is reached the path is the following:
PHP Code:
Output folder0x0011 
It seems that the content of the system variable $TEMP is changed. I don't do this in my script (at least not intentionally ).

When I comment the line that calls the macro ${WndSubclass_Subclass} all works fine. Is this information helpful?
TrifonovS is offline   Reply With Quote
Old 13th July 2018, 10:18   #43
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,811
It is certainly possible that I messed up and have a bad pointer offset somewhere or a problem with message recursion. A complete example might still be required but I can try to take a look to see if I can reproduce it.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 13th July 2018, 10:22   #44
TrifonovS
Senior Member
 
Join Date: Apr 2009
Location: Bulgaria
Posts: 171
OK! The example is still too complex to send it to you, but I will continue with the reduction.
TrifonovS is offline   Reply With Quote
Old 14th July 2018, 15:41   #45
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,811
It might just be threading issues, NSIS was not designed to be thread safe and the sections are executed in a different thread.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Reply
Go Back   Winamp & SHOUTcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump