View Issue Details

IDProjectCategoryView StatusLast Update
0001420FreeCADBugpublic2014-02-22 11:08
Reportertanderson69Assigned Towmayer 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Platformamd64OSKubuntuOS Version 13.10
Product Version 
Target VersionFixed in Version0.14 
Summary0001420: exceptions thrown with python object.
Descriptionrunning freecad through gdb there are many exceptions thrown. There are caught and handled properly, so you don't notice this outside of gdb. This happens twice at start up and numerous times upon entering the draft workbench. The backtraces aren't the same but they all have the last 3 calls the same. I will attach one of the backtraces. I am going to do a complete rebuild and make sure I still have this happening.
TagsNo tags attached.

Relationships

related to 0001431 closedyorik Unproper implementation of IsActive() in Python commands 

Activities

tanderson69

2014-02-18 18:32

developer  

gdb_backtrace.txt (Attachment missing)

tanderson69

2014-02-18 18:46

developer   ~0004234

Did a complete rebuild and still having the exceptions. I am on my own branch based from master at c260ede08388753eb4e2ba86fef6a4e75ef57bd5

wmayer

2014-02-19 12:58

administrator   ~0004241

Sorry for my ignorance but what is the point here?

tanderson69

2014-02-19 13:04

developer   ~0004242

I would assume something is wrong to be so regularly generating exceptions out of libstdc++.so.6.

tanderson69

2014-02-21 15:06

developer  

gdb_session.txt (Attachment missing)

tanderson69

2014-02-21 15:09

developer   ~0004257

the gdb_session.txt file was made by starting freecad, entering part workbench, creating 2 blocks and doing a boolean cut. I wouldn't expect such a common usage pattern to generate 8 exceptions. Maybe I have something wrong here.

wmayer

2014-02-22 10:58

administrator   ~0004263

No, everything is fine. But it's true that internally exceptions are thrown and caught inside PyCXX.
+ Two of them were created inside Application::workbenchIcon() which now avoids throwing an exception.
+ Some are thrown because our replacement for sys.stdout/stderr didn't offer an attribute called "softspace". That's also "fixed" now
+ The majority of Python commands implement the "IsActive" method in a non-proper way. E.g. the class AddPoint in Draft:

    def IsActive(self):
        self.selection = Draft.getSelection()
        if (Draft.getType(self.selection[0]) in ['Wire','BSpline']):
            return True
        else:
            return False

As you can see if the selection is empty the "selection[0]" raises an index error. Then we regularly call the IsActive() method in a timer and that's why exceptions are thrown all the time. I think it's worth to make an extra bug report for this one.

wmayer

2014-02-22 11:08

administrator   ~0004264

OK, I close this report now. The issue about the IsActive method is in a separate report.

Issue History

Date Modified Username Field Change
2014-02-18 18:32 tanderson69 New Issue
2014-02-18 18:32 tanderson69 File Added: gdb_backtrace.txt
2014-02-18 18:46 tanderson69 Note Added: 0004234
2014-02-19 12:58 wmayer Note Added: 0004241
2014-02-19 13:04 tanderson69 Note Added: 0004242
2014-02-21 15:06 tanderson69 File Added: gdb_session.txt
2014-02-21 15:09 tanderson69 Note Added: 0004257
2014-02-22 10:58 wmayer Note Added: 0004263
2014-02-22 11:05 wmayer Relationship added related to 0001431
2014-02-22 11:08 wmayer Note Added: 0004264
2014-02-22 11:08 wmayer Status new => closed
2014-02-22 11:08 wmayer Assigned To => wmayer
2014-02-22 11:08 wmayer Resolution open => fixed
2014-02-22 11:08 wmayer Fixed in Version => 0.14