Calendar (CalenDlg) crash

4 views
Skip to first unread message

Jorge Godoy

unread,
Dec 29, 2003, 9:44:12 AM12/29/03
to wxPytho...@lists.wxwindows.org
Hi,


How can I debug a crash with a CalenDlg on my application? I have the
core files, but I must confess I'm not used to use gdb or other
debuggers. I think I'm missing something on my code...

What happens is that when I invoke the dialog by clicking a button,
the screen is shown correctly and then when I choose a different
month in the combo box or through the spin control the dialog
crashes, closing my application with it and dumping core.

This happens on a Linux box with:

python 2.2.2
wxPythonGTK 2.4.1.2

Some code snippets follow, from my app source:

-----------------------------------------

from wxPython.lib.calendar import CalenDlg

(...)

EVT_BUTTON(self, ID_BTN_CALENDARIO, self.DialogoCalendario)

(...)

def DialogoCalendario(self, event):
dlg = CalenDlg(self)
dlg.Centre()
if dlg.ShowModal() == wxID_OK:
result = dlg.result
print result
day = result[1]
month = result[2]
year = result[3]
new_date = str(day) + '/' + str(month) + '/' + str(year)
self.txtData.SetValue('%s' % new_date)

--------------------------------------------

self.txtData is:

self.txtData = wxTextCtrl(self.ntbkEntradaDados, -1, "")


Am I missing something? Should I add more controls?

As you can see, the code above is almost the same from the demo and
there it works perfectly. What minimum auxiliary controls should I
have here to make it work?


TIA,
--
Godoy. <go...@metalab.unc.edu>

Jorge Godoy

unread,
Dec 29, 2003, 2:11:39 PM12/29/03
to wxPytho...@lists.wxwindows.org
On Monday 29 December 2003 12:44, Jorge Godoy (Jorge Godoy
<go...@metalab.unc.edu>) wrote:

> What happens is that when I invoke the dialog by clicking a button,
> the screen is shown correctly and then when I choose a different
> month in the combo box or through the spin control the dialog
> crashes, closing my application with it and dumping core.

I found the problem. It only happens when Psyco is used. I isolated
this part of the code and everything is working fine now.


Thanks.
--
Godoy. <go...@metalab.unc.edu>

Reply all
Reply to author
Forward
0 new messages