Old 9th August 2020, 20:07   #1
Nutzzz
Member
 
Join Date: May 2007
Location: Orange County, CA, U.S.A.
Posts: 73
NSIS Debug build reports memory leaks

Hello, there. Most likely this is for Anders...

I built the latest SVN 7210 (which I believe is only one off from v3.06.1). My source has only one change, in exehead/exec.c, to comment out lines 1616 and 1618 to inhibit logging the output when LogSet is turned on or off so a user-readable command-line output and/or user-readable install.log can be created (See my comment to feature request 533). I make 3 different NSIS builds, "regular," commandline, and commandline+debug (all with logging and long strings). I'm building NSIS on a Win7 machine with MSTOOLKIT=no.

The issue: The debug build (only) reports memory leaks at the end of the NSIS build (apparently running makensis for the new native NSIS Menu; though note I have set SKIPUTILS="NSIS Menu" so perhaps it shouldn't be doing that). In any case, I get the same memory leak warnings with makensis example.nsi.

The last time I built SVN 7068 [3.04 timeframe], it didn't exhibit this behavior.

My scons call:
code:
C:\Python27\scons-2.5.0.bat dist-zip MSTOOLKIT=no DEBUG=yes NSIS_CONFIG_LOG=yes SKIPUTILS="NSIS Menu" NSIS_CONFIG_LOG_STDOUT=yes NSIS_MAX_STRLEN=8192

Find the build output attached.

Let me know if there's anything else you need from me to help debug this.

EDIT: I don't know if it's related, though this sounds like a memory leak issue: for a very long time (more than 2 years) I have had odd behavior (on the same machine that I am using for building NSIS) where occasionally makensis starts crashing, and keeps crashing every time it is run. My workaround is to replace the makensis executable, and the issue goes away. At one point, Windows would report an error that makensis had crashed (and then our build script would hang); at some point (maybe in the last year or so?), Windows stopped popping up the box, and instead the crash would give a weird access violation exit code (-1073741819).
Attached Files
File Type: txt NSISDebug_build-output.txt (52.1 KB, 79 views)
Nutzzz is offline   Reply With Quote
Old 10th August 2020, 10:54   #2
JasonFriday13
Major Dude
 
JasonFriday13's Avatar
 
Join Date: May 2005
Location: New Zealand
Posts: 893
"<assemblyIdentit" suggests an issue with strings in manifest.cpp, or it could just be debug mode adding a bunch of stuff which makes it leak memory, who knows.

"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me)
NSIS 3 POSIX Ninja
Wiki Profile
JasonFriday13 is offline   Reply With Quote
Old 11th August 2020, 00:20   #3
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,321
I don't think there are any leaks. Certainly the "<assemblyIdentit" object is not a leak. It is however stored in a global that is most likely released after the memory leak check runs.

It might be possible to run the CRT check after the c++ destructors but I'm not sure if it can be done in a portable way.

The crash is more interesting. If you could provide the crashing makensis.exe and a .pdb file I might be able to take a look. Or you could try running it in a debugger yourself and try to find out where it is happening.

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