Bug #9183 2006-10-18 16:20
mythor
crash after dubble clicking on breakpont
When in debug modus, double clicking on the current breakpoint sign or double clicking (create and remove a breakpoint) on a other line will crash
Code::Blocks.
(ubuntu build 17-10-06)
- Category
- Application::Crash
- Group
- Status
- Open
- Close date
- Assigned to
History
artoj 2007-01-18 21:01
Confirmed with revision 3505 (Ubuntu Edgy, wxGTK 2.6.3p2).
pecan 2007-02-11 19:58
confirmed SVN 3590 Ubuntu Edgy
Here is a small pgm that can reproduce the error.
Place a breakpoint on the strcpy statement, run the pgm to the breakpoint, then keep double clicking on on the breakpoint.
Pgm will crash, backtrace is not consistent. Sometimes it shows a callback to a null address, sometimes corrupted memory.
// ----------------------------------------------------------------
(codeblocks:1575): GLib-WARNING **: gmain.c:1429: ref_count == 0, but source is still attached to a context!
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1230645584 (LWP 1575)]
0xb6c51d67 in g_main_context_prepare () from /usr/lib/libglib-2.0.so.0
(gdb) bt
#0 0xb6c51d67 in g_main_context_prepare () from /usr/lib/libglib-2.0.so.0
#1 0xb6c524a5 in g_main_context_check () from /usr/lib/libglib-2.0.so.0
#2 0xb6c52b89 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#3 0xb6fc6574 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#4 0xb7baef9b in wxEventLoop::Run () from /usr/lib/libwx_gtk2u_core-2.6.so.0
#5 0xb7c482be in wxAppBase::MainLoop ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#6 0xb7c47981 in wxAppBase::OnRun () from /usr/lib/libwx_gtk2u_core-2.6.so.0
#7 0x080706aa in CodeBlocksApp::OnRun (this=0x81231b0)
at /home/pecan/devel/trunk/src/src/app.cpp:593
#8 0xb79c4f1a in wxEntry () from /usr/lib/libwx_baseu-2.6.so.0
#9 0xb79c4fc6 in wxEntry () from /usr/lib/libwx_baseu-2.6.so.0
#10 0x0806fd6e in main (argc=1, argv=0xbf92f364)
at /home/pecan/devel/trunk/src/src/app.cpp:189
(gdb)
// ---------------------------------------------------------------
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1230707024 (LWP 3319)]
0xffffffff in ?? ()
(gdb) bt
#0 0xffffffff in ?? ()
#1 0xb6c3fc74 in g_source_set_callback () from /usr/lib/libglib-2.0.so.0
#2 0xb6c40561 in g_source_unref () from /usr/lib/libglib-2.0.so.0
#3 0xb6c4099d in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#4 0xb6c437df in g_main_context_check () from /usr/lib/libglib-2.0.so.0
#5 0xb6c43b89 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#6 0xb6fb7574 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#7 0xb7b9ff9b in wxEventLoop::Run () from /usr/lib/libwx_gtk2u_core-2.6.so.0
#8 0xb7c392be in wxAppBase::MainLoop ()
from /usr/lib/libwx_gtk2u_core-2.6.so.0
#9 0xb7c38981 in wxAppBase::OnRun () from /usr/lib/libwx_gtk2u_core-2.6.so.0
#10 0x080706aa in CodeBlocksApp::OnRun (this=0x81231b0)
at /home/pecan/devel/trunk/src/src/app.cpp:593
#11 0xb79b5f1a in wxEntry () from /usr/lib/libwx_baseu-2.6.so.0
#12 0xb79b5fc6 in wxEntry () from /usr/lib/libwx_baseu-2.6.so.0
#13 0x0806fd6e in main (argc=1, argv=0xbfe26844)
at /home/pecan/devel/trunk/src/src/app.cpp:189
(
// --------------------------------------------------------
// Test program
// --------------------------------------------------------
#include <iostream>
#include <cstdlib>
#include <cstring>
using namespace std;
int upstring(char *value);
int main()
{
//asm("int3");
char value[81]={'\0'};
int upper_count;
// perform i/o operation
do
{ cout << "Please type in a String (max. 80 characters): ";
//cin.getline(value, 80);
strcpy(value,"FakeReply");
upper_count = upstring(value);
cout << upper_count << " characters are converted" << endl;
cout << "The new string is now: " << value << endl;
if ( (strlen(value) >3) && (0==strncmp(value,"LOOP",4) ))
break;
}while(upper_count);
// perform infinite loop if user entered text "loop"
if ( (strlen(value) >3) && (0==strncmp(value,"LOOP",4)) )
{
int i = 0;
while(true){
cout<<".";cout.flush();
++i;
sleep(1);
}
}
return EXIT_SUCCESS;
}
int upstring(char *value)
{
int i=0;
while(*value)
{
if(islower(*value))
{
*value=toupper(*value);
i++;
}
value++;
}
return(i);
}
rickg22 2007-06-26 23:37
Does this bug still persist?