View Issue Details

IDProjectCategoryView StatusLast Update
0003025FreeCADBugpublic2017-09-30 17:47
ReportergrandcrossAssigned Towmayer 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionreopened 
Product Version0.17 
Target Version0.17Fixed in Version0.17 
Summary0003025: Unhandled unknown exception caught in GUIApplication::notify when opening file + memory leak
DescriptionThis exception is encountered when opening the attached file. As a result nothing is visible in the display.

I have been able to make the object display again by selecting all objects that are part of the cut and selecting 'View->Visibility->Show Selection', but this is not consistently reproducible.

This file opens and displays fine in earlier builds (eg 10291)
Steps To ReproduceOpen the attached file. View the error in the 'Report View' window.
Additional InformationOS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10999 (Git)
Build type: Release
Branch: debugging
Hash: 297b20e9b532858a9472d3df6eb6b21aa946983d
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.0.0
Tagsmemory leak

Relationships

related to 0003191 closedwmayer Readily reproducible memory leak - FreeCAD doesn't reclaim memory on object deletion / project close. 

Activities

grandcross

2017-05-07 19:47

reporter  

Q Ball.FCStd (228,061 bytes)
QBall.PNG (34,726 bytes)
QBall.PNG (34,726 bytes)
QBallErrors.PNG (16,617 bytes)
QBallErrors.PNG (16,617 bytes)

Kunda1

2017-05-11 03:08

administrator   ~0008948

Please open a forum thread to discuss this with the FC community. Then bidirectionally link ticket <=> thread.

grandcross

2017-05-16 00:47

reporter   ~0009027

Forum thread: https://forum.freecadweb.org/viewtopic.php?f=19&t=22470&p=174321

Also, some other visibility issues probably related...

You can make the object visible by selecting the cut and hitting the space bar. However, if you try to edit a sketch, the display is empty. Similarly, if you delete the cut, the display is empty.

wmayer

2017-05-16 08:42

administrator   ~0009028

The actual crash is fixed now.

However, there is still a massive memory leak. When loading the project which only has 46 objects then around 200 DocumentObjectItem instances are created but less than 100 are destroyed when closing the document.

wmayer

2017-05-16 09:18

administrator   ~0009029

Last edited: 2017-05-16 09:19

View 2 revisions

Add the test code into DocumentObjectItem::DocumentObjectItem

Base::Console().Message("Create item: %d, Object: %s\n", ++countItems, viewObject->getObject()->getNameInDocument());


and in DocumentObjectItem::~DocumentObjectItem()

Base::Console().Message("Delete item: %d, Object: %s\n", countItems--, viewObject->getObject()->getNameInDocument());



When reading the project the output is:
Someone wrote


Create item: 1, Object: Sketch
Create item: 2, Object: Sketch
Create item: 3, Object: Revolution
Create item: 4, Object: Revolution
Create item: 5, Object: Part
Create item: 6, Object: Part
Create item: 7, Object: PartOrigin
Create item: 8, Object: PartOrigin
Create item: 9, Object: X_Axis
Create item: 10, Object: X_Axis
Create item: 11, Object: Y_Axis
Create item: 12, Object: Y_Axis
Create item: 13, Object: Z_Axis
Create item: 14, Object: Z_Axis
Create item: 15, Object: XY_Plane
Create item: 16, Object: XY_Plane
Create item: 17, Object: XZ_Plane
Create item: 18, Object: XZ_Plane
Create item: 19, Object: YZ_Plane
Create item: 20, Object: YZ_Plane
Create item: 21, Object: RevolutionBody
Create item: 22, Object: RevolutionBody
Create item: 23, Object: RevolutionBodyOrigin
Create item: 24, Object: RevolutionBodyOrigin
Create item: 25, Object: X_Axis001
Create item: 26, Object: X_Axis001
Create item: 27, Object: Y_Axis001
Create item: 28, Object: Y_Axis001
Create item: 29, Object: Z_Axis001
Create item: 30, Object: Z_Axis001
Create item: 31, Object: XY_Plane001
Create item: 32, Object: XY_Plane001
Create item: 33, Object: XZ_Plane001
Create item: 34, Object: XZ_Plane001
Create item: 35, Object: YZ_Plane001
Create item: 36, Object: YZ_Plane001
Create item: 37, Object: Part002
Create item: 38, Object: Part002
Create item: 39, Object: Part002Origin
Create item: 40, Object: Part002Origin
Create item: 41, Object: X_Axis004
Create item: 42, Object: X_Axis004
Create item: 43, Object: Y_Axis004
Create item: 44, Object: Y_Axis004
Create item: 45, Object: Z_Axis004
Create item: 46, Object: Z_Axis004
Create item: 47, Object: XY_Plane004
Create item: 48, Object: XY_Plane004
Create item: 49, Object: XZ_Plane004
Create item: 50, Object: XZ_Plane004
Create item: 51, Object: YZ_Plane004
Create item: 52, Object: YZ_Plane004
Create item: 53, Object: Body001
Create item: 54, Object: Body001
Create item: 55, Object: Body001Origin
Create item: 56, Object: Body001Origin
Create item: 57, Object: X_Axis005
Create item: 58, Object: X_Axis005
Create item: 59, Object: Y_Axis005
Create item: 60, Object: Y_Axis005
Create item: 61, Object: Z_Axis005
Create item: 62, Object: Z_Axis005
Create item: 63, Object: XY_Plane005
Create item: 64, Object: XY_Plane005
Create item: 65, Object: XZ_Plane005
Create item: 66, Object: XZ_Plane005
Create item: 67, Object: YZ_Plane005
Create item: 68, Object: YZ_Plane005
Create item: 69, Object: Sketch003
Create item: 70, Object: Sketch003
Create item: 71, Object: Revolution002
Create item: 72, Object: Revolution002
Create item: 73, Object: Sketch004
Create item: 74, Object: Sketch004
Create item: 75, Object: Pocket001
Create item: 76, Object: Pocket001
Create item: 77, Object: Sketch005
Create item: 78, Object: Sketch005
Create item: 79, Object: Pocket002
Create item: 80, Object: Pocket002
Create item: 81, Object: Sketch006
Create item: 82, Object: Sketch006
Create item: 83, Object: Pocket003
Create item: 84, Object: Pocket003
Create item: 85, Object: Mirrored
Create item: 86, Object: Mirrored
Create item: 87, Object: Sketch007
Create item: 88, Object: Sketch007
Create item: 89, Object: Pocket004
Create item: 90, Object: Pocket004
Create item: 91, Object: Cut
Create item: 92, Object: Cut

