Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Crash using copy and paste (reproducable)

<< < (6/6)

Pecan:

--- Quote from: Biplab on February 12, 2007, 07:07:16 pm ---Thanks for the instruction.  :D

But I would like to ask another question regarding debugging of wxWidgets based app with GDB in Linux. I read the following post in wxWidgets forum.

http://wxforum.shadonet.com/viewtopic.php?t=12530

It says that the user can't see the contents of wxString with GDB in Unicode mode. I tried it and found that in C::B too, in Watches Window I can't see the wxString contents. AFAIK it's possible to view the contents of wxString in Unicode mode with MS Debugger. Why is it so? :)

--- End quote ---

I suppose because unicode is so full of zeros. It makes it look like the string is empty.

You would need a script to call cbU2C(my watched string) to make it into a c_str.

Just a guess.

I'm no script wizard, not even a novice, but you might be able to issue these commands to gdb and show the results:


--- Code: ---bool testwxApp::OnInit()
{
testwxFrame* frame = new testwxFrame(0L, _("wxWidgets Application Template"));
frame->SetIcon(wxICON(aaaa)); // To Set App Icon
frame->Show();

wxString msg;
msg = wxT("test unicode string");
asm("int3");
return true;
}

C:\temp\testwx\bin>gdb testwx.exe
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-mingw32"...
(gdb) run
Starting program: C:\temp\testwx\bin/testwx.exe
gdb: do_initial_child_stuff: process 1572
gdb: kernel event for pid=1572 tid=288 code=CREATE_PROCESS_DEBUG_EVENT)
gdb: child_resume.SetThreadContext: thread 1572.0x120
ContinueDebugEvent (cpid=1572, ctid=288, DBG_CONTINUE);
<snip>
Program received signal SIGTRAP, Trace/breakpoint trap.
testwxApp::OnInit (this=0xb59290) at C:/temp/testwx/testwxApp.cpp:32
32              return true;
Current language:  auto; currently c++
(gdb) l
27              frame->Show();
28
29              wxString msg;
30              msg = wxT("test unicode string");
31              asm("int3");
32              return true;
33      }
(gdb) p msg
$1 = {<wxStringBase> = {static npos = 4294967295,
    m_pchData = 0xb6a654}, <No data fields>}
(gdb) p msg.m_pchData
$2 = (wxChar *) 0xb6a654
(gdb) x/20s msg.m_pchData
0xb6a654:        "t"
0xb6a656:        "e"
0xb6a658:        "s"
0xb6a65a:        "t"
0xb6a65c:        " "
0xb6a65e:        "u"
0xb6a660:        "n"
0xb6a662:        "i"
0xb6a664:        "c"
0xb6a666:        "o"
0xb6a668:        "d"
0xb6a66a:        "e"
0xb6a66c:        " "
0xb6a66e:        "s"
0xb6a670:        "t"
0xb6a672:        "r"
0xb6a674:        "i"
0xb6a676:        "n"
0xb6a678:        "g"
0xb6a67a:        ""
(gdb)

--- End code ---

Biplab:
Thanks for the details.  :D

Today I ran C::B through GDB. I got no crash during Copy-Paste operation. But I got some warning and critical error messages and one SIGSEGV fault. I'm attaching the full log alongwith BackTrace.

I'll post a link to your reply in wxWidgets forum, may be that would be helpful for the user.


--- Quote from: Pecan on February 12, 2007, 07:55:54 pm ---I'm no script wizard, not even a novice, but you might be able to issue these commands to gdb and show the results:

--- End quote ---

BTW, I'm no script wiz, too. ;)  Coz I was working on modifying the project wizards of C::B, I got that name.  :D

Please post if you need more GDB logs.

Regards,

Biplab


Edit 1: I observed the SIGSEGV fault during exit. :)

[attachment deleted by admin]

fleuba:
Hi all,

C::B just crashed during copying a piece of code.
Attached is the backtrace, with some info on top of the file.

I'm available to help fixing this bug...
Give me instructions here to search, what to test for you.

CU,
Fred

[attachment deleted by admin]

Navigation

[0] Message Index

[*] Previous page

Go to full version