Hi all I'm running a Win32 application, Ecco Pro, under Wine on my Gentoo Linux system. The app is 'mostly working' but there are some circumstances where it repeatably crashes. I'd like to investigate further to see if I can improve things. I have an embedded systems & windows programming background, so I'm confident I have some of the skills; however I'm a novice on wine. I've made a start by running 'winedbg myapp.exe'. However when the crash occurs kWin, the window manager for KDE which I use, is what crashes. So I lose my winedbg terminal ;-(. I'm starting to read the Wine developer docs but wondered if someone could point me at a next useful step. Cheers Jon N
Duane Clark
2007-Mar-19 18:09 UTC
[Wine] Re: debugging an app which crashes my Window manager?
jkn wrote:> Hi all > I'm running a Win32 application, Ecco Pro, under Wine on my Gentoo > Linux system. The app is 'mostly working' but there are some > circumstances where it repeatably crashes. I'd like to investigate > further to see if I can improve things. I have an embedded systems & > windows programming background, so I'm confident I have some of the > skills; however I'm a novice on wine. > > I've made a start by running 'winedbg myapp.exe'. However when the > crash occurs kWin, the window manager for KDE which I use, is what > crashes. So I lose my winedbg terminal ;-(.Instead of running the app in winedbg, set the environment variable WINEDEBUG. Something like "export WINEDEBUG=+relay" (I don't use the bash shell, so am unsure of the syntax). This will turn on the "relay" debug channel. Now run the app, redirecting the output to a file. Something like "myapp.exe >& wine.log". This will write out to a log file. The log file will likely be quite large, possibly hundreds of MBs. It also will slow down your app, so be patient. Once everything crashes, I usually split the log file into many smaller pieces. Something like "split --bytes=2m wine.log". That will create a bunch of 2MB files. You probably want to see what was happening just before the crash. It might in the last file, but often a lot can still happen after a crash of Wine, so you might try seeing what files have the word "Exception". Something like "grep xception x*". If the last file or the file of interest is, say, xbc, then I will typically run it through a tool that comes with Wine, examine-relay. This will indent the file for you, which makes it easier to understand what is going on. Something like "/home/wine/tools/examine-relay xbc -f". The last "-f" parameter controls the formatting of the output. Just take a look at the output. If you have Windows experience, it should become quickly apparent what the output is telling you. Once you have narrowed the problem down to a particular area, you can change the WINEDEBUG environment variable to something that will give additional info.