Wine Debug

Questions about Wine on Linux
Locked
Aajohn
Level 2
Level 2
Posts: 12
Joined: Mon Dec 31, 2012 3:39 pm

Wine Debug

Post by Aajohn »

I'm having a problem with a program that throws up a sort of scrolling adjustment bar. It can be move incrementally each way with mouse clicks or the bar can be dragged. It pops up very briefly and then disappears.

I've tried all sorts or way of tracing the program up to the point where this happens to try and find out what dll or ocx file etc is causing the problem. No luck at all even with IDA, that one wont store the trace.

Looking round the web suggests that wine can trace programs itself by setting a debug mode but the instructions I can find just don't generate any output. Any one know how it's done. I'm mainly after system calls as I think these "bars" are standard windows controls. I'm running opensuse 11.4 and the software I am trying to get to run is called OsloLT written in visual C by the look of it.

John
User avatar
dimesio
Moderator
Moderator
Posts: 13205
Joined: Tue Mar 25, 2008 10:30 pm

Re: Wine Debug

Post by dimesio »

Is this the app? http://www.sinopt.com/software1/downloa ... ads_lt.htm

You didn't mention what Wine version you're using. If it's not the latest development release, upgrade.
Aajohn
Level 2
Level 2
Posts: 12
Joined: Mon Dec 31, 2012 3:39 pm

Re: Wine Debug

Post by Aajohn »

I have that particular version of Oslo running. Unfortunately each time they upgrade more and more facilities are locked out of the free version. I am trying to get 6.1 to run which dates from several years ago - the vista period. This one does have the facilities I need. :-) Wish I could find an even earlier version really.

I'm still on opensuse 11.4 and wont be upgrading to 12.? just yet. My wine version is 1.4 Last time I tried to upgrade from source it had problems. I have just downloaded more recent source and can try that again but this doesn't answer my question. This is from the wine man page.

#########################################################################
ENVIRONMENT VARIABLES
wine makes the environment variables of the shell from which wine is started accessible to the windows/dos processes started. So use the appropriate syntax for your shell to enter environment variables you need.

WINEDEBUG
Turns debugging messages on or off. The syntax of the variable is of the form [class][+/-]channel[,[class2][+/-]channel2].
class is optional and can be one of the following: err, warn, fixme, or trace. If class is not specified, all debugging messages for the specified channel are turned on. Each channel will print messages about a particular component of wine. The following character can be either + or - to switch the specified channel on or off respectively. If there is no class part before it, a leading + can be omitted. Note that spaces are not allowed anywhere in the string.

Examples:

WINEDEBUG=warn+all
will turn on all warning messages (recommended for debugging).

WINEDEBUG=warn+dll,+heap
will turn on DLL warning messages and all heap messages.

WINEDEBUG=fixme-all,warn+cursor,+relay
will turn off all FIXME messages, turn on cursor warning messages, and turn on all relay messages (API calls).

WINEDEBUG=relay
will turn on all relay messages. For more control on including or excluding functions and dlls from the relay trace, look
into the HKEY_CURRENT_USER\Software\Wine\Debug registry key.

For more information on debugging messages, see the Running Wine chapter of the Wine User Guide.

#########################################################################

There is also this page on the wiki http://wiki.winehq.org/DebugChannels

What I am asking for is help on getting this to work as so far I have failed to get any output. A dll trace will probably find which one is causing the problem. The wine's shell aspect confuses me as I assume it's running in the same shell as I use for the console.

John
-
User avatar
dimesio
Moderator
Moderator
Posts: 13205
Joined: Tue Mar 25, 2008 10:30 pm

Re: Wine Debug

Post by dimesio »

Why don't you just use the openSUSE packages? The maintainer is still building them for 11.4. http://download.opensuse.org/repositori ... SUSE_11.4/

The debug channel to use to see what dlls are loaded is +loaddll.
Aajohn
Level 2
Level 2
Posts: 12
Joined: Mon Dec 31, 2012 3:39 pm

Re: Wine Debug

Post by Aajohn »

I tried the opensuse rpm's and have again but still have the same odd problem. wine...........x86_64.rpm and wine_32.....x86_64.rpm need each other to install. In other words if I try to install either it brings up the other as a dependency and fails out as a result. The build service reckons that they should be ok for 11.4.

I will try WINEDEBUG=+loaddll