and
Someone wrote


Create item: 93, Object: Sketch003
Create item: 94, Object: Revolution002
Create item: 95, Object: Sketch004
Create item: 96, Object: Pocket001
Create item: 97, Object: Sketch005
Create item: 98, Object: Pocket002
Create item: 99, Object: Sketch006
Create item: 100, Object: Pocket003
Create item: 101, Object: Mirrored
Create item: 102, Object: Sketch007
Create item: 103, Object: Pocket004
Create item: 104, Object: Sketch003
Create item: 105, Object: Revolution002
Create item: 106, Object: Sketch004
Create item: 107, Object: Pocket001
Create item: 108, Object: Sketch005
Create item: 109, Object: Pocket002
Create item: 110, Object: Sketch006
Create item: 111, Object: Pocket003
Create item: 112, Object: Mirrored
Create item: 113, Object: Sketch007
Create item: 114, Object: Pocket004
Create item: 115, Object: Sketch003
Create item: 116, Object: Revolution002
Create item: 117, Object: Sketch004
Create item: 118, Object: Pocket001
Create item: 119, Object: Sketch005
Create item: 120, Object: Pocket002
Create item: 121, Object: Sketch006
Create item: 122, Object: Pocket003
Create item: 123, Object: Mirrored
Create item: 124, Object: Sketch007
Create item: 125, Object: Pocket004
Create item: 126, Object: Sketch003
Create item: 127, Object: Revolution002
Create item: 128, Object: Sketch004
Create item: 129, Object: Pocket001
Create item: 130, Object: Sketch005
Create item: 131, Object: Pocket002
Create item: 132, Object: Sketch006
Create item: 133, Object: Pocket003
Create item: 134, Object: Mirrored
Create item: 135, Object: Sketch007
Create item: 136, Object: Pocket004
Create item: 137, Object: Sketch003
Create item: 138, Object: Revolution002
Create item: 139, Object: Sketch004
Create item: 140, Object: Pocket001
Create item: 141, Object: Sketch005
Create item: 142, Object: Pocket002
Create item: 143, Object: Sketch006
Create item: 144, Object: Pocket003
Create item: 145, Object: Mirrored
Create item: 146, Object: Sketch007
Create item: 147, Object: Pocket004
Create item: 148, Object: Sketch003
Create item: 149, Object: Revolution002
Create item: 150, Object: Sketch004
Create item: 151, Object: Pocket001
Create item: 152, Object: Sketch005
Create item: 153, Object: Pocket002
Create item: 154, Object: Sketch006
Create item: 155, Object: Pocket003
Create item: 156, Object: Mirrored
Create item: 157, Object: Sketch007
Create item: 158, Object: Pocket004
Create item: 159, Object: Sketch003
Create item: 160, Object: Revolution002
Create item: 161, Object: Sketch004
Create item: 162, Object: Pocket001
Create item: 163, Object: Sketch005
Create item: 164, Object: Pocket002
Create item: 165, Object: Sketch006
Create item: 166, Object: Pocket003
Create item: 167, Object: Mirrored
Create item: 168, Object: Sketch007
Create item: 169, Object: Pocket004
Create item: 170, Object: Sketch003
Create item: 171, Object: Revolution002
Create item: 172, Object: Sketch004
Create item: 173, Object: Pocket001
Create item: 174, Object: Sketch005
Create item: 175, Object: Pocket002
Create item: 176, Object: Sketch006
Create item: 177, Object: Pocket003
Create item: 178, Object: Mirrored
Create item: 179, Object: Sketch007
Create item: 180, Object: Pocket004
Create item: 181, Object: Revolution002
Create item: 182, Object: Pocket001
Create item: 183, Object: Pocket002
Create item: 184, Object: Pocket003
Create item: 185, Object: Mirrored
Create item: 186, Object: Pocket004
Create item: 187, Object: Revolution002
Create item: 188, Object: Pocket001
Create item: 189, Object: Pocket002
Create item: 190, Object: Pocket003
Create item: 191, Object: Mirrored
Create item: 192, Object: Pocket004
Create item: 193, Object: Revolution
Create item: 194, Object: Pocket004
Create item: 195, Object: Revolution
Create item: 196, Object: Pocket004
Create item: 197, Object: Sketch
Create item: 198, Object: Sketch


