Prev Previous Post   Next Post Next
Old 17th July 2008, 12:17   #1
Domipheus
Junior Member
 
Join Date: Jul 2008
Posts: 2
Long string error handling?

Just wondering what people think about the way long strings are handled. First off, I have not looked extensively to see if it is already a feature. I tried searching, but found nothing on the first 3 pages of results. Its to do with Path Manipulation specifically, but something that could be needed generally.

I've just spent a good while (a few hours) trying to figure out why an installer I wrote was totally trashing a small amount of Path environment variables on client machines. It would simply say the Path variable was empty, and then overwrite it with the directory I wanted. It took me ages to discover that is was simply the path variable on his/her computer being longer than 1024 characters. On a development machine, this length can easily be exceeded. I'm only 50 characters under this limit myself.

This is dangerous on so many levels!

Is it possible to have the installer totally bomb out when this happens? Trying to reconstruct path environment variables takes forever when you have numerous SDK's and build environments etc.

I really do consider this a huge flaw in the way nsis does this. There should be some sort of way to handle a string overflowing, even if it does totally stop the installer. An installer should never trash a machine, if in doubt - don't install.

I'm now using the long string build of makensis which is working nicely, but I do think string error handling could be good.
Domipheus is offline   Reply With Quote
 
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