Archive: Plugin enumeration bug


Plugin enumeration bug
Recently I have tried the NSIS2b2 (was using 1.98 before) and on one of my home systems (P-III 1200MHz, WinXP Pro) it is completely unusable because of the following bug:
- after plugin enumeration, depending on currently available memory amount, makensis once or twice displays the message "ack! realloc(557359664) failed, trying malloc(278663448)!" and then stops. When I increase the swapfile up to 1GB, it works, but uses more than gigabyte of memory, compiles even simple scripts about half a minute and on top of everything it totally swaps out the OS and applications.

I've compiled the debug version and found the cause of this error: the m_funcsCount in the Plugins class is not initialized to zero before use and in my case at the end of Plugins::FindCommands it become equal to 69534788.

The "m_funcsCount=0;" at the beginning of Plugins::FindCommands completely rids of the bug.

I think it will not be difficult to fix this permanently ;)


Thank you for ridding the world of my stupid bug :)

I hope this one will fix every BSOD some people got with every run of makensis, with some compiles, with some version, on some machines. An variable taht was not initialized sounds like the right reason.