Debugging Wine Examples

From Wine-Wiki.org
Jump to: navigation, search

Contents

Examples and suggestions for Debugging Traces

Getting Started: To help you debug your software, here are examples drawn mostly from the Archives. see also Reading Debug Trace Examples. Note that this is not advice nor is it official documentation. Wine moves so fast some of this will be out of date, but you may find it helpful to get started..

Often you will see requested WINEDEBUG=+seh,+relay,+tid Jeff explained: the seh is an indicator of where to look in the relay log and the tid lets you focus on just the thread that the exception occurs in. Winehq Bugzilla entry 18400 [ed. watch out, it is case sensitive]. This can also used according to Winehq Bugzilla entry 21605 if the application is raising a C++ exception [feb 10].


Window Messaging

When asked if it were possible to trapp and spit to stdout all the window-related event messages that are being sent to an app (I suppose it'd also be useful to be able to dump all window flags at the same time) [to a log file in /tmp/] V. Margolen replied: Yes [it is possible]

[Apr 09] I've found few visual glitches in comctl32/toolbar, and now try to write this all down as conformance tests, but I have some problems. I see that there is bug, when I test it with control spy. But when I repeat it in testcase, it won't work.

TB_SETBITMAPSIZE does some work in WM_PAINT. You could try add some UpdateWindow(hToolbar) calls after TB_SETBITMAPSIZE or TB_SETIMAGELIST - maybe this will change something? (of course, another possibility is that this behaviour is a side-effect of some other messages or some parameters. On Wine, you can use WINEDEBUG=+message to get the tree of messages that have been sent).

Windows Message Box

A programmer reported [Oct 06] a Run-time error '445' Object doesn't support this action in a message box. I click OK (the only choice) and the app dies.A winedbg breakpoint on MessageBoxA does not trigger. [...] I don't seem to be able to get it to stop in a useful breakpoint[...] Break)nFirstChance is 0 as if it's 1 there are sooo many stops and so little progress...Anyone with a clue about this? I'd appreciate any hints wine archive.

M. Hearn: I usually do a +msgbox,+ole,+olerelay trace to get a basic idea of what's going on here, moving up to +relay if necessary. If it's Visual Basic stuff most likely you can see what's going on by monitoring OLE Automation E. Pouch: does a breakpoint on MessageBoxW works better (or CreateWindowExW) ?

Windows

A programmer reported trying to debug an application (Net Support Manager) that has trouble displaying a window in fullscreen mode. NSM enables you (among other things) to remotely look onto somebody else's Desktop, a bit like VNC or NX.

D. Timoskov: upload a +win log [...] What's your screen resolution and WM? Are you using Wine from today's Git or any other version? wine archive

Wineserver

A user reported wineserver crashing with WinSCP [Jun 07 winebugs]. A. Julliard: Please enable coredumps (ulimit -c unlimited) and get a backtrace of the crash.

Menus

With the integration work of wine, it works well with your favourite system.

Winehq Bugzilla entry 16279 Menus don't come from ~/.local/share/desktop-directories. Files under ~/.config/menus/applications-merged/wine-*.menu link in ~/.local/share/desktop-directories/* and .desktop files from ~/.local/share/applications/wine/*. Check all those exist.

Also [check] the value of your ${XDG_CONFIG_HOME} environment variable, if any. If all of those seem ok, please find some app you know install these broken menus, and post [into a bug report] the output of: WINEDEBUG="+menubuilder" wine <installer.

Video

DirectX

S. Dossinger: If you assign the bugs to directx->ddraw or directx->d3d8/9 I will find them again at latest when I've run out of open bugs and search for new work :-) wine archive

Direct3D

A post to the list speculated that their software might be multithreaded.

S. Dossinger: A +ddraw, +tid trace might be intersting. See if there are any thread changes in the list of the ddraw calls. wine archive


Winehq Bugzilla entry 21515 WINEDEBUG=+wgl,+wgldiag,+d3d,+d3d_caps wine ... That underscore is important.

