Bug #13029 2008-01-26 18:45

pecan

Scripting console crashes codeblocks

Executing a statement line:
Wizard.AddCompilerPage(_T(""), _T("*"), true, true);

in the script console crashes codeblocks.

Program received signal SIGSEGV, Segmentation fault.
0x63c427a0 in Wizards::operator[] (this=0x3e6cdb0, uiIndex=3131961357)
    at c:/Usr/Proj/cbBeta/trunk/src/plugins/scriptedwizard/wiz.h:51
51      WX_DECLARE_OBJARRAY(WizardInfo, Wizards);
(gdb) bt
#0  0x63c427a0 in Wizards::operator[] (this=0x3e6cdb0, uiIndex=3131961357)
    at c:/Usr/Proj/cbBeta/trunk/src/plugins/scriptedwizard/wiz.h:51
#1  0x63c2197f in Wiz::AddCompilerPage (this=0x3e6cd80, compilerID=@0x195f368,
    validCompilerIDs=@0x40d18b0, allowCompilerChange=true,
    allowConfigChange=true)
    at c:/Usr/Proj/cbBeta/trunk/src/plugins/scriptedwizard/wiz.cpp:1031
#2  0x63c3d6d7 in SqPlus::ReturnSpecialization<void>::Call<Wiz, wxString const&,
 wxString const&, bool, bool> (callee=@0x3e6cd80, func=
      {__pfn = &Wiz::AddCompilerPage(wxString const&, wxString const&, bool, boo
l), __delta = 0}, v=0x11269f0, index=2)
    at include/scripting/sqplus/sqplus.h:1024
#3  0x63c3f6e5 in SqPlus::Call<Wiz, void, wxString const&, wxString const&, bool
, bool> (callee=@0x3e6cd80, func=
      {__pfn = &Wiz::AddCompilerPage(wxString const&, wxString const&, bool, boo
l), __delta = 0}, v=0x11269f0, index=2)
    at include/scripting/sqplus/sqplus.h:1163
#4  0x63c3ee0e in SqPlus::DirectCallInstanceMemberFunction<Wiz, void (Wiz::*)(wx
String const&, wxString const&, bool, bool)>::Dispatch (v=0x11269f0)
    at include/scripting/sqplus/sqplus.h:1244
#5  0x6197c9ba in SQVM::CallNative (this=0x11269f0, nclosure=0x405da78,
    nargs=5, stackbase=187, tailcall=false, retval=@0x1126a48,
    suspend=@0x22e84f)
    at c:/Usr/Proj/cbBeta/trunk/src/sdk/scripting/squirrel/sqvm.cpp:1108
---Type <return> to continue, or q <return> to quit---q
Quit (expect signal SIGINT when the program is resumed)
(gdb) f 0
#0  0x63c427a0 in Wizards::operator[] (this=0x3e6cdb0, uiIndex=3131961357)
    at c:/Usr/Proj/cbBeta/trunk/src/plugins/scriptedwizard/wiz.h:51
51      WX_DECLARE_OBJARRAY(WizardInfo, Wizards);
(gdb) l
46          wxBitmap templatePNG;
47          wxBitmap wizardPNG;
48          wxString xrc;
49      };
50
51      WX_DECLARE_OBJARRAY(WizardInfo, Wizards);
52      WX_DEFINE_ARRAY(wxWizardPageSimple*, WizPages);
53
54      class Wiz : public cbWizardPlugin
55      {
(gdb) f 1
#1  0x63c2197f in Wiz::AddCompilerPage (this=0x3e6cd80, compilerID=@0x195f368,
    validCompilerIDs=@0x40d18b0, allowCompilerChange=true,
    allowConfigChange=true)
    at c:/Usr/Proj/cbBeta/trunk/src/plugins/scriptedwizard/wiz.cpp:1031
1031        m_pWizCompilerPanel = new WizCompilerPanel(compilerID, validCompiler
IDs, m_pWizard, m_Wizards[m_LaunchIndex].wizardPNG, allowCompilerChange, allowCo
nfigChange);
(gdb) l
1026
1027    void Wiz::AddCompilerPage(const wxString& compilerID, const wxString& va
lidCompilerIDs, bool allowCompilerChange, bool allowConfigChange)
1028    {
1029        if (m_pWizCompilerPanel)
1030            return; // already added
1031        m_pWizCompilerPanel = new WizCompilerPanel(compilerID, validCompiler
IDs, m_pWizard, m_Wizards[m_LaunchIndex].wizardPNG, allowCompilerChange, allowCo
nfigChange);
1032        if (!m_pWizCompilerPanel->SkipPage())
1033            m_Pages.Add(m_pWizCompilerPanel);
1034        else
1035        {
(gdb) p compilerID
$1 = (const wxString &) @0x195f368: {<wxStringBase> = {
    static npos = 4294967295, m_pchData = 0x1061324c}, <No data fields>}
(gdb) p validCompilerIDs
$2 = (const wxString &) @0x40d18b0: {<wxStringBase> = {
    static npos = 4294967295, m_pchData = 0x40909d4}, <No data fields>}
(gdb) p m_pWizard
$3 = (struct wxWizard *) 0x0
(gdb) p m_Wizards[m_LaunchIndex]

Program received signal SIGSEGV, Segmentation fault.
0x63c427a0 in Wizards::operator[] (this=0x3e6cdb0, uiIndex=3131961357)
    at c:/Usr/Proj/cbBeta/trunk/src/plugins/scriptedwizard/wiz.h:51
51      WX_DECLARE_OBJARRAY(WizardInfo, Wizards);
The program being debugged was signaled while in a function called from GDB.
GDB remains in the frame where the signal was received.
To change this behavior use "set unwindonsignal on"
Evaluation of the expression containing the function (Wizards::operator[](unsign
ed int) const) will be abandoned.
(gdb)
Category
Application::Crash
Group
 
Status
Closed
Close date
2008-04-05 12:57
Assigned to
biplab
mortenmacfly 2008-01-30 10:14

Not for me. It just works fine. Which C::B version / OS do you use? PLease give more details...

pecan 2008-01-30 13:45
biplab 2008-04-05 12:57

This bug is now fixed in HEAD.

Thank you for reporting it.