possible memory corruption

Tony Lambregts tony_lambregts at telusplanet.net
Tue Dec 10 14:52:31 CST 2002

steve.lustbader at philips.com wrote:

>>>>>>>>"steve" == steve lustbader <steve.lustbader at philips.com> writes:
>>>   steve> When I try to load a window in my app that has a treeview in it,
>>>   steve> it crashes immediately, before the window even gets displayed.
>>>   steve> This is the end of the backtrace:
>>>Try running with native commctrl to see if the corruption comes from our
>>>commctrl implementation. Then run with --debugmsg +relay,+heap. Wine will
>>>check on every heap manipulation to see if the heap is still okay. Then
>>>look what corrupted the heap.
>>It works fine with a native (WinXP) comctl32.dll.  I'll post the +relay,+heap
>>output shortly.
>Is there a way to turn debug output on/off?  I don't get the heap corruption
>until my app starts and I open a specific window, but it takes forever for my
>app to start using +relay,+heap.  I don't need the output at first, since
>everything is fine in the beginning, so I'd like to be able to turn the debug
>output on just before I open the window that causes the problem.
There are two ways to do this
1) Adding it into a function using software
   It is possible to turn on or off debuging for a class or channel
   using a software call in a funtion. The call to use is

          this will turn on the trace, warn, err and fixme class 
messages for the
          ddraw channel.


          this will turn on the warn class messages for the ddraw channel.

            Please note that relay is not an ordinary  channel
            and is treated differently by wineserver. In order for
            relay to function there is some work that needs to be done at
            startup. So one way to get it to work properly would is to start
            with the program with -debugmsg +relay turn it off with
            wine_dbg_parse_options, and then turn
            it on again when needed.
2) Turning on/off Debug channels and classes in the debugger
          It is possible to turn on and of debugging output from within the
          debugger using the set command. Using this technique has the
          advantage of reducing the size of the debug log.


set +gdi</parameter>

         This will turn on messages for all calls to gdi channel.

set warn+draw

         This will turn on all messages of the class warn on the channel 


       If you start the program with winedbg -debugmsg +(channel)
       calls from the debugger will be logged  which is not what you want.
      Therefore, If you need to start logging messages as the program
       starts you can start the program with wine and attach to the
       program with the debugger.

Yes this will be part of the documentation at some point.<grin>


Tony Lambregts

More information about the wine-devel mailing list