[Jan 10] One user wrote Winehq Bugzilla entry 21426 it's the third time a regression causes Fallout Tactics not to start in fullscreen. Really strange bug. H. Verbeet: That probably just means it's one of those applications that's sensitive to the exact sequence of window messages sent during Direct3D setup. Do you happen to know if this game uses ddraw or d3d8/d3d9? Running with WINEDEBUG="+ddraw,+d3d8,+d3d9" might help if you don't know. Does this game have a demo with the same issue?

OpenGL

A user made a good recommendation for when you find a bug with your favourite application as nvida drivers have been mentioned as the cause of at least one problems.

D. Skorka [Dec 2006]: Before you post a bug, try a simple app that uses D3D or OpenGL under wine. Only if thas works should you file a bug report. This should include a WINEDEBUG=+opengl,+wgl,+d3d report as an attachment.

A. Plesch [Nov 2006] reported: I found glview at http://www.realtech-vr.com/glview/ [...]. Do you know of a working test app that does windowed opengl ?

D. Skorka: Well, http://www.humus.ca/ has some nice demos which run in a window (although it's just the 3D window, no buttons or such around it). Look for the Cloth demo, it has quite low requirements in comparison to some others.

A. Plesch: I also found a qt based 3d mesh viewer at http://mview.sourceforge.net/ which has a menu and toolbar. I can run it under wine, and the 3d area is shown with the loaded mesh. The menu and toolbar get hidden as soon as I update the 3d area by moving the displayed object. This is workable, and not the same behaviour I experience with my problem app. Also, I downloaded qt for windows from http://www.trolltech.com/developer/downloads/qt/windows The .exe version installs nicely under wine. I could get the supplied grabber.exe demo to run after copying some needed libraries to where wine can find it. grabber.exe is opengl demo app with a menu. It exhibits the same behaviour as mesh viewer, eg. overdrawn menus but overall workable.


A user reported a possible Open GL Problem [Sept 06]:

R. Colenbrander asked for: WINEDEBUG=+wgl,+opengl wine appname.exe and pipe the output to a log file. This way I can figure out what's going on. Further the output of glxinfo would be [good] as well wine archive

Regression testing found an Open GL patch the resulted in a crash with a popular game. The crash happens in ntdll in HEAP_CreateFreeBlock. The call trace shows EDIT_MakeFit on wine/dlls/user/edit.c as the function which calls the heap functions. The crash only occurs if the game's configuration file exists, so the first start succeeds, but the following calls fail. I've attached 3 +opengl,+edit traces:


A user reported: Any call to glBegin(GL_Something) crashes in the libs of my OpenGL driver(ATI fglrx) due to some NULL pointer access


A user [Nov 05] reported a crash running doom3 but noticed: when i run it like this: WINEDEBUG=+relay,seh wine doom3.exe 2>/dev/null the app comes up just fine

Raphael: seems a race problem[...] can you try to provide a WINEDEBUG=+tid,+opengl,seh wine doom3.exe log ?

WGL

A user [Sept 06] reported a problem and thought he had tracked down the patch. Roderick: run the programs using WINEDEBUG=+wgl appname.exe

OLE

If your program used to work when Wine used the MS DLLs for DCOM, but then stopped working with Wines DCOM DLLS. Then the difference may be because of ole.

Run-time error '13'
Type mismatch

