Hi All,
I have from time to time a crash in ThreadSearch plugin and I'm trying to debug it looking at the codeblocks.RPT crash file. I'm using the latest SVN version and compiling WITH debug information using gcc version 4.5.2 (tdm-1).
However, I have two issues:
1- the addresses are not found in the ThreadSearch.dll
2- I have the following error: "Dwarf Error: mangled line number section."
Here is my codeblocks.RPT file:
Error occured on Wednesday, May 30, 2012 at 16:45:19.
C:\Work\codeblocks_trunk\src\output\codeblocks.exe caused an Access Violation at location 7741e3be in module C:\Windows\SysWOW64\ntdll.dll Reading from location 6eb10d08.
Registers:
eax=00000001 ebx=109bcba8 ecx=002f0000 edx=109bcba8 esi=6eb10d04 edi=109bcba0
eip=7741e3be esp=1d0af9b0 ebp=1d0af9e4 iopl=0 nv up ei pl nz na pe nc
cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010202
Call stack:
7741E3BE C:\Windows\SysWOW64\ntdll.dll:7741E3BE RtlInitUnicodeString
7741E023 C:\Windows\SysWOW64\ntdll.dll:7741E023 RtlFreeHeap
750A98CD C:\Windows\syswow64\msvcrt.dll:750A98CD free
6274C8F5 C:\Work\codeblocks_trunk\src\output\wxmsw28u_gcc_custom.dll:6274C8F5 _ZNK12wxStringBase4findEPKwjj
6274F36C C:\Work\codeblocks_trunk\src\output\wxmsw28u_gcc_custom.dll:6274F36C _ZNK8wxString4FindEPKw
0ABA1415 C:\Work\codeblocks_trunk\src\output\share\codeblocks\plugins\ThreadSearch.dll:0ABA1415Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.
0ABA85E4 C:\Work\codeblocks_trunk\src\output\share\codeblocks\plugins\ThreadSearch.dll:0ABA85E4
0AB923D1 C:\Work\codeblocks_trunk\src\output\share\codeblocks\plugins\ThreadSearch.dll:0AB923D1
0AB92106 C:\Work\codeblocks_trunk\src\output\share\codeblocks\plugins\ThreadSearch.dll:0AB92106
627810D8 C:\Work\codeblocks_trunk\src\output\wxmsw28u_gcc_custom.dll:627810D8 _ZN11wxCondition6SignalEv
62781218 C:\Work\codeblocks_trunk\src\output\wxmsw28u_gcc_custom.dll:62781218 _ZN11wxCondition6SignalEv
750B1287 C:\Windows\syswow64\msvcrt.dll:750B1287 _itow_s
750B1328 C:\Windows\syswow64\msvcrt.dll:750B1328 _endthreadex
759D339A C:\Windows\syswow64\kernel32.dll:759D339A BaseThreadInitThunk
77429EF2 C:\Windows\SysWOW64\ntdll.dll:77429EF2 RtlInitializeExceptionChain
77429EC5 C:\Windows\SysWOW64\ntdll.dll:77429EC5 RtlInitializeExceptionChain
-------------------
Error occured on Tuesday, June 12, 2012 at 10:24:03.
C:\Work\codeblocks_trunk\src\output\codeblocks.exe caused an Access Violation at location 76ebe3be in module C:\Windows\SysWOW64\ntdll.dll Reading from location 05e9ae6b.
Registers:
eax=00000011 ebx=1636e538 ecx=00020000 edx=1636e538 esi=05e9ae67 edi=1636e530
eip=76ebe3be esp=13dbf9b0 ebp=13dbf9e4 iopl=0 nv up ei pl nz na pe nc
cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010202
Call stack:
76EBE3BE C:\Windows\SysWOW64\ntdll.dll:76EBE3BE RtlInitUnicodeString
76EBE023 C:\Windows\SysWOW64\ntdll.dll:76EBE023 RtlFreeHeap
749098CD C:\Windows\syswow64\msvcrt.dll:749098CD free
6274C8F5 C:\Work\codeblocks_trunk\src\output\wxmsw28u_gcc_custom.dll:6274C8F5 _ZNK12wxStringBase4findEPKwjj
6274F36C C:\Work\codeblocks_trunk\src\output\wxmsw28u_gcc_custom.dll:6274F36C _ZNK8wxString4FindEPKw
0B44878D C:\Work\codeblocks_trunk\src\output\share\codeblocks\plugins\ThreadSearch.dll:0B44878DDwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.
0B44F348 C:\Work\codeblocks_trunk\src\output\share\codeblocks\plugins\ThreadSearch.dll:0B44F348
0B45E3BD C:\Work\codeblocks_trunk\src\output\share\codeblocks\plugins\ThreadSearch.dll:0B45E3BD
0B45E0F2 C:\Work\codeblocks_trunk\src\output\share\codeblocks\plugins\ThreadSearch.dll:0B45E0F2
627810D8 C:\Work\codeblocks_trunk\src\output\wxmsw28u_gcc_custom.dll:627810D8 _ZN11wxCondition6SignalEv
62781218 C:\Work\codeblocks_trunk\src\output\wxmsw28u_gcc_custom.dll:62781218 _ZN11wxCondition6SignalEv
74911287 C:\Windows\syswow64\msvcrt.dll:74911287 _itow_s
74911328 C:\Windows\syswow64\msvcrt.dll:74911328 _endthreadex
75A5339A C:\Windows\syswow64\kernel32.dll:75A5339A BaseThreadInitThunk
76EC9EF2 C:\Windows\SysWOW64\ntdll.dll:76EC9EF2 RtlInitializeExceptionChain
76EC9EC5 C:\Windows\SysWOW64\ntdll.dll:76EC9EC5 RtlInitializeExceptionChain
And my tentative of having some info from it using Addr2LineUI:
******************************
* Found (another) call stack *
******************************
addr2line -e C:\Windows\SysWOW64\ntdll.dll 7741E3BE:
C:\Windows\SysWOW64\ntdll.dll[7741E3BE]:
??:0
----------------------------------------
addr2line -e C:\Windows\SysWOW64\ntdll.dll 7741E023:
C:\Windows\SysWOW64\ntdll.dll[7741E023]:
??:0
----------------------------------------
addr2line -e C:\Windows\syswow64\msvcrt.dll 750A98CD:
C:\Windows\syswow64\msvcrt.dll[750A98CD]:
??:0
----------------------------------------
addr2line -e C:\Work\codeblocks_trunk\src\output\wxmsw28u_gcc_custom.dll 6274C8F5:
C:\Work\codeblocks_trunk\src\output\wxmsw28u_gcc_custom.dll[6274C8F5]:
string.cpp:0
----------------------------------------
addr2line -e C:\Work\codeblocks_trunk\src\output\wxmsw28u_gcc_custom.dll 6274F36C:
C:\Work\codeblocks_trunk\src\output\wxmsw28u_gcc_custom.dll[6274F36C]:
string.cpp:0
----------------------------------------
addr2line -e C:\Work\codeblocks_trunk\src\output\share\codeblocks\plugins\ThreadSearch.dll 0ABA1415:
C:\Work\codeblocks_trunk\src\output\share\codeblocks\plugins\ThreadSearch.dll[0ABA1415]:
??:0
----------------------------------------
Stopping addr2line operations for line:
Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.
----------------------------------------
******************************
* Found (another) call stack *
******************************
addr2line -e C:\Windows\SysWOW64\ntdll.dll 76EBE3BE:
C:\Windows\SysWOW64\ntdll.dll[76EBE3BE]:
??:0
----------------------------------------
addr2line -e C:\Windows\SysWOW64\ntdll.dll 76EBE023:
C:\Windows\SysWOW64\ntdll.dll[76EBE023]:
??:0
----------------------------------------
addr2line -e C:\Windows\syswow64\msvcrt.dll 749098CD:
C:\Windows\syswow64\msvcrt.dll[749098CD]:
??:0
----------------------------------------
addr2line -e C:\Work\codeblocks_trunk\src\output\wxmsw28u_gcc_custom.dll 6274C8F5:
C:\Work\codeblocks_trunk\src\output\wxmsw28u_gcc_custom.dll[6274C8F5]:
string.cpp:0
----------------------------------------
addr2line -e C:\Work\codeblocks_trunk\src\output\wxmsw28u_gcc_custom.dll 6274F36C:
C:\Work\codeblocks_trunk\src\output\wxmsw28u_gcc_custom.dll[6274F36C]:
string.cpp:0
----------------------------------------
addr2line -e C:\Work\codeblocks_trunk\src\output\share\codeblocks\plugins\ThreadSearch.dll:0B44878DDwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error 0B44878D:
Error for: addr2line -e C:\Work\codeblocks_trunk\src\output\share\codeblocks\plugins\ThreadSearch.dll:0B44878DDwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error 0B44878D
:addr2line: 'C:\Work\codeblocks_trunk\src\output\share\codeblocks\plugins\ThreadSearch.dll:0B44878DDwarf': No such file
----------------------------------------
addr2line -e C:\Work\codeblocks_trunk\src\output\share\codeblocks\plugins\ThreadSearch.dll 0B44F348:
C:\Work\codeblocks_trunk\src\output\share\codeblocks\plugins\ThreadSearch.dll[0B44F348]:
??:0
----------------------------------------
addr2line -e C:\Work\codeblocks_trunk\src\output\share\codeblocks\plugins\ThreadSearch.dll 0B45E3BD:
C:\Work\codeblocks_trunk\src\output\share\codeblocks\plugins\ThreadSearch.dll[0B45E3BD]:
??:0
----------------------------------------
addr2line -e C:\Work\codeblocks_trunk\src\output\share\codeblocks\plugins\ThreadSearch.dll 0B45E0F2:
C:\Work\codeblocks_trunk\src\output\share\codeblocks\plugins\ThreadSearch.dll[0B45E0F2]:
??:0
----------------------------------------
addr2line -e C:\Work\codeblocks_trunk\src\output\wxmsw28u_gcc_custom.dll 627810D8:
C:\Work\codeblocks_trunk\src\output\wxmsw28u_gcc_custom.dll[627810D8]:
thread.cpp:0
----------------------------------------
addr2line -e C:\Work\codeblocks_trunk\src\output\wxmsw28u_gcc_custom.dll 62781218:
C:\Work\codeblocks_trunk\src\output\wxmsw28u_gcc_custom.dll[62781218]:
thread.cpp:0
----------------------------------------
addr2line -e C:\Windows\syswow64\msvcrt.dll 74911287:
C:\Windows\syswow64\msvcrt.dll[74911287]:
??:0
----------------------------------------
addr2line -e C:\Windows\syswow64\msvcrt.dll 74911328:
C:\Windows\syswow64\msvcrt.dll[74911328]:
??:0
----------------------------------------
addr2line -e C:\Windows\syswow64\kernel32.dll 75A5339A:
C:\Windows\syswow64\kernel32.dll[75A5339A]:
??:0
----------------------------------------
addr2line -e C:\Windows\SysWOW64\ntdll.dll 76EC9EF2:
C:\Windows\SysWOW64\ntdll.dll[76EC9EF2]:
??:0
----------------------------------------
addr2line -e C:\Windows\SysWOW64\ntdll.dll 76EC9EC5:
C:\Windows\SysWOW64\ntdll.dll[76EC9EC5]:
??:0
----------------------------------------
Any ideas?
I just got another crash and even after compiling everything (wxWidgets included) with gcc tdm 4.6.1 SJLJ, I cannot get any information from the RPT file.
Below is my file and the output from Addr2LineUI.
Any ideas of what the problem could be?
Note: Although I'm running from the output folder, it's just a copy from the devel folder, so with ALL debug information...
Edit: codeblocks.dll also gives no information, why?
Edit 2: the RPT file used to work on the past, giving me the right information
Edit 3: something is very wrong here, since looking at the codeblocks.dll file, I can find the function _ZN6wxFontC1EiiiibRK8wxString14wxFontEncoding, but the entry point is completely different (the RPT file shows something at 01472EF4, see below:
002D2E5Ch 7859 _ZN6wxFontC1EiiiibRK8wxString14wxFontEncoding
Error occured on Wednesday, June 13, 2012 at 16:13:40.
C:\Work\codeblocks_trunk\src\output\codeblocks.exe caused an Access Violation at location 76ebe3be in module C:\Windows\SysWOW64\ntdll.dll Reading from location 79839ca9.
Registers:
eax=0049005f ebx=1a55a288 ecx=00390000 edx=1a55a288 esi=79839ca5 edi=1a55a280
eip=76ebe3be esp=0028ed20 ebp=0028ed54 iopl=0 nv up ei pl nz na po nc
cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010206
Call stack:
76EBE3BE C:\Windows\SysWOW64\ntdll.dll:76EBE3BE RtlInitUnicodeString
76EBE023 C:\Windows\SysWOW64\ntdll.dll:76EBE023 RtlFreeHeap
749098CD C:\Windows\syswow64\msvcrt.dll:749098CD free
62753D36 C:\Work\codeblocks_trunk\src\output\wxmsw28u_gcc_custom.dll:62753D36 _ZN13wxArrayString4FreeEv
01472EF4 C:\Work\codeblocks_trunk\src\output\codeblocks.dll:01472EF4 _ZN6wxFontC1EiiiibRK8wxString14wxFontEncoding
012206D2 C:\Work\codeblocks_trunk\src\output\codeblocks.dll:012206D2 _ZN8cbEditor36InternalSetEditorStyleBeforeFileOpenEP16cbStyledTextCtrl
01220404 C:\Work\codeblocks_trunk\src\output\codeblocks.dll:01220404 _ZN8cbEditor11ApplyStylesEP16cbStyledTextCtrl
0CC463EC C:\Work\codeblocks_trunk\src\output\share\codeblocks\plugins\ThreadSearch.dll:0CC463EC
0CC5C74E C:\Work\codeblocks_trunk\src\output\share\codeblocks\plugins\ThreadSearch.dll:0CC5C74E
0CC47912 C:\Work\codeblocks_trunk\src\output\share\codeblocks\plugins\ThreadSearch.dll:0CC47912
******************************
* Found (another) call stack *
******************************
C:\MinGW32_tdm_461\bin\addr2line.exe -e C:\Windows\SysWOW64\ntdll.dll 76EBE3BE:
C:\Windows\SysWOW64\ntdll.dll[76EBE3BE]:
??:0
----------------------------------------
C:\MinGW32_tdm_461\bin\addr2line.exe -e C:\Windows\SysWOW64\ntdll.dll 76EBE023:
C:\Windows\SysWOW64\ntdll.dll[76EBE023]:
??:0
----------------------------------------
C:\MinGW32_tdm_461\bin\addr2line.exe -e C:\Windows\syswow64\msvcrt.dll 749098CD:
C:\Windows\syswow64\msvcrt.dll[749098CD]:
??:0
----------------------------------------
C:\MinGW32_tdm_461\bin\addr2line.exe -e C:\Work\codeblocks_trunk\src\output\wxmsw28u_gcc_custom.dll 62753D36:
C:\Work\codeblocks_trunk\src\output\wxmsw28u_gcc_custom.dll[62753D36]:
string.cpp:0
----------------------------------------
C:\MinGW32_tdm_461\bin\addr2line.exe -e C:\Work\codeblocks_trunk\src\output\codeblocks.dll 01472EF4:
C:\Work\codeblocks_trunk\src\output\codeblocks.dll[01472EF4]:
??:0
----------------------------------------
C:\MinGW32_tdm_461\bin\addr2line.exe -e C:\Work\codeblocks_trunk\src\output\codeblocks.dll 012206D2:
C:\Work\codeblocks_trunk\src\output\codeblocks.dll[012206D2]:
??:0
----------------------------------------
C:\MinGW32_tdm_461\bin\addr2line.exe -e C:\Work\codeblocks_trunk\src\output\codeblocks.dll 01220404:
C:\Work\codeblocks_trunk\src\output\codeblocks.dll[01220404]:
??:0
----------------------------------------
C:\MinGW32_tdm_461\bin\addr2line.exe -e C:\Work\codeblocks_trunk\src\output\share\codeblocks\plugins\ThreadSearch.dll 0CC463EC:
C:\Work\codeblocks_trunk\src\output\share\codeblocks\plugins\ThreadSearch.dll[0CC463EC]:
??:0
----------------------------------------
C:\MinGW32_tdm_461\bin\addr2line.exe -e C:\Work\codeblocks_trunk\src\output\share\codeblocks\plugins\ThreadSearch.dll 0CC5C74E:
C:\Work\codeblocks_trunk\src\output\share\codeblocks\plugins\ThreadSearch.dll[0CC5C74E]:
??:0
----------------------------------------
C:\MinGW32_tdm_461\bin\addr2line.exe -e C:\Work\codeblocks_trunk\src\output\share\codeblocks\plugins\ThreadSearch.dll 0CC47912:
C:\Work\codeblocks_trunk\src\output\share\codeblocks\plugins\ThreadSearch.dll[0CC47912]:
??:0
----------------------------------------
Edit: codeblocks.dll also gives no information, why?
Edit 2: the RPT file used to work on the past, giving me the right information
Since you completely rebuilt, it is possible exchndl.dll was not copied due to:
http://svn.berlios.de/wsvn/codeblocks?op=comp&compare[]=/trunk/src/update.bat@7660&compare[]=/trunk/src/update.bat@7661
I just test this. Both wx, exchndl, and c::b was build by xunxun's PCX GCC 4.6.3.
I add a simple crash code in line 1776.
void CodeCompletion::OnProjectClosed(CodeBlocksEvent& event)
{
char * p = 0;
*p = 0;
...
Then, I run the c::b under devel folder, and make c::b crash.
The report file shows the correct line:
-------------------
Error occured on Thursday, June 14, 2012 at 08:18:17.
E:\code\cb\cb_trunk\src\devel\codeblocks.exe caused an Access Violation at location 65ecadce in module E:\code\cb\cb_trunk\src\devel\share\codeblocks\plugins\codecompletion.dll Writing to location 00000000.
Registers:
eax=00000000 ebx=fffffffc ecx=021ec2e8 edx=0022db20 esi=0000007e edi=0022e090
eip=65ecadce esp=0022da38 ebp=0022da60 iopl=0 nv up ei pl nz ac pe nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00010212
Call stack:
65ECADCE E:\code\cb\cb_trunk\src\devel\share\codeblocks\plugins\codecompletion.dll:65ECADCE CodeCompletion::OnProjectClosed E:\code\cb\cb_trunk\src/plugins/codecompletion/codecompletion.cpp:1776
65F183F0 E:\code\cb\cb_trunk\src\devel\share\codeblocks\plugins\codecompletion.dll:65F183F0 cbEventFunctor<CodeCompletion, CodeBlocksEvent>::Call E:\code\cb\cb_trunk\src/include/cbfunctor.h:35
617F3693 E:\code\cb\cb_trunk\src\devel\codeblocks.dll:617F3693 Manager::ProcessEvent E:\code\cb\cb_trunk\src/sdk/manager.cpp:168
6185E368 E:\code\cb\cb_trunk\src\devel\codeblocks.dll:6185E368 PluginManager::NotifyPlugins E:\code\cb\cb_trunk\src/sdk/pluginmanager.cpp:1475
618B299A E:\code\cb\cb_trunk\src\devel\codeblocks.dll:618B299A ProjectManager::CloseProject E:\code\cb\cb_trunk\src/sdk/projectmanager.cpp:1199
618B84F6 E:\code\cb\cb_trunk\src\devel\codeblocks.dll:618B84F6 ProjectManager::OnCloseProject E:\code\cb\cb_trunk\src/sdk/projectmanager.cpp:2541
00EC22B6 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC22B6 _ZN12wxEvtHandler21ProcessEventIfMatchesERK21wxEventTableEntryBasePS_R7wxEvent
00EC242A E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC242A _ZN16wxEventHashTable11HandleEventER7wxEventP12wxEvtHandler
00EC27F6 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC27F6 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00FAB05D E:\code\common_bin\wxmsw28u_gcc_custom.dll:00FAB05D _ZN12wxWindowBase9TryParentER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00FAB05D E:\code\common_bin\wxmsw28u_gcc_custom.dll:00FAB05D _ZN12wxWindowBase9TryParentER7wxEvent
00F8C043 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00F8C043 _ZN10wxMenuBase9SendEventEii
00F26BB8 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00F26BB8 _ZN6wxMenu10MSWCommandEjt
00F01B1C E:\code\common_bin\wxmsw28u_gcc_custom.dll:00F01B1C _ZN8wxWindow13HandleCommandEttPv
00F048C1 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00F048C1 _ZN8wxWindow13MSWWindowProcEjjl
00F4657F E:\code\common_bin\wxmsw28u_gcc_custom.dll:00F4657F _ZN10wxTreeCtrl13MSWWindowProcEjjl
00EFF638 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EFF638 _Z9wxWndProcP6HWND__jjl@16
7E418734 C:\WINDOWS\system32\USER32.dll:7E418734 GetDC
7E418816 C:\WINDOWS\system32\USER32.dll:7E418816 GetDC
7E4189CD C:\WINDOWS\system32\USER32.dll:7E4189CD GetWindowLongW
7E418A10 C:\WINDOWS\system32\USER32.dll:7E418A10 DispatchMessageW
00F03737 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00F03737 _ZN8wxWindow11DoPopupMenuEP6wxMenuii
619EBF18 E:\code\cb\cb_trunk\src\devel\codeblocks.dll:619EBF18 wxWindowBase::PopupMenu E:/code/cb/wx/wxWidgets-2.8.12/include/wx/window.h:924
618B1314 E:\code\cb\cb_trunk\src\devel\codeblocks.dll:618B1314 ProjectManager::ShowMenu E:\code\cb\cb_trunk\src/sdk/projectmanager.cpp:869
618B660E E:\code\cb\cb_trunk\src\devel\codeblocks.dll:618B660E ProjectManager::OnTreeItemRightClick E:\code\cb\cb_trunk\src/sdk/projectmanager.cpp:2131
00EC22B6 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC22B6 _ZN12wxEvtHandler21ProcessEventIfMatchesERK21wxEventTableEntryBasePS_R7wxEvent
00EC242A E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC242A _ZN16wxEventHashTable11HandleEventER7wxEventP12wxEvtHandler
00EC27F6 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC27F6 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00FAB05D E:\code\common_bin\wxmsw28u_gcc_custom.dll:00FAB05D _ZN12wxWindowBase9TryParentER7wxEvent
00EC2799 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC2799 _ZN12wxEvtHandler12ProcessEventER7wxEvent
00FAB05D E:\code\common_bin\wxmsw28u_gcc_custom.dll:00FAB05D _ZN12wxWindowBase9TryParentER7wxEvent
00F4549D E:\code\common_bin\wxmsw28u_gcc_custom.dll:00F4549D _ZN10wxTreeCtrl11MSWOnNotifyEilPl
00F0436D E:\code\common_bin\wxmsw28u_gcc_custom.dll:00F0436D _ZN8wxWindow13MSWWindowProcEjjl
00EFF638 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EFF638 _Z9wxWndProcP6HWND__jjl@16
7E418734 C:\WINDOWS\system32\USER32.dll:7E418734 GetDC
7E418816 C:\WINDOWS\system32\USER32.dll:7E418816 GetDC
7E42927B C:\WINDOWS\system32\USER32.dll:7E42927B GetParent
7E4292E3 C:\WINDOWS\system32\USER32.dll:7E4292E3 SendMessageW
00F46C45 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00F46C45 _ZN10wxTreeCtrl13MSWWindowProcEjjl
00EFF638 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EFF638 _Z9wxWndProcP6HWND__jjl@16
7E418734 C:\WINDOWS\system32\USER32.dll:7E418734 GetDC
7E418816 C:\WINDOWS\system32\USER32.dll:7E418816 GetDC
7E4189CD C:\WINDOWS\system32\USER32.dll:7E4189CD GetWindowLongW
7E418A10 C:\WINDOWS\system32\USER32.dll:7E418A10 DispatchMessageW
00EE7CB2 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EE7CB2 _ZN11wxEventLoop14ProcessMessageEP6tagMSG
00EE7E6E E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EE7E6E _ZN11wxEventLoop8DispatchEv
00F679AA E:\code\common_bin\wxmsw28u_gcc_custom.dll:00F679AA _ZN17wxEventLoopManual3RunEv
00F4B28B E:\code\common_bin\wxmsw28u_gcc_custom.dll:00F4B28B _ZN9wxAppBase8MainLoopEv
0041D86D E:\code\cb\cb_trunk\src\devel\codeblocks.exe:0041D86D CodeBlocksApp::OnRun E:\code\cb\cb_trunk\src/src/app.cpp:777
00E7AE68 E:\code\common_bin\wxmsw28u_gcc_custom.dll:00E7AE68 _Z14wxUninitializev
00EC6C9B E:\code\common_bin\wxmsw28u_gcc_custom.dll:00EC6C9B _Z7wxEntryP11HINSTANCE__S0_Pci
0041AED1 E:\code\cb\cb_trunk\src\devel\codeblocks.exe:0041AED1 WinMain@16 E:\code\cb\cb_trunk\src/src/app.cpp:266
004B475F E:\code\cb\cb_trunk\src\devel\codeblocks.exe:004B475F _ZNK8wxPGCell9GetBitmapEv
00401486 E:\code\cb\cb_trunk\src\devel\codeblocks.exe:00401486
7C817077 C:\WINDOWS\system32\kernel32.dll:7C817077 RegisterWaitForInputIdle
Can you use Code::Blocks + GDB to debug your Code::Blocks and see gdb's backtrace?
Yes, I can, look:
> bt
#0 0x0a09797e in CodeCompletion::OnProjectClosed (this=0x981cd48, event=...) at C:\Work\codeblocks_trunk\src\plugins\codecompletion\codecompletion.cpp:1779
#1 0x0a0b4e1e in cbEventFunctor<CodeCompletion, CodeBlocksEvent>::Call (this=0x3eed4a8, event=...) at C:/Work/codeblocks_trunk/src/include/cbfunctor.h:35
#2 0x00f84a90 in Manager::ProcessEvent (this=0x5a19e60, event=...) at C:\Work\codeblocks_trunk\src\sdk\manager.cpp:169
#3 0x00eaeae8 in PluginManager::NotifyPlugins (this=0x6188190, event=...) at C:\Work\codeblocks_trunk\src\sdk\pluginmanager.cpp:1474
#4 0x00f0be15 in ProjectManager::CloseProject (this=0x5f1cfe8, project=0x174ff108, dontsave=false, refresh=true) at C:\Work\codeblocks_trunk\src\sdk\projectmanager.cpp:1197
#5 0x00f13819 in ProjectManager::OnCloseProject (this=0x5f1cfe8) at C:\Work\codeblocks_trunk\src\sdk\projectmanager.cpp:2538
#6 0x6278e415 in wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) () from c:\work\codeblocks_trunk\src\devel\wxmsw28u_gcc_custom.dll
#7 0x0028d7c8 in ?? ()
Thanks for the hint. However, I inspected the path and the running process and indeed it's C::B exchndl which is loaded.
I also tried to compile a test program from here (http://code.google.com/p/jrfonseca/source/browse/samples/testcpp.cxx?repo=drmingw) including the exchndl.dll from C::B and it works, I got a report with the right information...
I can't understand how(what is the steps) you did this?
So, my next task is to be able to easily reproduce a crash from C::B, but I can't, since the code from ollydbg doesn't produce a crash and I don't understand why...
Why? You mean put the code below:
in C::B source does not cause a crash??
EDIT:
Produce a crash is quite easy:
void CodeCompletion::OnProjectClosed(CodeBlocksEvent& event)
{
char * p = 0;
*p = 0;
...
You see, the code is in the event handler: OnProjectClosed, reproduce the crash is quite simple, you run the c::b, and open a project, then you close the project, this will trigger the OnProjectClosed function be called, then you will get c::b crash. :)
Thanks for the hint. However, I inspected the path and the running process and indeed it's C::B exchndl which is loaded.
I also tried to compile a test program from here (http://code.google.com/p/jrfonseca/source/browse/samples/testcpp.cxx?repo=drmingw) including the exchndl.dll from C::B and it works, I got a report with the right information...
I can't understand how(what is the steps) you did this?
I did a new console project with the following code to test if the eschndl.dll library was being loaded and working (and it works perfectly fine, as expected, generating a RPT file with all information):
/* test-c.c
#include <stdio.h>
#include <iostream>
#include "windows.h"
using namespace std;
typedef char * cp;
static void YetAnotherFunction( int i, double j, const char * pszString )
{
int k;
#if 0
/* Other ways to cause a GPF */
*(int *)i = 5;
__asm ("int $3");
(*((void (*)(void)) 0x12345678))();
#endif
sscanf("12345", "%i", (int *) (k=i));
}
static void MyWonderfulFunction( int i, float j )
{
YetAnotherFunction( i * 2, j, "Hello" );
}
int main()
{
cout << "Hello world!" << endl;
DWORD err;
HINSTANCE hDLL = LoadLibrary("exchndl.dll");
if(hDLL != NULL)
{
printf("Library has been loaded\n");
}
else
{
err = GetLastError();
printf("Couldn't load dll\n");
}
MyWonderfulFunction( 4, float(5.6) );
return 0;
}
So, my next task is to be able to easily reproduce a crash from C::B, but I can't, since the code from ollydbg doesn't produce a crash and I don't understand why...
Why? You mean put the code below:
in C::B source does not cause a crash??
You see, the code is in the event handler: OnProjectClosed, reproduce the crash is quite simple, you run the c::b, and open a project, then you close the project, this will trigger the OnProjectClosed function be called, then you will get c::b crash. :)
That's what I did and when I close the project, the project is not closed because something goes wrong, but I get the Start window and there's no crash. :o
If I run it with the debugger, then I get a SEGMENTATION FAULT.
What does "Start window" mean? It looks like "something goes wrong" are quite different in your system and mine. In my system(WinXP), the c::b just crashed and closed, then I can see the correct report file with line information.
"Start Window" is the "Start Here" windows from C::B where you have the logo, list of recent projects and files...
I agree that "something goes wrong" is very strange on my system (Win7 x64), but I don't understand why...
Ok, it looks like this code does not crash c::b on you win7 system. (Win7 is robust than WinXP)
What I can suggest is you can write to some other address:
char * p = anyIntValue;
*p = 0;
Then, change anyIntValue until your c::b crashed, or you just do a loop like:
for (int i=0;i<0xfffffffffff;i++)
{
char * p = i;
*p = 0;
}
Ok, it looks like this code does not crash c::b on you win7 system. (Win7 is robust than WinXP)
What I can suggest is you can write to some other address:
char * p = anyIntValue;
*p = 0;
Then, change anyIntValue until your c::b crashed, or you just do a loop like:
for (int i=0;i<0xfffffffffff;i++)
{
char * p = i;
*p = 0;
}
Actually, your original code is fine and even if I do the for, when debugging, I get a "segmentation fault" on the first iteration, i.e. with char *p = 0. The strange thing is that after this "segmentation fault" I can just run again and I come back to the "Start Here" window.
And, again, when not using the debugger, but just running it, I see no exception/crash at all...
Interesting, you need more dirty crash code snippet like:
delete p; //p can be any address