Now expanding all items in the tree view a few more items are allocated
Someone wrote


Create item: 199, Object: Sketch007
Create item: 200, Object: Sketch007
Create item: 201, Object: Sketch006
Create item: 202, Object: Sketch005
Create item: 203, Object: Sketch004
Create item: 204, Object: Sketch003


When closing the document less than 50% of the items are deleted:
Someone wrote


Delete item: 204, Object: Part
Delete item: 203, Object: PartOrigin
Delete item: 202, Object: X_Axis
Delete item: 201, Object: Y_Axis
Delete item: 200, Object: Z_Axis
Delete item: 199, Object: XY_Plane
Delete item: 198, Object: XZ_Plane
Delete item: 197, Object: YZ_Plane
Delete item: 196, Object: RevolutionBody
Delete item: 195, Object: RevolutionBodyOrigin
Delete item: 194, Object: X_Axis001
Delete item: 193, Object: Y_Axis001
Delete item: 192, Object: Z_Axis001
Delete item: 191, Object: XY_Plane001
Delete item: 190, Object: XZ_Plane001
Delete item: 189, Object: YZ_Plane001
Delete item: 188, Object: Revolution
Delete item: 187, Object: Sketch
Delete item: 186, Object: Part002
Delete item: 185, Object: Part002Origin
Delete item: 184, Object: X_Axis004
Delete item: 183, Object: Y_Axis004
Delete item: 182, Object: Z_Axis004
Delete item: 181, Object: XY_Plane004
Delete item: 180, Object: XZ_Plane004
Delete item: 179, Object: YZ_Plane004
Delete item: 178, Object: Body001
Delete item: 177, Object: Body001Origin
Delete item: 176, Object: X_Axis005
Delete item: 175, Object: Y_Axis005
Delete item: 174, Object: Z_Axis005
Delete item: 173, Object: XY_Plane005
Delete item: 172, Object: XZ_Plane005
Delete item: 171, Object: YZ_Plane005
Delete item: 170, Object: Revolution002
Delete item: 169, Object: Pocket001
Delete item: 168, Object: Pocket002
Delete item: 167, Object: Pocket003
Delete item: 166, Object: Mirrored
Delete item: 165, Object: Pocket004
Delete item: 164, Object: Cut
Delete item: 163, Object: Revolution
Delete item: 162, Object: Sketch
Delete item: 161, Object: Pocket004
Delete item: 160, Object: Part
Delete item: 159, Object: PartOrigin
Delete item: 158, Object: X_Axis
Delete item: 157, Object: Y_Axis
Delete item: 156, Object: Z_Axis
Delete item: 155, Object: XY_Plane
Delete item: 154, Object: XZ_Plane
Delete item: 153, Object: YZ_Plane
Delete item: 152, Object: RevolutionBody
Delete item: 151, Object: RevolutionBodyOrigin
Delete item: 150, Object: X_Axis001
Delete item: 149, Object: Y_Axis001
Delete item: 148, Object: Z_Axis001
Delete item: 147, Object: XY_Plane001
Delete item: 146, Object: XZ_Plane001
Delete item: 145, Object: YZ_Plane001
Delete item: 144, Object: Revolution
Delete item: 143, Object: Sketch
Delete item: 142, Object: Part002
Delete item: 141, Object: Part002Origin
Delete item: 140, Object: X_Axis004
Delete item: 139, Object: Y_Axis004
Delete item: 138, Object: Z_Axis004
Delete item: 137, Object: XY_Plane004
Delete item: 136, Object: XZ_Plane004
Delete item: 135, Object: YZ_Plane004
Delete item: 134, Object: Body001
Delete item: 133, Object: Body001Origin
Delete item: 132, Object: X_Axis005
Delete item: 131, Object: Y_Axis005
Delete item: 130, Object: Z_Axis005
Delete item: 129, Object: XY_Plane005
Delete item: 128, Object: XZ_Plane005
Delete item: 127, Object: YZ_Plane005
Delete item: 126, Object: Revolution002
Delete item: 125, Object: Sketch003
Delete item: 124, Object: Pocket001
Delete item: 123, Object: Sketch004
Delete item: 122, Object: Pocket002
Delete item: 121, Object: Sketch005
Delete item: 120, Object: Pocket003
Delete item: 119, Object: Sketch006
Delete item: 118, Object: Mirrored
Delete item: 117, Object: Pocket004
Delete item: 116, Object: Sketch007
Delete item: 115, Object: Cut
Delete item: 114, Object: Revolution
Delete item: 113, Object: Sketch
Delete item: 112, Object: Pocket004
Delete item: 111, Object: Sketch007