M. Mohr [July 05]: This error message sounds a lot like an OLEAUT32 related error (it's a visual basic program, I suppose). To identify the problem [this] should be helpful. Wine Archive


A Programmer noted when working with a program: the mapsys32 dll appears to be attempting to load a FONT.FNT file. Strace shows it being opened. The mapsys32.dll file is being loaded (WINEDEBUG=+relay shows it) The mapsys32.dll does not implement DllRegisterServer (regsvr32 says so).

how can I see what is going on with mapsys32.dll?

M.McCormack: If it can't load a file, then I'd suspect ole storage or OleFont. Try a +olerelay,+storage,+relay trace. Try to pinpoint the failure (ie. where it starts doing HeapFree(), DestroyWindow(), ExitProcess, etc, then work back from there. Try see if there's a StgOpenStorage/StgCreateStorage call, or perhaps if the IOleFont object is being used.

Calls to ole interfaces don't show up in with a +relay trace, so you need +olerelay (which only shows up if somebody put a TRACE_(olerelay) macro in the ole functions).

The other thing to try is a +relay,+snoop trace, which will show you the entry points being called in mapsys32.dll. Wine Archive


InstallShield

R. Shearman: In order for the logs of [InstallShield] types of programs to make sense, you really need to give me one with +ole,+olerelay,+seh,+tid options.

R. Shearman advised someone with an install that failed that some of the error traces with CLSID's could be important: The traces have a couple of error messages caused by missing registry entries. These may or may not be expected. I would maybe suggest

MSI

err:msi:call_script Could not find CLSID for Windows Script

J. Hawkins [May 08 bug 13472]: Install wsh and jscript.

Winehq Bugzilla entry 18070 I'd like to see a +msi,+relay,+seh trace. Custom actions execute arbitrary code, so +msi may not reveal enough information.

Clipboard

A poster asked: Is there a kind of WINEDEBUG option to track what happens when copy/paste in application? On the other side I saw a lot of applications by which the copy/paste does not work. It seems to be a much bigger issue than assumed.

U. Czekalla [May 06] wine archive:

Dimi Paun: http://wiki.winehq.org/CopyAndPaste D. Timoshkov: tests [are found in] dlls/user/tests/clipboard.c?

Printing

Printing Fonts

A user said [Sept05]: I want to change the default font that the postscript driver uses.

D. Riekenbug: This depends on which Fontname / FontFamily your app is using.Start with:

and search for "PSDRV_SelectFont" Wine Archive

Printing Dialog Box

Winehq Bugzilla entry 17320 feb 09: Endicia's DAZZLE envelope manager software (prints postage from USPS.com) crashes when you go to the print postage dialog. Note, it's a dialog prior to the actual printing, where you specify package attributes, mailiing class, etc.

Vitamin: Please attach output without stripped binaries. Also add +propsheet debug output (separate file please).

Fonts

A User reported a difficulty with his software causing a segfault. Turning off client font rendering prevented the crash. He posted a trace to the list. wine archive

Com Ports

USB

L. Rayhen [Oct 07] Currently you can use only ttyUSB devices. So if your device can be found somewhere in /dev/ with name ttyUSB? (where "?" is a number) than there is good chances that you can make it work with native (Windows) program. If your USB device doesn't represent itself as tty device then you will not be able to use it with Windows software on WINE.

Serial

vitamin [ jul 08] Assuming you have real com devices (not usb) [add the com ports so they are visible to wine]:

ln -s /dev/ttyS0 ~/.wine/dosdevices/com1 
ln -s /dev/ttyS1~/.wine/dosdevices/com2 
ln -s /dev/ttyS2 ~/.wine/dosdevices/com3 
ln -s/dev/ttyS3 ~/.wine/dosdevices/com4

Then make sure that all of those /dev/ttyS? "files" are accessible by your user.

U. Bonnes who has done some work for com ports added: Simple reads and writes to the serial port should succeed, and most of the contol possibilities that the Win32 API offers should work too. So either your program uses soemthinhg unusual and not yet implemented, or you setup doesn't work. Again WINEDEBUG=+relay and a search where ther error is displayed and what goes wrong before might get you starting.

Networking

A programmer reported I am using version 1.2 (not 2.0) of Wap Proof. The install is fine and the emulator can load WML files which are on the hard drive. However whenever it accesses the internet to fetch a WML page over HTTP it crashes reliably in wininet.dll. This is a Unicode application, so it uses all the *W functions in this DLL.

R. Shearman: +wininet log and a backtrace to this list wine archive.

[ed after a crash, type bt in the debugger.]


A user was trying to debug his database on a network. K. Blin [aug 08 wine devel]: If your software really is trying to use winsock to access the database, try running it with "WINEDEBUG=+winsock wine app.exe" to log the winsock calls that are being made.

VB


A user reported [Nov 05] a program would run using the native ms version of msvcrt, yet fail with wine's builting version.

R. Shearman: Compare how the msvcrt calls are handled step by step. Tedious, but promising... [The discussion covered reading the traces] wine archive

and

Speeding up Wine

A user wrote: Profiling shows that there are a lot of "HeapAlloc" and shouldn't be. (Please take a look in the profiling logs in one of my previous mails)

L. Rayhen: That's because this problem is "hidden". For example if poor performance is because of HeapAlloc() calls then this isn't useful information by itself - we need to know what function is calling it so much times! What to do next? Try to find out what functions are calling HeapAlloc() and how much times. How? Use Valgrind. Generally Valgrind is excellent and useful tool but unfortunately it is *terrible* for profiling DirectX games (not only because of big overhead but it also may crash or prevent a game from working correctly). However even if it fail to work perfectly it *may* give some useful clues in its logs. Install recent Valgrind and run your game like this:

rm -f callgrind.out.*; valgrind --trace-children=yes --tool=callgrind game.exe

If you cannot exit from game correctly kill it (the game *not* Valgrind). Then open non-empty callgrind.out.* files (for simple single-process games without threads you will have one big callgrind.out.*) in kcachegrind. Please note that kcachegrind can open only one file at a time (but you can open multiple instances of it of course). Now (hopefully) you can view visualized "Call graph" for any CPU-time expensive function and you can easily find out what procedures are calling it. If you will post any callgrind.out.* files make sure to compress them with bz2. If Valgrind fail to work for you, try to use OProfile to create call-graph. Personally, I never did this but I can give some useful links:

This is what I found after quick search. I've never used OProfile for creating call-graphs so I don't know how useful they are in practice. At least call-graphs from Valgrind are very useful but as I said it may not work for some games at all.

Most important results are from application itself (*.exe process) and its threads not from wine/wineserver. BTW, you incorrectly compiled WINE. From your gw_wine-preloader.log:

...
5205      
0.1676  winex11.drv.so           (no symbols)
4762      0.1533  winealsa.drv.so          (no symbols) ...

That means you have no debugging symbols! Make sure to recompile WINE with "-g" option.

see also

Heap


err:heap:HEAP_ValidateInUseArena Heap 0x41a20000: in-use arena 0x41a2c408 next block has PREV_FREE flag

M. Meissener: You need to find out the actual heap corruption.Please run with

WINEDEBUG=+relay,+heap WINEDLLOVERRIDES="comctl32=n" wine Download/Warblade_12E_full. exe > logfile 2 > &1


And check logfile at the place of the actual heap corruption.[...] Look/grep for "err:heap" in the output. There should be a large dump of heap entries right before or after it. [Wine Developers] mostly need the "relay" traces before that, 500 lines or so. Wine Archive

[Ed. this will dump a big file... one user said his trace produced a 171M log file]


A user reported an error:

VirualAlloc heap reserve failed
Not enought memory to run program

M. Hearn [Sept05] Can you upload a +virtual trace somewhere please? Wine Archive


M. McCormack: If you want to try to debug the problem yourself, search backwards in the trace from the point of the crash and look for HeapAlloc and HeapFree calls that are using a similar address, give or take 0x100 hex. To do that, I use "less" and the first 6 digits in the address like: ?401234

You can also try a +relay,+heap trace. That might give you a heap error a little earlier and help narrow down the problem.

F. Gouget: You can post the trace on a website and add a link to bugzilla if you need to. Compress the trace with either 'bzip2 -9' or 'gzip -9' before putting it on a web site. That should bring it to well under 10MB which makes it more manageable. Wine Archive

Version

Unhandled Exception: System.InvalidOperationException: OSVersion's call to GetVersionEx failed.

Vitamin [feb 10]Can you look at +ver debug channel it might show what's going on.

Valgrind

Some progress has been made with wine and valgrind. Wine moves so fast some of this will be out of date.You are welcome to help update it. Update Jun 08 D. Kegel has started adding tips to this page. http://wiki.winehq.org/Wine_and_Valgrind

D. Kegel Wine-devel Nov 07 Updated instructions on how to run tests under Valgrind are online at http://wiki.winehq.org/Wine_and_Valgrind Daily results of running the entire conformance test suite under Valgrind, including diffs from previous run, are online at http://kegel.com/wine/valgrind/

A lot of the warnings are probably just problems in our conformance tests, not in Wine, and several might be problems in Valgrind, but dozens are probably real Wine bugs, so please take a look. Dan is looking for someone to take over the task of doing the daily runs.

It's especially useful to look at the diffs from the previous run, since that makes the new warnings stick out like sore thumbs; volunteers scanning for new errors should notify the author of the code in question while it's still fresh in his mind.

Detailed instructions on how to interpret the results were posted to Wine-devel on 7 Dec 07


D. Kegel [feb 08 wine devel]: the Valgrind developers finally merged the Wine support patches! I just built Valgrind from svn as described here: http://valgrind.org/downloads/repository.html and on a fresh install of Gutsy, it just worked, no patches. To run Valgrind's tests under Wine, I configure valgrind with --prefix=/usr/local/valgrind-svn, then do something like

cd wine-git/tools
w get http://kegel.com/wine/valgrind/runtests.patch
w get http://kegel.com/wine/valgrind/valgrind-daily.sh
w get http://kegel.com/wine/valgrind/valgrind-suppressions
w qet http://kegel.com/wine/valgrind/valgrind-split-pl.txt -O valgrind-split.pl patch -p2 < runtests.patch

Then to run all the tests, I do

cd ~/wine-git
sh tools/valgrind-daily.sh

or to run just one test, I do

export RUNTEST_USE_VALGRIND=1
cd ~/wine-git/dlls/riched20/tests
make test

I've only verified that this works well on one machine so far, but I have high hopes. Anyone else feel like giving it a whirl?

Valgrind Example

D. Kegel: here's how I ran word viewer under valgrind:

wordview.sh:

WINEDIR=$HOME/wine-git;
VALGRIND_CMD="/usr/local/valgrind-3.2.3-wine/bin/valgrind --trace-children=yes --gen-suppressions=all --suppressions=$WINEDIR/tools/valgrind-suppressions --leak-check=full --num-callers=20 " 
WINE=$WINEDIR/wine
w get http://downloads.pcworld.com/pub/new/business/word_processing/wordview.exe
c p wordview.exe ~/.wine/drive_c/wvinstall.exe 
m v ~/.wine/dosdevices/z: ~/.wine/dosdevices/oldz 
c d ~/.wine/drive_c
$VALGRIND_CMD $WINE wvinstall.exe /q
c d ../..
m v ~/.wine/dosdevices/oldz ~/.wine/dosdevices/z:

Further Reading


Valgrind Wine List Notes

Note: Wine and Valgrind are in constant development. This is merely a starting point for further research. Keep in mind that this information may quickly become out of date.


A user reported an error trying to run valgrind:

Memcheck: mc_main.c:817 (get_sec_vbits8): Assertion 'n' failed. Memcheck: get_sec_vbits8: no node for address 0x6032050 (0x6032054)

D. Kegel Jun 09 wine devel: You're using an old version of Valgrind, and wine is blowing its little mind. Please switch to building Valgrind out of svn; see http://wiki.winehq.org/Wine_and_Valgrind

wine: could not load L"C:\\Programme\\cod4\\iw3sp.exe": Ung�ltige Adresse

D. Kegel jun 09 wine devel: Sounds like maybe John Reiser's fixes might be needed for this app.

Stack

WINEDEBUG=+relay,+seh output would be helpful here. The problem itself is a stack overflow I think....Wine Archive Link


A Stack problem can at first seem akward to troubleshoot as one experience showed with a 16bit windows app, however with patience and a bit of time you can narrow things down. The user wrote: The problem is ...

If I run the application, it just hangs - no overly helpful informationat all. If I add WINEDEBUG +relay trace, it runs ok :-) (Workaround...!) If I add anything else on WINEDEBUG other than relay, it fails and running under winedbg didn't help at all - I could code to stop it before the hang but it wouldn't step through to the failure. Attaching to the hung process shows code in 16 bit user app, and winedbg didn't overly help there either

So - I've [...] got to the point of failure with the add of debug tracepoints and comparing the relay with the debug statements. Now the odd bit!

If you look at dlls\user\wnd16.c, routine RegisterClass16 the final line is:

return RegisterClassEx16( &wcex );

If I change this to

fred = RegisterClassEx16( &wcex );
TRACE("Here... %d\n", fred);
return fred;

it all works.....! How can I debug this further?

J. Hawkins: This sounds like the stack is getting trashed. [If the app is crashing but] when randomly added functions make it not crash [then the stack being trashed is usually the case]. You want to look for places where local variables (on the stack of course) are being overwritten. A good example of this is copying a larger string into a smaller local char array. When looking for a stack crasher, I comment out huge sections of code until it doesn't crash anymore, and then piece by piece uncomment the next function. For example,

void foo()
{
#if 0
a();
b();
c();
#endif
}

doesn't crash, but

void foo()
{
a();
#if 0
b();
c();
#endif
}

does crash, then your culprit is in a(). Then you recurse into a() and repeat the process all over again till you find the stack crasher.

[with your application] by hanging I'm assuming it's stuck in the code somewhere [...] It might not be the case then that the stack is getting trashed, though you can still use the debugging technique mentioned.

The user modified the routine ([..]to allow code before the return)

ATOM WINAPI RegisterClass16( const WNDCLASS16 *wc )
{
WNDCLASSEX16 wcex;
ATOM fred;
wcex.cbSize = sizeof(wcex);[...]
fred = RegisterClassEx16( &wcex );
return fred;
}

This fails for the application as it stands.

Adding in [an unused] char temp[8]; before the WNDCLASSEX16 and it still fails, Adding in char temp[9]; and the program starts working... Adding in char temp[9]; after the WNDCLASSEX16 and it still fails, So that would agree heap corruption of some sort

J. Hawkins agreed: Stack corruption :) The hard thing about stack or heap corruption is that it's seemingly random and can crash at any point (more or less). I would focus on finding which variable is being overwritten.[...] look for variables allocated on the stack (especially strings or arrays) and make sure they never get overwritten.

