Skip to content
⌘ NSIS Forum Archive

Compile Error 12345

16 posts

CrazyDogGuy#

Compile Error 12345

Hi All--

I'm running into this compile error. From what I've read, it has to do with files above 2 gig. I'm seeing it in NSIS 2.50 when running a powershell script from Jenkins. If I run the powershell script directly, my installer compiles. It also sometimes works with Jenkins when I delete the project directory from the machine that's running my powershell script.

It's choking on a 52MB file:

File: "PTCS.PT" [compress]
Internal compiler error #12345: error creating mmap the size of 87765823.

Note: you may have one or two (large) stale temporary file(s)
left in your temporary directory (Generally this only happens on Windows 9x).
There's plenty of space on the machine; it's a machine running windows 2012R2 server. Any ideas?
Anders#
Did you post a similar question on Stackoverflow?

Does it have enough free space on the drive where %temp% is?
CrazyDogGuy#
Yeah I did. I wasn't sure if it's an NSIS problem or a Jenkins or PowerShell problem. I'm using NSIS 2.50 (can't upgrade to 3.0). My temp directory's on a drive with 44 GB free. First thing I checked was the disk space. I've seen this happen when a build machine gets too full. Sadly that's not it.
Anders#
On stackoverflow you did not even include the full error message!

Anyway, I'm guessing CreateFile or CreateFileMapping are failing but I don't know why. Do you know if Jenkins uses job objects to limit the processes it starts? Might be a memory/address space limit, not a filesystem limit.

If I build a special 3.0 version for you with extra debug output, will you be able to test it?
CrazyDogGuy#
Sorry about not posting the full error message. I was getting a bit frazzled yesterday and in my haste to post... well, you know.

I'm not sure about Jenkins and Job Objects. I'd be happy to look at a debug version. Could it be a permissions problem? I'm not sure that's it but I'm grasping at straws trying to figure this all out.
TrifonovS#
Hi,
I'm getting the same problem. I use the last release version of NSIS - 3.01. The compiled installer's executable up to now was about 1,2GBs. No I added some more files and I expect to have a size about 3GBs. But during the compilation I get the following error:
Internal compiler error #12345: error mmapping datablock to 33606161.

Note: you may have one or two (large) stale temporary file(s) left in your temporary directory (Generally this only happens on Windows 9x).
I don't use Jenkins, I make manually compilation. Is this error expected if the size of the executable is above 2GBs? I thought that this limitation is fixed...
How can I solve the problem?
Anders#
Originally Posted by TrifonovS View Post
Hi,
I'm getting the same problem. I use the last release version of NSIS - 3.01. The compiled installer's executable up to now was about 1,2GBs. No I added some more files and I expect to have a size about 3GBs.
No it is not the same problem, look at the full error message! It is a related problem but not exactly the same.

The 2GiB limit is still there, use https://sourceforge.net/projects/nsisbi/ for larger files.
CrazyDogGuy#
Originally Posted by Anders View Post
If I build a special 3.0 version for you with extra debug output, will you be able to test it?
Hi Anders, do you have an ETA on a test build? I'm planning out the rest of my day 😉
Anders#
Originally Posted by CrazyDogGuy View Post
Hi Anders, do you have an ETA on a test build? I'm planning out the rest of my day 😉
Probably not today, hopefully tomorrow. You could try Process Monitor in the meantime...

---

Does the problem occur with just
OutFile test.exe
Section
File PTCS.PT
SectionEnd 
?
CrazyDogGuy#
Still happens with that really basic NSI:

Changing directory to: "C:\jenkins\workspace\CommandSecurity\deploy-bundler\install\win32\installer-pieces"

Processing script file: ".\deploy-bundler\install\win32\installer-pieces\bundleTest.nsi"
SetCompress: off
OutFile: "test.exe"
Section: ""
File: "PTCS.PT"
Internal compiler error #12345: error creating mmap the size of 71247351.
CrazyDogGuy#
AHA!

I figured out the issue. Somewhere buried deep in the Jenkins config, the Temp directory was getting overridden to a place on a D: drive. There is no D: on this system.

Thanks for your help, Anders.

CDG
TrifonovS#
Originally Posted by Anders View Post
No it is not the same problem, look at the full error message! It is a related problem but not exactly the same.

The 2GiB limit is still there, use https://sourceforge.net/projects/nsisbi/ for larger files.
I used the compiler from the link. Now I'm able to compile my installer. The size is 2,45GB. But when I start it, it shows the language selection dialog and when I click to the button OK, then the installer closes.
I made another test too. I compiled another very small installer. It was running with the original release of NSIS 3.01. But compiled with this compiler, it behaves in the same way. It closes after the language selection dialog.
Any ideas what I'm doing wrong?
TrifonovS#
I found the reason that my installer exits after the language selection. It is caused from my macro that checks if the installer was already started once. I don't know why it doesn't work now, but I will investigate it.
Meantime I saw another problem the bitmaps on the left side of some pages (for example on Welcome page) is missing. I had my own bitmaps, set until now like this:

!define MUI_LEFTIMAGE_BMP ".\Resources\Graphics&UIs\MyBitmap.bmp"
!define MUI_WELCOMEFINISHPAGE_BITMAP ".\Resources\Graphics&UIs\MyBitmap.bmp"
!define MUI_UNWELCOMEFINISHPAGE_BITMAP ".\Resources\Graphics&UIs\MyBitmap.bmp"
This worked with the release NSIS V3.01. Why it doesn't work with this special version?
TrifonovS#
Some additional information about my first problem. My macro uses the following code:
System::Call 'kernel32::CreateMutex(i 0, i 0, t "myMutex") i .r0 ?e'
Pop $0
And now the value returned in $0 is completely wrong. I tried ANSI and Unicode versions of the function, but both doesn't work. What could be the problem?
Anders#
?e puts error on stack on you are popping it into $0 where you tried to store the return value. And this is not related to the original problem, stop hijacking threads.