Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I diagnose, debug MinGW-get GUI (guimain.exe) crashing?

Initially, I wanted to install the updated MinGW packages using the MinGW-get GUI, but it crashes when I choose "Mark All Upgrades" from the 'Installation' drop-down menu (whether I update the catalogue or not).

Now, I want to figure out why guimain.exe is crashing.

A screen capture of the MinGW-get GUI crashing on my computer

How can I diagnose and debug this persistent problem? I am vaguely familiar with GDB, but I've never used it. I am not committed to using the Visual Studio debugger.

I assume I need to use some ancillary binaries or debug libraries in the latest MinGW installer branch here: https://sourceforge.net/projects/mingw/files/Installer/mingw-get/mingw-get-0.6.2-beta-20131004-1/

Can anyone please guide me? Any assistance or suggested reading is appreciated.

like image 609
Mavaddat Javid Avatar asked Apr 08 '15 05:04

Mavaddat Javid


2 Answers

For those who are experiencing the crash on attempting to upgrade packages.. try running it in recursive mode..

mingw-get upgrade --recursive

that appeared to force an upgrade for me..

like image 90
archoo Avatar answered Sep 27 '22 22:09

archoo


I happen to have the same issue. The GDB way to debug this:

gdb mingw-get.exe

r upgrade (run with argument upgrade)

GDB will automatically stop at a SIGSEGV (Segmentation fault) signal, that's what happens for me.

bt (get a backtrace) For me this resulted in a huge backtrace, filled with calls to:

#5013 0x6f9cdda4 in mingw-get-0!_ZN14pkgXmlDocument19ResolveDependenciesEP10pkgXmlNodeP13pkgActionItem () from c:\MinGW\libexec\mingw-get\mingw-get-0.dll

It looks like a recursion problem that quickly filled up the call stack. Note that function name is mangled, and we don't know the line number. This is the best you can do without debugging symbols. If you have the debugging symbols, GDBs output becomes more useful. For most Linux-style packages, you can get the debugging symbols in a -dbg package named similiarly to the stripped binary package. However I don't see a debug package for mingw32-mingw-get in the listing.

like image 31
kcghost Avatar answered Sep 27 '22 22:09

kcghost