The user tried: DebugBreak before and after the RegisterClassEx16 call with no temp defined [but] Stacks [were] identical as far as winedbg traces (0x60 bytes)

R. Klazes: This winedbg stack trace (info stack) is equivalent to the examine command:

x /24x $esp

(24 words == 0x60 bytes). Change the repeat count from 24 to what you want. If there is a stack corruption, this way you can find out where and then you can add a watch point on it.

File Operations and debug channels

A programmer reported problems [Jun 06] while running his VC6 software with file sizes greater than 4gb. He asked: Is there a problem with WINE itself handling very large file sizes?

M. Meissner: It always depends on what functions it uses. Not all places in WINE might be working for files larger than 4GB. Can you give us +relay,+file traces of such failures?


A user reported his software cannot open a DVD anymore

V. Morgan [Aug 05]: Could you add +aspi trace log to your bug report?

A user reported difficulty with an app: it cant find a dll that is in the current directory from which I ran the wine command. It fails with "cant find nstex50.dll".

ls -ail nstex50.dll provides the following output:
407904 -rw-r--r-- 1 wino users 184370 Feb 13 2003 nstex50.dll

A. Mohr: You want WINEDEBUG=+dll,+loaddll,+module,+file,+relay Wine Archive


Wine Eject

C. Costa explained what he used for debugging wine eject [Nov 05]: wine archive

