tests in gtktest don't run in Debug configuration

Bug #344531 reported by Shixin Zeng
2
Affects Status Importance Assigned to Milestone
OAH Build
Won't Fix
Undecided
Haakon Sporsheim

Bug Description

a lot of tests don't run in GtkTest.sln if you compile the stack in Debug configuration, it asserts:
"Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention."
and then stops due to "Unhandled exception at 0x00528d46 (libgdk-win32-2.0-0.dll) in testgtk.exe: 0xC0000005: Access violation reading location 0x00000003."

I've tried testgtk, testinput, testtreeview

all test run fine in Release configuration

The whole gtk stack were compiled by myself from oah, I've just appended "-0" to the dll names, if you noticed that name difference between mine and the official oah ones.

Revision history for this message
Haakon Sporsheim (ieei) wrote :

First of all, the naming of output binaries are intentional, as Tor Lillqvist pointed out in https://bugs.launchpad.net/oah/+bug/343977

What you are doing here will break, and this is sort of why we created OAH in the first place.
Currently OAH configurations are a bit flawed. You cant and shouldn't mix Debug and Release binaries. I have a feeling that this is what you are doing here, and hence it will crash down in the C runtime. The fix for this is to introduce a new naming convention so that Debug, Release and ReleaseWdkCrt (which is not usable atm) will output different binaries

Revision history for this message
Haakon Sporsheim (ieei) wrote :

Yeah, btw: you can NOT rename OAH binaries and replace official binaries. If you do, the application(s) using these binaries will crash and burn.

Revision history for this message
Haakon Sporsheim (ieei) wrote :

Set to wont fix, this will be much clearer in 0.4, when the new naming convention is in place.

Changed in oah:
assignee: nobody → ieei
status: New → Won't Fix
Revision history for this message
Shixin Zeng (szeng) wrote :
Download full text (48.2 KiB)

Sorry for the late reply, but I didn't mix Debug and Release binaries, at least for libraries built from OAH. I recompiled everything this time by a clean checkout and build. it has still this problem.

I profiled the program with depends.exe from MS visual studio, and the log is attached. The only culprit I can think of is the intl.dll, I didn't compile it from source, but downloaded from http://www.gtk.org/download-windows.html along with the package gettext-runtime.

Warning: At least one delay-load dependency module was not found.
Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.

--------------------------------------------------------------------------------
Starting profile on 4/5/2009 at 8:30:11 PM

Operating System: Microsoft Windows XP Professional (32-bit), version 5.01.2600 Service Pack 3
Program Executable: c:\foss\debug\bin\TESTACTIONS.EXE
Program Arguments:
Starting Directory: C:\FOSS\Debug\bin\
Search Path: C:\Program Files\Microsoft Visual Studio 8\Common7\IDE;C:\Program Files\Microsoft Visual Studio 8\VC\BIN;C:\Program Files\Microsoft Visual Studio 8\Common7\Tools;C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\bin;C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\bin;C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\bin;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727;C:\Program Files\Microsoft Visual Studio 8\VC\VCPackages;C:\XEClient\bin;C:\Program Files\OAH Build\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\wbem;c:\program files\ati technologies\ati.ace\;C:\Program Files\MATLAB\R2006a\bin\win32;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\Program Files\VISA\winnt\bin;C:\Program Files\Subversion\bin;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\FOSS\bin;C:\XEClient\bin;C:\Program Files\OAH Build\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\wbem;c:\program files\ati technologies\ati.ace\;C:\Program Files\MATLAB\R2006a\bin\win32;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\Program Files\VISA\winnt\bin;C:\Program Files\Subversion\bin;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\FOSS\bin;C:\Program Files\Nmap;C:\Program Files\SSH Communications Security\SSH Secure Shell;C:\Python25\Scripts;C:\Program Files\Git\cmd;C:\Perl\bin;C:\FOSS\\Release\bin

Options Selected:
     Simulate ShellExecute by inserting any App Paths directories into the PATH environment variable.
     Log DllMain calls for process attach and process detach messages.
     Hook the process to gather more detailed dependency information.
     Log LoadLibrary function calls.
     Log GetProcAddress function calls.
     Log debug output messages.
     Use full paths when logging file names.
     Automatically open and profile child processes.
--------------------------------------------------------------------------------

Started "c:\foss\debug\bin\TESTACTIONS.EXE" (process 0x16E8) at address 0x00400000. Successfully hooked module.
Loaded "c:\windows\system32\NTDLL.DLL" at address 0x7C900000. Successfully hooked module.
Loaded "c:\windows\system32\KERNEL32.DLL" at address 0x7C800000. Successfully hooked module.
DllMain(0x7C900000, ...

Revision history for this message
Shixin Zeng (szeng) wrote :

problem reported to upstream, http://bugzilla.gnome.org/show_bug.cgi?id=578094. I'm not sure if we should feed /Gz to compiler to work around though.

Revision history for this message
Shixin Zeng (szeng) wrote :

it was committed upstream:
http://git.gnome.org/cgit/gtk+/commit/?id=c338228a865a73b7ab1f2ad55abcb24ae4ce3014

So, Haakon, could you cherry pick this commit to OAH?

Revision history for this message
Haakon Sporsheim (ieei) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.