Step by Step Instructions for Debugging Minetest in Windows

User avatar
Neuromancer
Member
 
Posts: 793
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

Step by Step Instructions for Debugging Minetest in Windows

by Neuromancer » Thu Feb 07, 2013 03:40

I'm creating step by step documentation on how to debug Minetest on Windows.

Steps:
-Get Minetest to compile on windows. See my thread for instructions: http://forum.minetest.net/viewtopic.php?id=4665
-be sure to use debug mode (select Debug not Release in the dropdown on the top of the screen)
* One important thing we did there was create a directory something similar to C:\Users\x\Documents\Projects\Minetest44
This directory will be called DIR hereafter.
-to start debuging, right click the minetest project>Debug>Start New Instance
-Initially you will probably get the error:
"Unable To Locate Componenent" saying "This application has failed to start
because zlibwapi.dll was not found. Re-installing the application may fix this problem"
-To fix this copy the following .dlls to DIR\minetest\bin\Debug:
-DIR\libvorbis-1.3.3\win32\VS2008\Win32\Debug\libvorbisfile.dll
& libvorbis.dll
DIR\libogg-1.3.0\win32\VS2008\Win32\Debug\libogg.dll
DIR\irrlicht-1.7.2\bin\Win32-VisualStudio\irrlicht.dll
DIR\zlib125dll\dll32\zlibwapi.dll
-you will get a bunch of "Cannot open file of texture errors"
I see the textures in the below folder
C:\Users\x\Documents\Projects\Minetest44\minetest\games\minimal\mods\default\textures
but the minetest executable is moved from bin to bin\debug, so I wonder if that caused a problem.

-open main.cpp and put a breakpoint on line 79.
Settings main_settings;
-start hitting f11 to step into the code
-after a few times it will go into jmutex.cpp (this is a cross platform treading library)
-keep hitting f11.
-you will get the error: "there is no source code available for the current location."
-just set breakpoints one line down from this and hit f5 to continue past this
Last edited by Neuromancer on Sat Feb 16, 2013 14:15, edited 1 time in total.
 

User avatar
Jordach
Member
 
Posts: 4412
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Thu Feb 07, 2013 08:01

Neuromancer wrote:I'm creating step by step documentation on how to debug Minetest on Windows.

Steps:
-Get Minetest to compile on windows. See my thread for instructions: http://forum.minetest.net/viewtopic.php?id=4665
-you will probably get the error:
"Unable To Locate Componenent" saying "This application has failed to start
because zilibwapi.dll was not found. Re-installing the application may fix this problem"
-This isn't the best fix, but it does work:
-copy the following .dlls to c:\windows\System32
-C:\Users\x\Documents\Projects\Minetest44\libvorbis-1.3.3\win32\VS2008\Win32\Debug\libvorbisfile.dll
& libvorbis.dll
C:\Users\x\Documents\Projects\Minetest44\libogg-1.3.0\win32\VS2008\Win32\Debug\libogg.dll
C:\Users\x\Documents\Projects\Minetest44\irrlicht-1.7.2\bin\Win32-VisualStudio\irrlicht.dll
C:\Users\x\Documents\Projects\Minetest44\zlib125dll\dll32\zlibwapi.dll

I realize this is not the ideal solution. Does anyone have any better options than dumping the .dlls into System32 folder?
Drop them into minetest/bin. Silly neuromancer.

( ͡° ͜ʖ ͡°) ( ͡o ͜ʖ ͡o) [$ ( ͡° ͜ʖ ͡°) $] ( ͡$ ͜ʖ ͡$) ヽ༼ຈل͜ຈ༽ノ



My image and media server is back online and is functioning as normal.
 

rarkenin
Member
 
Posts: 668
Joined: Tue Nov 20, 2012 20:48

by rarkenin » Thu Feb 07, 2013 11:40

What about actual debugging, using a program such as gdb or OllyDBG?

Especially, where can I get debugging symbols?
Last edited by rarkenin on Thu Feb 07, 2013 11:40, edited 1 time in total.
Admin pro tempore on 0gb.us:30000. Ask me if you have a problem, or just want help.
This is a signature virus. Add me to your signature so that I can multiply.
Now working on my own clone, Mosstest.
I guess I'm back for some time.
 


Return to Minetest Engine

Who is online

Users browsing this forum: No registered users and 18 guests

cron