The Registry

A users game failed to start, and required DirectX. He wondered: [Sept05] Is it possible that there needs to be a registry key set to trick the game into thinking DirectX 8.0 is installed so that it will at least attempt to load the renderer? I have a feeling that it's dying before it initializes anything at all, that it is just doing a simple check for DirectX and then bailing out when it doesn't find it.

M. Hearn: That sounds possible. Do a +reg,+file trace then analyse it to find out.Wine Archive

The user reported that to send the data to a file he used the following:

[Jun 06] A programmer asked: Is there a way to watch just the registry read/write ?

M. Hearn: You want

Note that you redirect stderr not stdout. wine archive

Keyboard

A user: When I run 3d applications my keyboard will not respond, however in 2d applications such as notepad I get the same error messages however the keyboard will type (such as in notepad.exe).

S. Petreolle: The thread you are linking to talks about an app that uses dinput.

The user tried: WINEDEBUG="dinput" Wine Archive


Winehq Bugzilla entry 19486 [Jul 09] +keyboard log is almost always useless. +event,+x11drv,+keyboard,+key is what you need to look at.

International Keys

a program maintainer noticed a bug with wine and umlauts [Feb 06]: how [does] wine gets the keyboard events, or what happens in wine when users presses keys? wine archive

M. Meissner: It reads raw X events, and translates them multiple times between different representations (X keycodes, scancodes, windows virtkeys).[...] see if there is any useful debugging info (check what happens when you type an umlaut).You could run with:

