Author Topic: Help reading codeblocks.RPT  (Read 32255 times)

daniloz

  • Guest
Re: Help reading codeblocks.RPT
« Reply #15 on: June 13, 2012, 11:58:22 am »
You can see your config.gcc

USE_XRC=1 is the default option.
Oh, I see. Thanks @xunxun

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: Help reading codeblocks.RPT
« Reply #16 on: June 13, 2012, 12:15:12 pm »
So, the question: is USE_XRC=1 required or not?
Adjusted the WiKi accordingly...
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

daniloz

  • Guest
Re: Help reading codeblocks.RPT
« Reply #17 on: June 13, 2012, 04:34:56 pm »
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:
Code
002D2E5Ch     	7859     _ZN6wxFontC1EiiiibRK8wxString14wxFontEncoding



Code
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

Code
******************************
* 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
----------------------------------------
« Last Edit: June 13, 2012, 05:00:33 pm by daniloz »

Offline xunxun

  • Almost regular
  • **
  • Posts: 187
Re: Help reading codeblocks.RPT
« Reply #18 on: June 13, 2012, 05:46:31 pm »
Can you use Code::Blocks + GDB to debug your Code::Blocks and see gdb's backtrace?
Regards,
xunxun

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: Help reading codeblocks.RPT
« Reply #19 on: June 13, 2012, 07:01:12 pm »
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:
Code
http://svn.berlios.de/wsvn/codeblocks?op=comp&compare[]=/trunk/src/update.bat@7660&compare[]=/trunk/src/update.bat@7661

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6077
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Help reading codeblocks.RPT
« Reply #20 on: June 14, 2012, 02:20:06 am »
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.
Code
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:
Code
-------------------

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
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

daniloz

  • Guest
Re: Help reading codeblocks.RPT
« Reply #21 on: June 14, 2012, 08:01:23 am »
Can you use Code::Blocks + GDB to debug your Code::Blocks and see gdb's backtrace?
Yes, I can, look:
Code
> 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 ?? ()

daniloz

  • Guest
Re: Help reading codeblocks.RPT
« Reply #22 on: June 14, 2012, 08:06:59 am »
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.
Code
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:
...
I did the same here and if I run it using the debugger, then I receive a segmentation fault and I can see the call stack. However, if I run it normally, i.e. just run from devel, there's no error and no file generated....

It seems things are just strange on my system.... and right now I have no idea what to do/test next....  :'(

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: Help reading codeblocks.RPT
« Reply #23 on: June 14, 2012, 04:27:10 pm »
It seems things are just strange on my system.... and right now I have no idea what to do/test next....  :'(
Could it be that you have GCC in the path? Because when looking for the "exchdl" it may pick up this one first. So verify which one is loaded - yours or another one. Inspect the PATH environment for this running instance of C::B. Use e.g. SysInternals "procexp" (Process Explorer) for that purpose. Maybe the "depends" tool can help, too.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

daniloz

  • Guest
Re: Help reading codeblocks.RPT
« Reply #24 on: June 15, 2012, 08:33:31 am »
It seems things are just strange on my system.... and right now I have no idea what to do/test next....  :'(
Could it be that you have GCC in the path? Because when looking for the "exchdl" it may pick up this one first. So verify which one is loaded - yours or another one. Inspect the PATH environment for this running instance of C::B. Use e.g. SysInternals "procexp" (Process Explorer) for that purpose. Maybe the "depends" tool can help, too.
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 including the exchndl.dll from C::B and it works, I got a report with the right information...

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...

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6077
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Help reading codeblocks.RPT
« Reply #25 on: June 15, 2012, 08:42:23 am »
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 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?  
Quote
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:
Code
char * p = 0;
 *p = 0;
in C::B source does not cause a crash??

EDIT:
Produce a crash is quite easy:
Code
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. :)
« Last Edit: June 15, 2012, 08:46:17 am by ollydbg »
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

daniloz

  • Guest
Re: Help reading codeblocks.RPT
« Reply #26 on: June 15, 2012, 08:54:37 am »
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 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):
Code
/* 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:
Code
char * p = 0;
 *p = 0;
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.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6077
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Help reading codeblocks.RPT
« Reply #27 on: June 15, 2012, 09:03:41 am »
Code
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;
}
Aha, I understand now, you just load the exchndl.dll in your app.

Quote
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:
Code
char * p = 0;
 *p = 0;
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.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

daniloz

  • Guest
Re: Help reading codeblocks.RPT
« Reply #28 on: June 15, 2012, 09:06:23 am »
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...

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6077
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Help reading codeblocks.RPT
« Reply #29 on: June 15, 2012, 09:24:16 am »
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:

Code
char * p = anyIntValue;
*p = 0;
Then, change anyIntValue until your c::b crashed, or you just do a loop like:
Code
for (int i=0;i<0xfffffffffff;i++)
{
char * p = i;
*p = 0;
}
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.