Old 2nd January 2010, 17:46   #1
SuperPat
Senior Member
 
SuperPat's Avatar
 
Join Date: Mar 2006
Location: France
Posts: 212
Problem with the large string version of NSIS

Hello,

When I try to compile Ultra Modern UI with the large string build of NSIS, the compiler stop without any error...

Log with the Confirm.nsi example:
code:
MakeNSIS v2.46 - Copyright 1995-2009 Contributors
See the file COPYING for license details.
Credits can be found in the Users Manual.

Processing config:
Processing plugin dlls: "C:\Program Files\NSIS\Plugins\*.dll"
- AdvSplash::show
- Banner::destroy
- Banner::getWindow
- Banner::show
- BgImage::AddImage
- BgImage::AddText
- BgImage::Clear
- BgImage:estroy
- BgImage::Redraw
- BgImage::SetBg
- BgImage::SetReturn
- BgImage::Sound
- Dialer::AttemptConnect
- Dialer::AutodialHangup
- Dialer::AutodialOnline
- Dialer::AutodialUnattended
- Dialer::GetConnectedState
- InstallOptions::dialog
- InstallOptions::initDialog
- InstallOptions::show
- InstallOptionsEx::dialog
- InstallOptionsEx::initDialog
- InstallOptionsEx::setFocus
- InstallOptionsEx::show
- InstallOptionsEx::skipValidation
- InstallOption****legacy::dialog
- InstallOption****legacy::initDialog
- InstallOption****legacy::setFocus
- InstallOption****legacy::show
- InstallOption****legacy::skipValidation
- InstallOption****newAPI::dialog
- InstallOption****newAPI::initDialog
- InstallOption****newAPI::setFocus
- InstallOption****newAPI::show
- InstallOption****newAPI::skipValidation
- LangDLL::LangDialog
- Math::Script
- NSISArray::ArrayCount
- NSISArray::ArrayExists
- NSISArray::Clear
- NSISArray::Concat
- NSISArray::Copy
- NSISArray::Cut
- NSISArray:ebug
- NSISArray:elete
- NSISArray::ErrorStyle
- NSISArray::Exists
- NSISArray::ExistsI
- NSISArray::FreeUnusedMem
- NSISArray::Join
- NSISArray::New
- NSISArray::Pop
- NSISArray::Push
- NSISArray::Put
- NSISArray::ReDim
- NSISArray::Read
- NSISArray::ReadToStack
- NSISArray::Reverse
- NSISArray::Search
- NSISArray::SearchI
- NSISArray::SetAutoReDim
- NSISArray::SetSize
- NSISArray::Shift
- NSISArray::SizeOf
- NSISArray::Sort
- NSISArray::Splice
- NSISArray::Subtract
- NSISArray::Swap
- NSISArray::Unload
- NSISArray::Unshift
- NSISArray::Write
- NSISArray::WriteList
- NSISArray::WriteListC
- NSISdl::download
- NSISdl::download_quiet
- SkinnedControls::setskin
- SkinnedControls::skinit
- SkinnedControls::unskinit
- Splash::show
- StartMenu::Init
- StartMenu::Select
- StartMenu::Show
- System::Alloc
- System::Call
- System::Copy
- System::Free
- System::Get
- System::Int64Op
- System::Store
- TypeLib::GetLibVersion
- TypeLib::Register
- TypeLib::UnRegister
- UserInfo::GetAccountType
- UserInfo::GetName
- UserInfo::GetOriginalAccountType
- VPatch::GetFileCRC32
- VPatch::GetFileMD5
- VPatch::vpatchfile
- nsDialogs::Create
- nsDialogs::CreateControl
- nsDialogs::CreateItem
- nsDialogs::CreateTimer
- nsDialogs::GetUserData
- nsDialogs::KillTimer
- nsDialogs::OnBack
- nsDialogs::OnChange
- nsDialogs::OnClick
- nsDialogs::OnNotify
- nsDialogs::SelectFileDialog
- nsDialogs::SelectFolderDialog
- nsDialogs::SetRTL
- nsDialogs::SetUserData
- nsDialogs::Show
- nsExec::Exec
- nsExec::ExecToLog
- nsExec::ExecToStack

!define: "MUI_INSERT_NSISCONF"=""

Changing directory to: "C:\Program Files\NSIS\Examples\******odernUI"