WINEDEBUG=+key,+keyboard wine program.exe

Agaro [Mar 06]: Trace ($ WINEDEBUG=+key wine winecfg) of NumPad Delete key with NumLock key activated: wine archive

A programmer [Jun 06]wondered if it would seem: better to represent international characters with escape sequences, both to increase clarity - especially for those who do not normally use ISO-8859-1 encoding - and to make editing easier for some.

D. Timoskov: Please don't do that. Anyone who wants to edit keyboard tables should set editor to ISO-8859-1 encoding. Otherwise it becomes really hard to add new tables or fix existing ones by just comparing or even copy/pasting from the +key log. wine archive

A user wrote:I use Lithuanian keyboard layout on my gnome desktop and it doesn't properly "translate" some of the non-latin letters (like '???????'). When I press one of those MS Word shows 'a/A' instead of '?/?', 'c/C' instead of '?/?', etc. Letter [??], though is mapped correctly. Same things happen for capital letters too.

D. Timoshkov: Make sure that your locale and X11 keyboard layout are set correctly. Usually +x11drv,+key,+keyboard,+event log helps to debug the problems wine archive

Controls - Comctl32 and others

A user reported that the TreeView widget (from comctl32.dll) (from the main window of the program), that is not fully implemented in wine, and by using a native comctl32.dll the widget would work. So, what should I do next?