One thing I have wondered on this subject is if the much bigger debug version of wine is needed for them to work. I'd hope not as that may include the huge list on the page I linked too. Externall calls are all that are usually needed. Currently I have to guess. :-( Not worked out this time.

One odd thing I have noticed. I registered mfc42.dll manually along with 40. As a check I re registered them again 40 was skipped as already registered but 42 registered again. Is there some way of forcing wine to register everything in say system32? These wont help with this problem but some other dll or ocx may have become unregistered some how.

John
-
Aajohn
Level 2
Level 2
Posts: 12
Joined: Mon Dec 31, 2012 3:39 pm

Re: Wine Debug

Post by Aajohn »

Also need to ask the question where does the winedebug output go? I can't find any trace of it. Even tried
wine ./progname > trace.txt. The file was created but nothing in it. I sort of expected any output to be directed to the console. Either the dos one or the linux one wine was started in.

John
-
User avatar
dimesio
Moderator
Moderator
Posts: 13205
Joined: Tue Mar 25, 2008 10:30 pm

Re: Wine Debug

Post by dimesio »

I'm on openSUSE 11.4 and using the packages from that repository. I don't understand your dependency problem; Yast should be able to install both.

Follow these instructions to redirect the debug trace to a file: http://wiki.winehq.org/FAQ#head-16da35b ... 16862d0f5e.
Aajohn
Level 2
Level 2
Posts: 12
Joined: Mon Dec 31, 2012 3:39 pm

Re: Wine Debug

Post by Aajohn »

Thanks for that. The log shows an error message but I don't think it's due to the problem I am having with the app. Right at the end of the log it shows this message but I haven't used a help file.

fixme:htmlhelp:HtmlHelpW HH case HH_CLOSE_ALL not handled.
err:seh:call_stack_handlers invalid frame 2410f0 (0x142000-0x240000)
err:seh:raise_exception Exception frame is not in stack limits => unable to dispatch exception.
wine client error:1c: write: Bad file descriptor

This is immediately after a call for the built in hhctrl.ocx which I understand is for microsofts pop up help.

It seems I can load both rpm's with zypper. Just about to do that as I am away for a week shortly and that will give me a break if things mess up. :-) I have had this problem before with yast and think it has something to do with kpackage manager trying to take over plus changes in architecture that haven't reached yast - yet I hope.

John
-
Aajohn
Level 2
Level 2
Posts: 12
Joined: Mon Dec 31, 2012 3:39 pm

Re: Wine Debug

Post by Aajohn »

The dependency walker link to on the debug pages shows 3 error returns from dll's in it's trace indicating that the service requested isn't available. It doesn't show if the dll's are built in or native though. The wine trace does that. The wine trace shows that all of the dll's that are called up to the point where my slider controls flash up and disappear are built in.

Looks like I need to try some native dll over rides. There isn't an obvious way of doing this in wine cfg. I have read that I need to highlight the application and then switch to the over ride tab and select the dll to be used. Is this correct? As presented it looks like the over ride will always be used by any app that uses it and highlighting the application is some ones idea of how it should be done rather than fact.

Not sure what to do about the wine fixme error message?

John
-
User avatar
dimesio
Moderator
Moderator
Posts: 13205
Joined: Tue Mar 25, 2008 10:30 pm

Re: Wine Debug

Post by dimesio »

Aajohn wrote: Looks like I need to try some native dll over rides. There isn't an obvious way of doing this in wine cfg. I have read that I need to highlight the application and then switch to the over ride tab and select the dll to be used. Is this correct?
Yes. You also need to install the native dll first.
Not sure what to do about the wine fixme error message?
Fixmes are unimplemented functions, and are often harmless. Have you upgraded Wine yet? That's the first thing to try.

The output you posted looked very odd, so I search bugzilla, and came across two bugs: http://bugs.winehq.org/show_bug.cgi?id=31666 and http://bugs.winehq.org/show_bug.cgi?id=29884. Both are specific to 64 bit Wine. Given your issues installing Wine, my question is: have you installed both 32 and 64 bit Wine (shared WoW64 setup)? You need to.
Aajohn
Level 2
Level 2
Posts: 12
Joined: Mon Dec 31, 2012 3:39 pm

Re: Wine Debug

Post by Aajohn »

Thanks for reply.

Before I update how do I check the shared 64bit library aspect. I have both 32 and 64bit wine installed but exactly as 11.4 provided it apart from adding some dll's.

This should help me when I upgrade to the latest wine release as well.

John
-
Locked