Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Crash with empty DLL target
iw2nhl:
Steps to reproduce:
1) Start codeblocks
2) New project from template "Empty project"
3) Give a name and leave everything else as default
4) New build target from template "Dynamic link library"
5) Give a name (I used 'dll') and leave everything else as default
6) Build
Result:
after some seconds in which everything seems freezed, a window shows up.
It is standard Windows error message for crashes:
<The instruction at "0x00000434" referenced memory at "0x00000434". The memory could not be "read".>
The previous line in the call stack is:
6194EB5A call ecx
with ecx = 1076 = 0x00000434 (but it varies every time)
Then a codeblocks.RPT is created.
NOTICE THIS:
If you re-execute the same steps without deleting the codeblocks.RPT file, the standard Windows error message is NOT shown, instead a new window is shown:
"Exception!"
And, in short, it says this:
- error at:
sdk\compilercommandgenerator.cpp, on line 101
- error message:
Compiler for target 'dll' is invalid!
Why the 2 different behaviours depending on the presence/absence of the "codeblocks.RPT" file?
OS:
Windows 2000 SP4
CodeBlocks version (nightly build):
Version 1.0 revision 2740 () gcc 3.4.5 Windows/unicode
codeblocks.RPT:
--- Code: ----------------------
Error occured on Saturday, July 15, 2006 at 15:30:27.
C:\CodeBlocks\Installed\codeblocks.exe caused an Access Violation at location 00000434 Reading from location 00000434.
Registers:
eax=00000001 ebx=0022f04c ecx=00000434 edx=474e5543 esi=661784f8 edi=02447c90
eip=00000434 esp=0022f024 ebp=0022f060 iopl=0 nv up ei pl nz na pe nc
cs=001b ss=0023 ds=0023 es=0023 fs=0038 gs=0000 efl=00010202
Call stack:
00000434
6194EB5C C:\CodeBlocks\Installed\codeblocks.dll:6194EB5C _ZN7SQLexer6ReadIDEv
61944EB5 C:\CodeBlocks\Installed\codeblocks.dll:61944EB5 _ZN7SQLexer6ReadIDEv
617F5ED2 C:\CodeBlocks\Installed\codeblocks.dll:617F5ED2 _ZN24CompilerCommandGenerator4InitEP9cbProject
617ECD98 C:\CodeBlocks\Installed\codeblocks.dll:617ECD98 _ZN8Compiler4InitEP9cbProject
660D067B C:\CodeBlocks\Installed\share\codeblocks\plugins\compilergcc.dll:660D067B PluginSDKVersion
660D1720 C:\CodeBlocks\Installed\share\codeblocks\plugins\compilergcc.dll:660D1720 PluginSDKVersion
660D2237 C:\CodeBlocks\Installed\share\codeblocks\plugins\compilergcc.dll:660D2237 PluginSDKVersion
660D2315 C:\CodeBlocks\Installed\share\codeblocks\plugins\compilergcc.dll:660D2315 PluginSDKVersion
660D3FFA C:\CodeBlocks\Installed\share\codeblocks\plugins\compilergcc.dll:660D3FFA PluginSDKVersion
660C4D9F C:\CodeBlocks\Installed\share\codeblocks\plugins\compilergcc.dll:660C4D9F PluginSDKVersion
100AA808 C:\CodeBlocks\Installed\wxmsw26u_gcc_cb.dll:100AA808 _ZN12wxEvtHandler21ProcessEventIfMatchesERK21wxEventTableEntryBasePS_R7wxEvent
100AABCC C:\CodeBlocks\Installed\wxmsw26u_gcc_cb.dll:100AABCC _ZN16wxEventHashTable11HandleEventER7wxEventP12wxEvtHandler
100ABBA9 C:\CodeBlocks\Installed\wxmsw26u_gcc_cb.dll:100ABBA9 _ZN12wxEvtHandler12ProcessEventER7wxEvent
100ABB49 C:\CodeBlocks\Installed\wxmsw26u_gcc_cb.dll:100ABB49 _ZN12wxEvtHandler12ProcessEventER7wxEvent
100ABB49 C:\CodeBlocks\Installed\wxmsw26u_gcc_cb.dll:100ABB49 _ZN12wxEvtHandler12ProcessEventER7wxEvent
100ABB49 C:\CodeBlocks\Installed\wxmsw26u_gcc_cb.dll:100ABB49 _ZN12wxEvtHandler12ProcessEventER7wxEvent
100ABB49 C:\CodeBlocks\Installed\wxmsw26u_gcc_cb.dll:100ABB49 _ZN12wxEvtHandler12ProcessEventER7wxEvent
100ABB49 C:\CodeBlocks\Installed\wxmsw26u_gcc_cb.dll:100ABB49 _ZN12wxEvtHandler12ProcessEventER7wxEvent
100ABB49 C:\CodeBlocks\Installed\wxmsw26u_gcc_cb.dll:100ABB49 _ZN12wxEvtHandler12ProcessEventER7wxEvent
100ABB49 C:\CodeBlocks\Installed\wxmsw26u_gcc_cb.dll:100ABB49 _ZN12wxEvtHandler12ProcessEventER7wxEvent
100ABB49 C:\CodeBlocks\Installed\wxmsw26u_gcc_cb.dll:100ABB49 _ZN12wxEvtHandler12ProcessEventER7wxEvent
100ABB49 C:\CodeBlocks\Installed\wxmsw26u_gcc_cb.dll:100ABB49 _ZN12wxEvtHandler12ProcessEventER7wxEvent
100ABB49 C:\CodeBlocks\Installed\wxmsw26u_gcc_cb.dll:100ABB49 _ZN12wxEvtHandler12ProcessEventER7wxEvent
100ABB49 C:\CodeBlocks\Installed\wxmsw26u_gcc_cb.dll:100ABB49 _ZN12wxEvtHandler12ProcessEventER7wxEvent
100ABB49 C:\CodeBlocks\Installed\wxmsw26u_gcc_cb.dll:100ABB49 _ZN12wxEvtHandler12ProcessEventER7wxEvent
100ABB49 C:\CodeBlocks\Installed\wxmsw26u_gcc_cb.dll:100ABB49 _ZN12wxEvtHandler12ProcessEventER7wxEvent
100ABB49 C:\CodeBlocks\Installed\wxmsw26u_gcc_cb.dll:100ABB49 _ZN12wxEvtHandler12ProcessEventER7wxEvent
100ABB49 C:\CodeBlocks\Installed\wxmsw26u_gcc_cb.dll:100ABB49 _ZN12wxEvtHandler12ProcessEventER7wxEvent
100ABB49 C:\CodeBlocks\Installed\wxmsw26u_gcc_cb.dll:100ABB49 _ZN12wxEvtHandler12ProcessEventER7wxEvent
101B30A3 C:\CodeBlocks\Installed\wxmsw26u_gcc_cb.dll:101B30A3 _ZN11wxFrameBase14ProcessCommandEi
1013868F C:\CodeBlocks\Installed\wxmsw26u_gcc_cb.dll:1013868F _ZN7wxFrame13HandleCommandEttPv
10138DB6 C:\CodeBlocks\Installed\wxmsw26u_gcc_cb.dll:10138DB6 _ZN7wxFrame13MSWWindowProcEjjl
1010D6D0 C:\CodeBlocks\Installed\wxmsw26u_gcc_cb.dll:1010D6D0 _Z9wxWndProcP6HWND__jjl@16
77E4158F C:\WINNT\system32\USER32.dll:77E4158F __imp__GetViewportExtEx@8
77E41DC9 C:\WINNT\system32\USER32.dll:77E41DC9 __imp__GetViewportExtEx@8
77E41E7E C:\WINNT\system32\USER32.dll:77E41E7E __imp__GetViewportExtEx@8
100ED0A4 C:\CodeBlocks\Installed\wxmsw26u_gcc_cb.dll:100ED0A4 _ZN11wxEventLoop8DispatchEv
100ECE40 C:\CodeBlocks\Installed\wxmsw26u_gcc_cb.dll:100ECE40 _ZN11wxEventLoop3RunEv
10186AFE C:\CodeBlocks\Installed\wxmsw26u_gcc_cb.dll:10186AFE _ZN9wxAppBase8MainLoopEv
004046E4 C:\CodeBlocks\Installed\codeblocks.exe:004046E4
10043B67 C:\CodeBlocks\Installed\wxmsw26u_gcc_cb.dll:10043B67 _Z14wxUninitializev
100B3ADA C:\CodeBlocks\Installed\wxmsw26u_gcc_cb.dll:100B3ADA _Z7wxEntryP11HINSTANCE__S0_Pci
004014D8 C:\CodeBlocks\Installed\codeblocks.exe:004014D8
00467C7A C:\CodeBlocks\Installed\codeblocks.exe:00467C7A
00401237 C:\CodeBlocks\Installed\codeblocks.exe:00401237
004012A8 C:\CodeBlocks\Installed\codeblocks.exe:004012A8
7C598989 C:\WINNT\system32\KERNEL32.dll:7C598989 ProcessIdToSessionId
--- End code ---
iw2nhl:
Anyone else can see this bug?
As a side note, with today's nigthly build the message is different and is always the same, indipendently if there is the "codeblocks.RPT" file or not.
killerbot:
I hope to look into it later this week.
killerbot:
I've done a first test : when looking at the generated cbp (after saving it first), there's no compiler specified :
<Option compiler="" />
The same happens when you created a console target instead of the dll target in your example. So my first guess would be to say that the error is in the scripting wizards. Since they now create the cbp file.
Next to that, when you reopen that 'faulty' cbp, then CB will ask to specify a compiler. The ultimate correct thing foCB was to do this also after the 'bad' target generated from the wizards.
One could also argue, just use the compiler from the project level then, but this would mask the problem. Yeah, I know tell the user the entry was not correct and that the switch to project level is going to take place ;-)
But that brings us back to the point that CB did not see the mistake the first time around.
[EDIT] : well it could also be the surrounding code driving the scripts. But the scripts did not ask which compiler to use, and they should !!!
iw2nhl:
Surely it is better to remove the bug!
Anyway having a default behaviour for this bug is not a bad idea. It could use the project compiler, but show a message asking to report the bug to the plugin developer.
This would achive that:
1) C::B does not crash
2) the bug is not forgotten
What do you think about this?
Navigation
[0] Message Index
[#] Next page
Go to full version