R. Shearman: Start the program with WINEDEBUG=+treeview wine program.exe &> treeview.log

Send the treeview log to the [wine-devel] list (compressed if it is over 50kB).Wine archive


A user [Nov 05] noted a crash in process explorer using listviews. wine archive

Mouse

WINEDEBUG="+cursor,+dinput" Wine Archive Link

One game appeared to have problems with a mouse, yet the +dinput log seemed fine. A Wine expert asked for a log to see if the 'normal' mouse cursor stays on screen or if it is hidden by either DDraw or DInput. Wine Archive Link

A former trace showed: trace:dinput:SysMouseAImpl_SetCooperativeLevel cooperative level :DISCL_FOREGROUND DISCL_NONEXCLUSIVE. Changing the S3 registry setting called "GDIMouse" had no effect. L. Ulmer:

Joystick

May 2008 wine-user: I compiled wine (with some help and manually copied the dinput_test.exe.so file into my /usr/lib32/wine directory and made it's permissions match the other exe.so files (644). I then run the test to see if dinput is seeing/reacting to my controller, and it seems to. I then run GH3 with +dinput on debug and don't get a single line mentioning 'joy'.

Vitamin wrote: Then this program is not using dinput. Try WINEDEBUG=+joystick [ie from where the exe resides try WINEDEBUG=+joystick wine <program.exe> ]

The user tried further: One output file is +joystick and the other is -all,+dinput which actually shows quite a bit of dinput debug but it looks like all keyboard and mouse stuff to me only. +joystick didn't spit out anything I recognized, but the output is there for review if you want it. My command lines were redirected like 'WINEDEBUG=opts wine prog.exe > outputfile.txt 2>&1' which I think is right.

Vitamin: looking at it - this program does not query, enumerate or otherwise ask for joystick. So it must be looking somewhere else (registry?) to see if it's controller present or not.

The user commented that he used dll overrides for : xinput1_3.dll. wikipedia has an entry for it: http://en.wikipedia.org/wiki/XInput It says that it uses a different API and it's specifically for xbox 360 controllers among other things. This is one of the overrides I have to use to get the game running, along with d3dx9_36.

Vitamin: it is not implemented in Wine at all, except few stubs to prevent calls to unimplemented function crashes. It is totally different [than] dinput. This is xp+ feature that mostly no programs use. And [...]it is some xbox stuff that made it's way back into windows.


wine user Aug 08 vitamin: You can check what it's doing by enabling +dinput debug channel. It should be enumerating through all the devices (or at least all joysticks). Most likely it wants to see a particular device name and vendor. This part will be different on Wine then windows. Wine reports vendor and device name in one string ex : "Logitech Logitech Dual action".


Twain (i.e. for scanners)

S.Petreolle: First make sure your scanner works with Linux Wine Archive Link

Sound

A Deadlock was reported with winmm. E.Pouch suggested:

A user reported difficulties with winealsa and used:

A user reported trouble running a sound test. R. Rief:

A user asked about debugging a mixer problem. A. Mohr:

(whoa, that's about 3 times longer than expected! ;)

and maybe also with +relay if needed.Wine Archive


Midi

A user [Sept05] reported the a midi player was silent Wine Archive. C. Costa:

[May 08] A user reported a msg: Unable to locate a MIDI-Device. Final Fantasy VII requires a Windows95-compliant MIDI Device. my console print[s the following] text:

root@error-laptop:/home/fatal-error# 
wine ff7 ALSA lib seq_hw.c:456snd_seq_hw_open) open /dev/snd/seq failed: No such file or directory
ALSA lib seq_hw.c:456snd_seq_hw_open) open /dev/snd/seq failed: No such file or directory
root@error-laptop:/home/fatal-error#

