Comment 8 for bug 956225

Revision history for this message
David Mathog (mathog) wrote :

Since valgrind isn't an option in mingw I gave Dr. Memory a try. With both Trunk and Inkscape 0.48.2 it catches a ton of memory errors and exits before the first window even opens. Here is the first thing it sees (wrong) in 0.48.2

Error #1: UNINITIALIZED READ: reading register al
# 0 libglib-2.0-0.dll!g_array_sized_new
# 1 libglib-2.0-0.dll!g_array_new
# 2 libglib-2.0-0.dll!g_static_private_set
# 3 libglib-2.0-0.dll!g_get_charset
# 4 libglib-2.0-0.dll!g_locale_from_utf8
# 5 libglib-2.0-0.dll!g_win32_locale_filename_from_utf8
# 6 inkscape.exe!? +0x0 (0x004050ab <inkscape.exe+0x50ab>)
# 7 inkscape.exe!? +0x0 (0x004010db <inkscape.exe+0x10db>)
# 8 inkscape.exe!? +0x0 (0x00401158 <inkscape.exe+0x1158>)
# 9 KERNEL32.dll!RegisterWaitForInputIdle
Note: @0:00:14.891 in thread 3616
Note: instruction: test %al %al

As you can see it isn't able to figure out where in inkscape.exe the problem was, but presumably compiling it with -g
would fix that. In this case there the g_win32_locale_filename_from_utf8 is only ever called from main.cpp and script.cpp, my guess is that one of those is with a NULL name passed in.

Later on some of the errors become quite mysterious - this one is in the same thread (they all were) but doesn't list inkscape.exe at all.

Error #8: UNINITIALIZED READ: reading 0x0022fa98-0x0022fa9c 4 byte(s)
# 0 ADVAPI32.dll!RegDeleteValueW +0xf5 (0x77ddeee6 <ADVAPI32.dll+0xeee6>)
# 1 WS2_32.dll!WSCEnumProtocols +0xa63 (0x71ab85c5 <WS2_32.dll+0x85c5>)
# 2 WS2_32.dll!WSCEnumProtocols +0x9a1 (0x71ab8503 <WS2_32.dll+0x8503>)
# 3 WS2_32.dll!WSCEnumProtocols +0x839 (0x71ab839b <WS2_32.dll+0x839b>)
# 4 WS2_32.dll!WSCEnumProtocols +0x75b (0x71ab82bd <WS2_32.dll+0x82bd>)
# 5 WS2_32.dll!WSCEnumProtocols +0x43d (0x71ab7f9f <WS2_32.dll+0x7f9f>)
# 6 WS2_32.dll!WSCEnumProtocols +0x34d (0x71ab7eaf <WS2_32.dll+0x7eaf>)
# 7 libgio-2.0-0.dll!_g_networking_init
# 8 libgio-2.0-0.dll!g_inet_address_get_type
# 9 libgiomm-2.4-1.dll!ZN3Gio9wrap_initEv
#10 libgiomm-2.4-1.dll!ZN3Gio4initEv
#11 libgtkmm-2.4-1.dll!ZN3Gtk4Main20init_gtkmm_internalsEv
Note: @0:00:21.562 in thread 3016
Note: instruction: cmp %ecx (%eax)

Anyway, if any of these messages are real then this tool may be helpful in finding the memory problems under windows.