Kunda1

2017-05-22 18:42

administrator   ~0009086

Fixed by wmayer. Closing.

wmayer

2017-06-01 08:03

administrator   ~0009236

Although the originally reported bug is fixed, the report revealed a memory leak in the new tree view implementation which still needs to be fixed.

Kunda1

2017-06-27 11:21

administrator   ~0009558

Made this issue a PDN blocker due to remaining memory leak

Kunda1

2017-08-21 11:21

administrator   ~0009979

@kkremitzki do you have a moment to take a look?

wmayer

2017-08-25 10:02

administrator   ~0010006

The first part (fixed) of the crash could be considered as urgent but the second part with the memory leak is not a show stopper bug and can be degraded to normal priority. Furthermore it's not related to PDN at all but is related to the core system.

wmayer

2017-09-30 17:47

administrator   ~0010222

https://github.com/FreeCAD/FreeCAD/commit/53168d39d6ea03a21f38337363ae0669f1f31507
fixes the discovered memory leak

Related Changesets

FreeCAD: master f6656294

2017-05-16 08:37:34

wmayer

Details Diff
issue 0003025: Unhandled unknown exception caught in GUIApplication::notify when opening file Affected Issues
0003025
mod - src/Gui/Tree.cpp Diff File

Issue History

Date Modified Username Field Change
2017-05-07 19:47 grandcross New Issue
2017-05-07 19:47 grandcross File Added: Q Ball.FCStd
2017-05-07 19:47 grandcross File Added: QBall.PNG
2017-05-07 19:47 grandcross File Added: QBallErrors.PNG
2017-05-11 03:08 Kunda1 Note Added: 0008948
2017-05-16 00:47 grandcross Note Added: 0009027
2017-05-16 08:38 wmayer Changeset attached => FreeCAD master f6656294
2017-05-16 08:42 wmayer Assigned To => wmayer
2017-05-16 08:42 wmayer Status new => resolved
2017-05-16 08:42 wmayer Note Added: 0009028
2017-05-16 09:18 wmayer Note Added: 0009029
2017-05-16 09:19 wmayer Note Edited: 0009029 View Revisions
2017-05-22 18:42 Kunda1 Status resolved => closed
2017-05-22 18:42 Kunda1 Resolution open => fixed
2017-05-22 18:42 Kunda1 Fixed in Version => 0.17
2017-05-22 18:42 Kunda1 Note Added: 0009086
2017-06-01 08:03 wmayer Status closed => assigned
2017-06-01 08:03 wmayer Resolution fixed => reopened
2017-06-01 08:03 wmayer Note Added: 0009236
2017-06-27 11:18 Kunda1 Tag Attached: memory leak
2017-06-27 11:21 Kunda1 Priority normal => high
2017-06-27 11:21 Kunda1 Severity major => block
2017-06-27 11:21 Kunda1 Fixed in Version 0.17 =>
2017-06-27 11:21 Kunda1 Target Version => 0.17
2017-06-27 11:21 Kunda1 Summary Unhandled unknown exception caught in GUIApplication::notify when opening file => Unhandled unknown exception caught in GUIApplication::notify when opening file + memory leak
2017-06-27 11:21 Kunda1 Note Added: 0009558
2017-08-21 11:21 Kunda1 Note Added: 0009979
2017-08-25 10:02 wmayer Priority high => normal
2017-08-25 10:02 wmayer Severity block => major
2017-08-25 10:02 wmayer Note Added: 0010006
2017-08-25 10:02 wmayer Project PartDesign => FreeCAD
2017-09-30 11:36 Kunda1 Relationship added related to 0003191
2017-09-30 17:47 wmayer Status assigned => closed
2017-09-30 17:47 wmayer Fixed in Version => 0.17
2017-09-30 17:47 wmayer Note Added: 0010222