Marcel noted: this is not a wine bug [..you] dont have midi support working on your host OS

Dlls

Dll Version Information

A user reported a recent change in dlls/version/info.c breaks IBM Translation Manager on startup


X Errors

D. Kegel queried the method of diagnosing X errors such as

X Error of failed request:  BadAtom (invalid Atom parameter)
 Major opcode of failed request:  17 (X_GetAtomName) Atom id in failed request:  0x0
 Serial number of failed request:  468 Current serial number in output stream:  470

in Wine [a user would] do

and then use winedbg to run the apps, and get a backtrace when the error occurs.

See also wine archive, fix for BadAtom error

A. Mohr provided some of his notes:

gdb: b _XError
b wxXErrorHandler

How do I trace the cause of an X11 error such as BadMatch? When a fatal X11 error occurs, the application quits with no stack trace. To find out where the problem is, put a breakpoint on g_log

Unexpected async reply" is commonly due to a multi-threaded app with Motif/Xlib calls from more than 1 thread; or to Motif/Xlib calls from a signal handler. http://www.rahul.net/kenton/perrors.html try:

wine-preloader and wine-pthread

A programmer noted [Jun 06]: i get a segfault long before control has been transferred to my code. it appears to be in wine-preloader i cannot see how to debug this without endless printf's

D. Kegel: Don't pooh-pooh print statements as a debugging technique. It's like the duct tape of the debugging world. wine-preloader is a special environment, though; you'll have to use wld_printf rather than normal printf.

After further research he said: seg fault is in wine-pthread, not wine-preloader, which is even tougher -two exec boundaries to cross.

E. Pouch: did you try to do something along those lines? - insert a long loop in wine-pthread code before the crash to wait for, say, 30 seconds - after starting wine, try attaching to it with gdb (attach command) this should allow you to let gdb debug the part you want (you may have to tweak gdb to tell it which image you're referring to)

A. Julliard: You don't need the execs, you can simply run wine-pthread directly (unless the problem is only triggered by the preloader of course). wine archive

Check Everything including the Kitchen Sink option

When posting to Bugzilla, dont paste a long trace into the report. The Bugzilla reviewers have to review a terribly large number of bugs each dat and it could become irritating being forced to wait a very long time for your bug report to display. Not everyone has broadband. It would appear better for any traces to be saved to a file and attached to the bug report.

Further Reading

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox