On Linux, I have cross-compiled Minetest for Windows.
On Windows, when I run this version of Minetest, I got a crash:

This is what my debugger says:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
Z:\Documents and Settings\yugiohjcj\Desktop\usr\i686-w64-mingw32\games\minetest-0.
4.13\bin>gdb minetest.exe
GNU gdb (GDB) 7.11
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 "i686-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 minetest.exe...done.
(gdb) run
Starting program: Z:\Documents and Settings\yugiohjcj\Desktop\usr\i686-w64-mingw32
\games\minetest-0.4.13\bin\minetest.exe
[New Thread 3864.0xf1c]
Program received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()
(gdb) bt
#0 0x00000000 in ?? ()
#1 0x00992a85 in _GLOBAL__sub_I__ZN3irr3gui10CGUITTFont9c_libraryE ()
#2 0x008598c0 in irr::core::array<unsigned short, irr::core::irrAllocator<unsig
ned short> >::reallocate(unsigned int, bool) [clone .part.165] ()
#3 0x00000080 in ?? ()
#4 0x00000003 in ?? ()
#5 0x0000ffff in ?? ()
#6 0x000000b8 in ?? ()
#7 0x00000000 in ?? ()
(gdb) quit
A debugging session is active.
Inferior 1 [process 3864] will be killed.
Quit anyway? (y or n) y
This backtrace is not clear to me but maybe there is a problem about irrlicht and fonts, isn't it?
Hopefully, on Windows, the official binaries of Minetest work well.
I had the idea to remove one by one the DLLs of this official working version of Minetest letting Windows using my DLLs that I have cross-compiled on Linux for Windows in order to see if one of my DLLs could be the reason of the crash.
In fact, I try to reproduce the crash with the official Minetest binary and my DLLs.
I was able to remove progressively all the DLLs of the "bin" directory but freetype6.dll, libleveldb.dll, libstdc++-6.dll and zlibwapi.dll.
Indeed, I can't remove freetype6.dll because mine is named libfreetype-6.dll and so freetype6.dll is not found:

Also, I can't remove libleveldb.dll because it is a library that I was not able to cross-compile so I don't have it and if I remove it, libleveldb.dll is not found:

If I can't remove libstdc++-6.dll, it is because I get this error:

And if I can't remove zlibwapi.dll, it is because I get this error:

So, I was not able to test all my DLLs but a lot of them.
An interesting thing, is that now that I am using my DLLs, I can see this output while I am running the official Minetest binary:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
Z:\Documents and Settings\yugiohjcj\Desktop\downloads\software\Minetest\minetest-0
.4.13-win32\bin>minetest.exe
2016-03-21 16:15:40: ERROR[main]: Irrlicht: Compression mode not supported.
2016-03-21 16:15:40: ERROR[main]: Irrlicht: Error: Could not load built-in Font.
Did you compile without the BMP loader?
I have probably forgot an option when I cross-compiled irrlicht.
Anyway, do you see why my cross-compiled version of Minetest crashes on Windows?
Thank you.
Best regards.
Programs used:
- i686-w64-mingw32-binutils-2.26
- i686-w64-mingw32-curl-7.44.0
- i686-w64-mingw32-expat-2.1.0
- i686-w64-mingw32-freetype-2.4.10
- i686-w64-mingw32-gcc-5.3.0
- i686-w64-mingw32-gdb-7.11
- i686-w64-mingw32-gettext-0.19.7
- i686-w64-mingw32-irrlicht-1.8.1
- i686-w64-mingw32-libiconv-1.14
- i686-w64-mingw32-libogg-1.3.2
- i686-w64-mingw32-libvorbis-1.3.5
- i686-w64-mingw32-lua-5.1.5
- i686-w64-mingw32-luajit-2.0.4
- i686-w64-mingw32-minetest-0.4.13
- i686-w64-mingw32-mingw-w64-crt-4.0.5
- i686-w64-mingw32-mingw-w64-headers-4.0.5
- i686-w64-mingw32-openal-soft-1.17.2
- i686-w64-mingw32-sqlite-3.8.11.1
- i686-w64-mingw32-zlib-1.2.8
- i686-w64-mingw32-zlibwapi-1.2.8