Processing script file: "C:\Program Files\NSIS\Examples\******odernUI\Confirm.nsi"
Name: "******odernUI Confirm"
OutFile: "Confirm.exe"
SetCompressor: /FINAL lzma
InstallDir: "$LOCALAPPDATA\******odernUI Test"
InstallRegKey: "HKCU\Software\******odernUI Test\"
!include: "C:\Program Files\NSIS\Include\UMUI.nsh"
!include: "C:\Program Files\NSIS\Contrib\******odernUI\UMUI.nsh"
NSIS Ultra Modern User Interface version 1.00 beta 2 - 2005-2009 SuperPat (C:\Program Files\NSIS\Contrib\******odernUI\UMUI.nsh:12)
Based on: NSIS Modern User Interface version 1.8 - 2002-2009 Joost Verburg (C:\Program Files\NSIS\Contrib\******odernUI\UMUI.nsh:13)
!define: "MUI_INCLUDED"=""
!define: "UMUI_SYSVERSION"="1.00 beta 2"
!define: "MUI_SYSVERSION"="1.8"
!define: "MUI_VERBOSE"="3"
!include: closed: "C:\Program Files\NSIS\Contrib\******odernUI\UMUI.nsh"
!include: closed: "C:\Program Files\NSIS\Include\UMUI.nsh"
!include: "C:\Program Files\NSIS\Include\WinMessages.nsh"
!include: closed: "C:\Program Files\NSIS\Include\WinMessages.nsh"
!define: "UMUI_SKIN"="red"
!define: "MUI_ABORTWARNING"=""
!define: "MUI_UNABORTWARNING"=""
Var: "STARTMENU_FOLDER"
!insertmacro: MUI_PAGE_LICENSE
!insertmacro: end of MUI_PAGE_LICENSE
!insertmacro: MUI_PAGE_COMPONENTS
!insertmacro: end of MUI_PAGE_COMPONENTS
!insertmacro: MUI_PAGE_DIRECTORY
!insertmacro: end of MUI_PAGE_DIRECTORY
!define: "MUI_STARTMENUPAGE_REGISTRY_ROOT"="HKCU"
!define: "MUI_STARTMENUPAGE_REGISTRY_KEY"="Software\******odernUI Test"
!define: "MUI_STARTMENUPAGE_REGISTRY_VALUENAME"="Start Menu Folder"
!insertmacro: UMUI_PAGE_ALTERNATIVESTARTMENU
!insertmacro: end of UMUI_PAGE_ALTERNATIVESTARTMENU
!define: "UMUI_CONFIRMPAGE_TEXTBOX"="confirm_function"
!insertmacro: UMUI_PAGE_CONFIRM

It did the same thing when you try to insert an ultra modern page.

Do you now why?

Best Regards,
SuperPat

SuperPat is offline   Reply With Quote
Old 2nd January 2010, 19:05   #2
{_trueparuex^}
Senior Member
 
{_trueparuex^}'s Avatar
 
Join Date: Dec 2005
Location: Glow
Posts: 285
I just tried to compile the ******odernUI (1.00 2009-12-25) basic.nsi example with the large string build and it worked...

But when I tried to compile the confirm.nsi example makensis crashed.
Quote:
Second chance exception 0xC00000FD (Stack Overflow) occurred in "MAKENSIS.EXE" at address 0x0044F907.
ps. For some reason the forum is filtering word ****** (u-l-t-r-a-m) effectively breaking urls to ******odernUI.

PaR

The guy with the ridiculous username. Thou shall call him PaR instead.
Visit My Website
{_trueparuex^} is offline   Reply With Quote
Old 2nd January 2010, 20:20   #3
SuperPat
Senior Member
 
SuperPat's Avatar
 
Join Date: Mar 2006
Location: France
Posts: 212
The basic.nsi example works because it does not use any InstallOptionsEx pages.

The WelcomeFinishAbort.nsi, MultiLanguage.nsi examples work fine


Last edited by SuperPat; 2nd January 2010 at 20:36.
SuperPat is offline   Reply With Quote
Old 2nd January 2010, 20:31   #4
{_trueparuex^}
Senior Member
 
{_trueparuex^}'s Avatar
 
Join Date: Dec 2005
Location: Glow
Posts: 285
Reduced test case probably would help to solve this problem.

PaR

The guy with the ridiculous username. Thou shall call him PaR instead.
Visit My Website

Last edited by {_trueparuex^}; 2nd January 2010 at 20:49.
{_trueparuex^} is offline   Reply With Quote
Old 2nd January 2010, 20:39   #5
LoRd_MuldeR
Major Dude
 
LoRd_MuldeR's Avatar
 
