Closed akavel closed 2 years ago
Fun, can you gdb it?
Initial quick run with gdb below, what I could squeeze today morning. I don't know gdb well and how to use it with Nim, but I'll still try to find time to build choosenim repo with --debugger:native
, I assume that can give some more info.
If you could give me some suggestions on what commands I should use to find out the position & more info about the crash, would be very helpful and make it possible for me to easier & sooner find a window of time to do that.
C:\dnload\nim-etc\choosenim-0.4.0_windows_i386\choosenim>gdb --args choosenim update stable
GNU gdb (GDB) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-w64-mingw32".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from choosenim...done.
(gdb) run
Starting program: C:\dnload\nim-etc\choosenim-0.4.0_windows_i386\choosenim\choosenim.exe update stable
[New Thread 11844.0x1798]
warning: `C:\windows\SYSTEM32\ntdll.dll': Shared library architecture i386:x86-64 is not compatible with target architecture i386.
warning: `C:\windows\System32\wow64.dll': Shared library architecture i386:x86-64 is not compatible with target architecture i386.
warning: `C:\windows\System32\wow64win.dll': Shared library architecture i386:x86-64 is not compatible with target architecture i386.
warning: `C:\windows\System32\wow64cpu.dll': Shared library architecture i386:x86-64 is not compatible with target architecture i386.
[New Thread 11844.0x1c40]
[New Thread 11844.0x12a4]
[New Thread 11844.0x688]
Updating stable
gdb: unknown target exception 0xc0000008 at 0x6a29feba
Thread 1 received signal ?, Unknown signal.
0x0009d978 in ?? ()
(gdb)
For now, quick googling seems to suggest 0xc0000008 means "An invalid handle was specified".
When trying nimble build
in choosenim's repo, for v0.6.0, I'm getting a Windows dialog reporting an error in toast.exe, localized text translating more or less to "cannot find object libgcc_s_seh-1.dll" :/
... # Including library C:\Users\Mateusz\.choosenim\toolchains\mingw64\x86_64-w64-mingw32\lib\libiconv.a
... # Overriding stat dev_t mode_t
... # Overriding BY_HANDLE_FILE_INFORMATION
... # Importing "C:\Users\Mateusz\nimcache\nimterop\nimarchive\libarchive\LibArchive\include\archive.h, C:\Users\Mateusz\nimcache\nimterop\nimarchive\libarchive\LibArchive\include\archive_entry.h"
... stack trace: (most recent call last)
... C:\Users\Mateusz\.nimble\pkgs\nimterop-0.6.8\nimterop\cimport.nim(632, 23) cImport
... C:\Users\Mateusz\.nimble\pkgs\nimterop-0.6.8\nimterop\cimport.nim(138, 11) getToast
... C:\Users\Mateusz\.choosenim\toolchains\nim-1.2.0\lib\system\assertions.nim(29, 26) failedAssertImpl
... C:\Users\Mateusz\.choosenim\toolchains\nim-1.2.0\lib\system\assertions.nim(22, 11) raiseAssert
... C:\Users\Mateusz\.choosenim\toolchains\nim-1.2.0\lib\system\fatal.nim(49, 5) sysFatal
... C:\Users\Mateusz\.nimble\pkgs\nimarchive-0.5.2\nimarchive\archive.nim(61, 10) template/generic instantiation of `cImport` from here
... C:\Users\Mateusz\.choosenim\toolchains\nim-1.2.0\lib\system\fatal.nim(49, 5) Error: unhandled exception: C:\Users\Mateusz\.nimble\pkgs\nimterop-0.6.8\nimterop\cimport.nim(138, 16) `false`
... [AssertionError]
@genotrance can you help out here?
I fixed nimterop by setting -static - that way, the binary won't need the DLLs in path. However, we need to figure this out for choosenim as well.
Give this another try. Choosenim is no longer statically linked on Windows.
Running
choosenim update stable
prints onlyUpdating stable
and immediately quits 😢