SoftwareNetwork / sw

Software Manager. Build System, Build System Generator and Package Manager. C/C++ and other languages. Tools and libraries for Software Management.
https://software-network.org
Other
118 stars 24 forks source link

sw: non-zero exit code: Exit code 0xc0000409 #41

Closed ghost closed 4 years ago

ghost commented 4 years ago

I'm trying to generate sln for https://github.com/tesseract-ocr/tesseract Command line: cmake .. -G "Visual Studio 16 2019" -A Win32 -DCMAKE_BUILD_TYPE=Release Full log: https://pastebin.com/nHs4EDb8

sw command: D:/sw-client/sw.exe -shared -platform x86 -compiler msvc-19.25 -d C:/Users/AlexandeR/Desktop/tesseract-master/Win32/.sw/cmake -config d,msr,rwdi,r integrate -cmake-deps C:/Users/AlexandeR/Desktop/tesseract-master/Win32/.sw/cmake/sw.txt -cmake-file-version 4 CMake Error at C:/Users/AlexandeR/.sw/storage/etc/sw/static/SWConfig.cmake:227 (message): sw: non-zero exit code: Exit code 0xc0000409

Call Stack (most recent call first): CMakeLists.txt:219 (sw_execute)

-- Configuring incomplete, errors occurred! See also "C:/Users/AlexandeR/Desktop/tesseract-master/Win32/CMakeFiles/CMakeOutput.log".

egorpugin commented 4 years ago

Can you try sw --self-upgrade and try it with new binary?

ghost commented 4 years ago

The result is same

C:\Users\AlexandeR\Desktop\tesseract-master\Win32>sw --version sw.client.sw version 1.0.0 git revision 37cfa3b21de687365b166d75d7838bbc1f7005ce plus 3 modified files assembled on 17.05.2020 16:22:03 UTC 17.05.2020 19:22:03 Oeieyiaey (eaoi)

egorpugin commented 4 years ago

What it your OS version?

ghost commented 4 years ago

Windows 10 x64 1909 (build 18363.836)

ghost commented 4 years ago

Log with -trace param https://pastebin.com/YtHQFNAC

egorpugin commented 4 years ago

Can you check memory usage? How much memory do you have? Maybe sw goes out of memory?

ghost commented 4 years ago

I have 16GB ram. memory usage about 4gb

egorpugin commented 4 years ago

No ideas at the moment. I'll think.

egorpugin commented 4 years ago

Please, try following:

Run sw --self-upgrade.

Run failing command taken from cmake error with first argument -internal-with-crash-server=0.

So, D:/sw-client/sw.exe -shared -platform x86 -compiler msvc-19.25 -d C:/Users/AlexandeR/Desktop/tesseract-master/Win32/.sw/cmake -config d,msr,rwdi,r integrate -cmake-deps C:/Users/AlexandeR/Desktop/tesseract-master/Win32/.sw/cmake/sw.txt -cmake-file-version 4 will become D:/sw-client/sw.exe -internal-with-crash-server=0 -shared -platform x86 -compiler msvc-19.25 -d C:/Users/AlexandeR/Desktop/tesseract-master/Win32/.sw/cmake -config d,msr,rwdi,r integrate -cmake-deps C:/Users/AlexandeR/Desktop/tesseract-master/Win32/.sw/cmake/sw.txt -cmake-file-version 4

It will write (hopefully) crash dump into c:...\temp\ dir. Post that crash dump here.

ghost commented 4 years ago

sw folder was created in temp directory but without crash dump

ghost commented 4 years ago

Two months ago I already used sw to build tesseract and all worked. Yesterday I'm tried to build tesseract again, but "sw setup" failed due to ssl error. I updated sw with sw --self-upgrade and thereafter build always failed with 0xc00000409

egorpugin commented 4 years ago

"sw setup" failed due to ssl error

This was fixed.

ghost commented 4 years ago

I know. I mean, there was no 0xc0000409 error before updating

egorpugin commented 4 years ago

When you see the error, does windows suggest to report a problem? If yes, I think you can create dump via task manager.

ghost commented 4 years ago

does windows suggest to report a problem?

No

egorpugin commented 4 years ago

Try with -sd arg: D:/sw-client/sw.exe -internal-with-crash-server=0 -shared -platform x86 -compiler msvc-19.25 -d C:/Users/AlexandeR/Desktop/tesseract-master/Win32/.sw/cmake -config d,msr,rwdi,r integrate -cmake-deps C:/Users/AlexandeR/Desktop/tesseract-master/Win32/.sw/cmake/sw.txt -cmake-file-version 4 -sd

I've updated sw packages, maybe there is abi mismatch somewhere.

ghost commented 4 years ago

Not working. Dump wasn't created

egorpugin commented 4 years ago

Is it possible to check the issue via teamviewer or chrome remote desktop?

Or you can try to run sw command with -sleep 10 argument, in VS attach to process and then when issue occurs, VS will show call stack.

ghost commented 4 years ago

image

egorpugin commented 4 years ago

Yes, and exactly in this moment you can try to record dump in task mgr.

Or... Download symbols (.pdb): https://www.dropbox.com/s/yqody5qgkdj7bn2/sw.client.sw-1.0.0.pdb.7z?dl=1

Rename sw.exe to sw.client.sw-1.0.0.exe, place that pdb near exe, re-run those steps. VS will show now normal function names.

ghost commented 4 years ago

PDB that your gave doesn't match git revision 60f434f033563e4c81c61ec1462d62c6b8e00afc Anyway i'm already uploading dump

ghost commented 4 years ago

https://www.dropbox.com/s/8gdbhk9fh8ss7ou/sw.client.sw-1.0.0.DMP?dl=0

egorpugin commented 4 years ago

Thank you! Try this fixed binary. https://www.dropbox.com/s/v87ee3d5csev1bp/sw.client.sw-1.0.0.exe.7z?dl=1

ghost commented 4 years ago

Same, wait 5 minutes, i will upload dump

ghost commented 4 years ago

unhandled exception at (ucrtbase.dll) 0x00007FF86767DB9E https://www.dropbox.com/s/qyt1pkcc2t6enol/sw.DMP?dl=0 image

egorpugin commented 4 years ago

Ok, the problem is clear now. Cl.exe prints russian characters (non-utf8), and they are tried to be saved into json in dtor. Json throws an error then. I'll ping when it is fixed.

egorpugin commented 4 years ago

Try this one https://www.dropbox.com/s/tyclsld5wn0hgnf/sw.client.sw-1.0.0.exe.7z?dl=1

ghost commented 4 years ago

0xc0000409 https://pastebin.com/4FJdLxhw

egorpugin commented 4 years ago

Ok, fixing further...

egorpugin commented 4 years ago

This one? https://www.dropbox.com/s/3vrlq9qiifjlwrz/sw.client.sw-1.0.0.exe.7z?dl=1

ghost commented 4 years ago

Seems like its working.

charmainewee commented 4 years ago

Hi,

I'm facing the same problem except I'm trying to build Leptonica (the Tesseract dependency). Could you upload/send the fixed binary again so I can try it? The dropbox link returns a 404 error.

Thank you!

egorpugin commented 4 years ago

Done. Use sw --self-upgrade.