Join Date: Sep 2005
Location: Somewhere over the Slaughterhouse
Posts: 797
With "Stack Overflow" two things come to my mind: Either UMUI uses too many nested macros/functions, so that the stack runs out of free space (maybe the long strings build requires more stack space per macro/function call, so that's why the "normal" build works?) or there is an infinite recursion somewhere. The latter is unlikely, because it would (most-likely) apply to the "normal" build as well. Can't we simply increase the stack size ???

My Plugins: StdUtils | NSISList | CPUFeatures | ExecTimeout | KillProc
My source of inspiration: http://youtu.be/lCwY4_0W1YI
LoRd_MuldeR is offline   Reply With Quote
Old 3rd January 2010, 13:26   #6
SuperPat
Senior Member
 
SuperPat's Avatar
 
Join Date: Mar 2006
Location: France
Posts: 212
Quote:
Originally posted by LoRd_MuldeR
With "Stack Overflow" two things come to my mind: Either UMUI uses too many nested macros/functions, so that the stack runs out of free space (maybe the long strings build requires more stack space per macro/function call, so that's why the "normal" build works?)
You are right but there are only three sub-macro level where it crashes but some of them can be called several times in the same function.

It is true that I use too many macros, and not enough functions because of their difficulty in managing it:

Some function may be called in install script and uninstall script but it is not an obligation and an unused function causes a warning.

I might try using a little less macro, but I think the stack will still always too small.


Quote:
Originally posted by LoRd_MuldeR
Can't we simply increase the stack size ???
This would be perfect!

SuperPat is offline   Reply With Quote
Old 4th January 2010, 19:34   #7
{_trueparuex^}
Senior Member
 
{_trueparuex^}'s Avatar
 
Join Date: Dec 2005
Location: Glow
Posts: 285
Here's an modified version of the large string makensis.exe with stack size set to 8 MB. I used EDITBIN from the VC++ toolset to change the stack size.

PaR

The guy with the ridiculous username. Thou shall call him PaR instead.
Visit My Website
{_trueparuex^} is offline   Reply With Quote
Old 4th January 2010, 19:43   #8
LoRd_MuldeR
Major Dude
 
LoRd_MuldeR's Avatar
 
Join Date: Sep 2005
Location: Somewhere over the Slaughterhouse
Posts: 797
That one works for me

BTW: Is there a way to detect NSIS_MAX_STRLEN at runtime?

My Plugins: StdUtils | NSISList | CPUFeatures | ExecTimeout | KillProc
My source of inspiration: http://youtu.be/lCwY4_0W1YI
LoRd_MuldeR is offline   Reply With Quote
Old 4th January 2010, 19:59   #9
{_trueparuex^}
Senior Member
 
{_trueparuex^}'s Avatar
 
Join Date: Dec 2005
Location: Glow
Posts: 285
Not sure what you mean, but NSIS_MAX_STRLEN is defined at script compiletime and passing it to some runtime variable shouldn't be a problem. E.g. StrCpy $0 ${NSIS_MAX_STRLEN}

NSIS_MAX_STRLEN is also passed on plug-in when they are called.

PaR

The guy with the ridiculous username. Thou shall call him PaR instead.
Visit My Website
{_trueparuex^} is offline   Reply With Quote
Old 4th January 2010, 20:02   #10
LoRd_MuldeR
Major Dude
 
LoRd_MuldeR's Avatar
 
Join Date: Sep 2005
Location: Somewhere over the Slaughterhouse
Posts: 797
Ah, thanks again!

I couldn't find ${NSIS_MAX_STRLEN} in the docs and only tried ${__NSIS_MAX_STRLEN__}

My Plugins: StdUtils | NSISList | CPUFeatures | ExecTimeout | KillProc
My source of inspiration: http://youtu.be/lCwY4_0W1YI
LoRd_MuldeR is offline   Reply With Quote
Old 4th January 2010, 20:12   #11
{_trueparuex^}
Senior Member
 
{_trueparuex^}'s Avatar
 
Join Date: Dec 2005
Location: Glow
Posts: 285
Right
You can run command 'makensis /HDRINFO' to get a list of options makensis was compiled with. All those options should be defined when compiling scripts.

PaR

The guy with the ridiculous username. Thou shall call him PaR instead.
Visit My Website
{_trueparuex^} is offline   Reply With Quote
Old 13th May 2010, 00:37   #12
theTallGuy
Junior Member
 
Join Date: Nov 2006
Posts: 18
Quote:
Originally Posted by {_trueparuex^} View Post
Here's an modified version of the large string makensis.exe with stack size set to 8 MB. I used EDITBIN from the VC++ toolset to change the stack size.
Is this version of the file still available somewhere? I, too, am getting the crashing issue, and would love a quick fix.

Alternately, is there another way to change the stack size without using the VC++ toolset, which I don't have?

Thanks in advance!
Michael
theTallGuy is offline   Reply With Quote
Old 13th May 2010, 09:49   #13
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
http://nsis.sourceforge.net/Docs/AppendixG.html#G.1

Stu
Afrow UK is offline   Reply With Quote
Old 15th May 2010, 13:15   #14
{_trueparuex^}
Senior Member
 
{_trueparuex^}'s Avatar
 
Join Date: Dec 2005
Location: Glow
Posts: 285
Quote:
Originally Posted by theTallGuy View Post
Is this version of the file still available somewhere? I, too, am getting the crashing issue, and would love a quick fix.

Alternately, is there another way to change the stack size without using the VC++ toolset, which I don't have?

Thanks in advance!
Michael
Not sure what happened to the attachment, but I uploaded another version to my website:
http://koti.mbnet.fi/vaultec/files/m...2_stack_8M.zip

The stack size is just a value in the PE header and you can change it with tools like: LordPE, PE tools, PE Explorer ... hex editor of your choice.

PaR
{_trueparuex^} is offline   Reply With Quote
Old 20th May 2010, 02:52   #15
bnicer
Senior Member
 
Join Date: Feb 2005
Location: London
Posts: 218
AddSize no longer works. Is this version based on a nightly build? Otherwise, thanks.

edit:
Nor does it automatically get the section size for 'Space required'. You have to calculate manually and SectionSetSize as a workaround.

edit again:
It hinges on the placement of sections. Don't ask me why. They have to be before .onInit? (Or nothing installs.) I can't fix it.

Last edited by bnicer; 20th May 2010 at 04:01.
bnicer is offline   Reply With Quote
Old 20th May 2010, 05:00   #16
bnicer
Senior Member
 
Join Date: Feb 2005
Location: London
Posts: 218
There is another large string download from sourceforge. The installer it builds fails the integrity check. This puts me in a bind. Not being a developer, I can't build me own version.

I'm using a single string with potentially, although unlikely, up to 150 paths of files that are in use. I'm unable to divide the string up into several smaller segments, because each path will be added onto the one string with a line break, and the string will be displayed on the MUI UnConfirmPage as a list of files. I would trim the full paths and use only the file names, as a last resort.

Is anyone else having similar issues with the large string build: "Installer integrity check has failed"?
bnicer is offline   Reply With Quote
Old 20th May 2010, 07:44   #17
Wizou
Senior Member
 
Join Date: Aug 2007
Location: Paris, France
Posts: 304
Why not use a listbox to display the paths?
You could add one line at a time
Wizou is offline   Reply With Quote
Old 20th May 2010, 08:01   #18
bnicer
Senior Member
 
Join Date: Feb 2005
Location: London
Posts: 218
It's possible. I haven't worked with listboxes before. The list has to refresh when there are still some files open after the Uninstall button is pressed, scroll down with many files, and scroll horizontally or wrap if the path is long. I think you can achieve the first two, but not sure about the third. I'll see what happens. Thanks.
bnicer is offline   Reply With Quote
Old 20th May 2010, 08:07   #19
Wizou
Senior Member
 
Join Date: Aug 2007
Location: Paris, France
Posts: 304
http://lmgtfy.com/?q=listbox+horizontal+scroll
Wizou is offline   Reply With Quote
Old 20th May 2010, 16:32   #20
{_trueparuex^}
Senior Member
 
{_trueparuex^}'s Avatar
 
Join Date: Dec 2005
Location: Glow
Posts: 285
Quote:
Originally Posted by bnicer View Post
AddSize no longer works. Is this version based on a nightly build? Otherwise, thanks.

edit:
Nor does it automatically get the section size for 'Space required'. You have to calculate manually and SectionSetSize as a workaround.

edit again:
It hinges on the placement of sections. Don't ask me why. They have to be before .onInit? (Or nothing installs.) I can't fix it.
It's the official large string build (NSIS v2.46) modified with EDITBIN.

Are you using the correct stub files?

PaR

The guy with the ridiculous username. Thou shall call him PaR instead.
Visit My Website
{_trueparuex^} is offline   Reply With Quote
Old 20th May 2010, 23:01   #21
bnicer
Senior Member
 
Join Date: Feb 2005
Location: London
Posts: 218
I'm using stubs that are in the stubs folder for the normal build. Is that wrong?

What strikes me is that AddSize does not add size to the section it's in. Unless I move the section that installs files forward, nothing really happens. It's like the section wasn't there.

edit: I just read the readme.txt, which mentions stubs. I missed that. Sorry. My mistake.

Yes, and the sourceforge download and the large string build you posted are both up and running without a hitch now. Again, sorry for the fuss, people. Oops. Thanks!

Last edited by bnicer; 20th May 2010 at 23:27.
bnicer is offline   Reply With Quote
Old 8th January 2013, 14:25   #22
PoRtAbLe_StEaLtH
Junior Member
 
Join Date: Jul 2011
Posts: 49
Not compatible with Unicode?

only works with ANSI?
PoRtAbLe_StEaLtH is offline   Reply With Quote
Old 8th January 2013, 21:02   #23
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,358
Quote:
Originally Posted by PoRtAbLe_StEaLtH View Post
only works with ANSI?
The unicode build uses large strings by default IIRC

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