Conditional combobox, with toolbar overlap, crashes app

Bug #386638 reported by Juho Vepsäläinen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Phatch
Fix Released
Critical
Stani

Bug Description

Add "Color to Alpha" action. Change "Select Color By" to the last option. Change it back to the first option so that it overlap with the toolbar.

-> crash:
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 14614, in <lambda>
    lambda event: event.callable(*event.args, **event.kw) )
  File "/usr/local/lib/python2.6/site-packages/phatch/pyWx/lib/popup.py", line 124, in OnAfterChange
    self.on_change(unicode(self.Get()))
  File "/usr/lib/python2.6/site-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 14564, in __getattr__
    raise PyDeadObjectError(self.attrStr % self._name)
wx._core.PyDeadObjectError: The C++ part of the Choice object has been deleted, attribute access no longer allowed.
jutuveps@linux-v4f0:~/Projects/phatch/phatch> phatch
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 14614, in <lambda>
    lambda event: event.callable(*event.args, **event.kw) )
  File "/usr/local/lib/python2.6/site-packages/phatch/pyWx/lib/popup.py", line 124, in OnAfterChange
    self.on_change(unicode(self.Get()))
  File "/usr/lib/python2.6/site-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 14564, in __getattr__
    raise PyDeadObjectError(self.attrStr % self._name)
wx._core.PyDeadObjectError: The C++ part of the Choice object has been deleted, attribute access no longer allowed.

Tested in rev. 766 of trunk.

Revision history for this message
Stani (stani) wrote :

Hi Juho, I can't reproduce this. Could you attach an action list and an example image? Also exactly describe the steps to reproduce as this might be dependent on what you did before as it doesn't reproduce out of the box. I try a possible fix as well and push it upstream. So try again.

$ bzr commit -m "avoid dead object"
Committing to: /home/stani/sync/python/phatch/trunk/
modified phatch/pyWx/lib/popup.py
Committed revision 767.

$ bzr diff -r-2
=== modified file 'phatch/pyWx/lib/popup.py'
--- phatch/pyWx/lib/popup.py 2009-06-12 03:53:32 +0000
+++ phatch/pyWx/lib/popup.py 2009-06-13 11:41:54 +0000
@@ -121,7 +121,8 @@
         wx.CallAfter(self.OnAfterChange)

     def OnAfterChange(self):
- self.on_change(unicode(self.Get()))
+ if self:
+ self.on_change(unicode(self.Get()))

 class TextCtrl(_CtrlChoices,wx.ComboBox):
     def __init__(self,parent,value,id=-1,choices=None,**keyw):

Changed in phatch:
assignee: nobody → stani (stani)
status: New → Incomplete
Revision history for this message
Juho Vepsäläinen (bebraw) wrote :

I attached an action list (just color to alpha really :) ) and an image (note that it doesn't show color as it should!).

It does not give an error message anymore. However, as seen on the image, it doesn't show "color" option always if "select color by" is set to "value". I think it's still missing something.

Revision history for this message
Juho Vepsäläinen (bebraw) wrote :
Stani (stani)
Changed in phatch:
importance: Undecided → Critical
status: Incomplete → Confirmed
Revision history for this message
Stani (stani) wrote :

Please try again with the latest version.

$ bzr commit -m "fix combobox bug"
Committing to: /home/stani/sync/python/phatch/trunk/
modified phatch/pyWx/lib/popup.py
Committed revision 769.

Changed in phatch:
status: Confirmed → Fix Committed
summary: - Color to Alpha action - Select Color By field crashes app
+ Conditional combobox, with toolbar overlap, crashes app
description: updated
Revision history for this message
robinmills (robinmills) wrote :

Seems to be working fine on the Mac.

Revision history for this message
Juho Vepsäläinen (bebraw) wrote :

It works without any problems now. Thanks for the fix.

Stani (stani)
Changed in phatch:
milestone: none → 0.2.1
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.