pombreda / dicompyler

Automatically exported from code.google.com/p/dicompyler
0 stars 0 forks source link

TypeError: unsupported operand type(s) for -: 'tuple' and 'Point' #62

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Load thorax patient from Gamos/Geant4.

The following exception occurs:

Unhandled exception: Traceback (most recent call last):
File "P:\python\dicompyler-bdist\dist\baseplugins\2dview.py", line 611, in 
OnMouseMotion
File "P:\python\dicompyler-bdist\dist\baseplugins\2dview.py", line 626, in 
OnLeftIsDown
TypeError: unsupported operand type(s) for -: 'tuple' and 'Point'

Original issue reported on code.google.com by bastula on 2 Jan 2012 at 3:41

GoogleCodeExporter commented 9 years ago
Seems like this is a problem with the mouse handler. Need to probably set the 
mousepos as a wx.Point instead of a tuple.

Regarding the crashing of the binary version, anytime there is an unhandled 
exception, dicompyler will shutdown so that the user can report the error. This 
is kind of abrupt, but otherwise users would never know an error occured and 
accept broken functionality.

Original comment by bastula on 2 Jan 2012 at 3:44

GoogleCodeExporter commented 9 years ago
Sorry for the bad report his warning has always been around for me but has 
never caused a crash before.

The crash is explicitly caused when I double click on the "Series:(CT,...)" 
while loading a patient, the cursor changes to a move arrow real fast then 
crash. Clicking the select button, or hitting return does not cause the crash.

This is happening for me on the windows binary version. Problem does not exist 
in python.

Original comment by lstrd...@gmail.com on 2 Jan 2012 at 4:19

GoogleCodeExporter commented 9 years ago
Understood. The crash will only occur in the binary version because it is a 
*feature* of the error reporter. It will shutdown dicompyler if *any* exception 
occurs, even if it's innocuous. This is the only way to catch and report all 
exceptions as far as I know.

Regardless, I think I have seen this particular error when using the Windows 
version before when I started dragging from inside the 2D view to outside of 
the application. What you are probably seeing since your image set is only a 
few number of slices, the double click is actually registering again with the 
2D view and causing a mouse motion event, even if the image set hasn't fully 
loaded.

I will try to reproduce and fix this.

Original comment by bastula on 2 Jan 2012 at 5:50

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 59b0da22ef35.

Original comment by bastula on 8 Jan 2012 at 3:57