File->Revert crash

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Giovanni Bianchessi
Posts: 12
Joined: Fri Aug 16, 2019 8:16 pm

File->Revert crash

Postby Giovanni Bianchessi » Wed Aug 21, 2019 3:04 pm

File->Revert drive Freecad too crash.

Example sequence:
Run FreeCAD
New project
Create a simple cube using NewBody, Newsketch, Pad
Save the project
File->Revert
(requester to confirm) press Yes
-Crash-

Code: Select all

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000160
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Segmentation fault: 11
Termination Reason:    Namespace SIGNAL, Code 0xb
Terminating Process:   exc handler [0]

VM Regions Near 0x160:
--> 
    __TEXT                 0000000104651000-0000000104659000 [   32K] r-x/rwx SM=COW  /Grafica/FreeCAD.app/Contents/Resources/bin/FreeCAD

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libFreeCADGui.dylib           	0x00000001046ea884 Gui::Document::getViewProvider(App::DocumentObject const*) const + 4
1   PartDesignGui.so              	0x000000015110706e PartDesignGui::ViewProviderBody::updateData(App::Property const*) + 318
2   libFreeCADGui.dylib           	0x0000000104a79e8b Gui::ViewProvider::update(App::Property const*) + 107
3   libFreeCADGui.dylib           	0x00000001046e142f Gui::Document::slotChangedObject(App::DocumentObject const&, App::Property const&) + 143
4   libFreeCADApp.dylib           	0x00000001059b57f8 

Creating an empty project only, saving it and reverting does not crashes the program.

OS: macOS High Sierra (10.13)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.17798 (Git)
Build type: Release
Branch: master
Hash: 7e60631239109c632a8f6cca83f6e7e5502e43a1
Python version: 3.7.3
Qt version: 5.9.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: Italian/Italy (it_IT)
Last edited by Giovanni Bianchessi on Fri Aug 30, 2019 5:48 pm, edited 1 time in total.
User avatar
Kunda1
Posts: 9212
Joined: Thu Jan 05, 2017 9:03 pm

Re: File->Revert crash

Postby Kunda1 » Thu Aug 22, 2019 4:25 pm

This may be related to that info but reported after the "Big Merge"
https://forum.freecadweb.org/viewtopic.php?f=19&t=38746
Alone you go faster. Together we go farther
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
chrisb
Posts: 30686
Joined: Tue Mar 17, 2015 9:14 am

Re: File->Revert crash

Postby chrisb » Thu Aug 22, 2019 9:20 pm

Crash confirmed.

Same with similar use case: Open an existing file, change nothing, revert -> crash.

OS: macOS High Sierra (10.13)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.17798 (Git)
Build type: Release
Branch: master
Hash: 7e60631239109c632a8f6cca83f6e7e5502e43a1
Python version: 3.7.3
Qt version: 5.9.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Germany (en_DE)
You need at least FreeCAD 0.19.23300 to edit my current sketches.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
chrisb
Posts: 30686
Joined: Tue Mar 17, 2015 9:14 am

Re: File->Revert crash

Postby chrisb » Thu Aug 29, 2019 9:55 am

While the undo issue linked above is fixed, the revert crash is still present. I have investigated it further and found the following behaviour.

Precondition: FreeCAD is started and Start WB is open.
  • Use case: new document
    - create a new document
    - switch to Part WB
    - create a standard cube
    - save it
    - revert it
    After the confirmation the tab is closed and I see only Start WB tab
    The cube is still available in the tree, I have to open a new view to show it
  • Use case: simple existing document
    - open the cube from above
    - change something, e.g. height to 20
    - revert
    -> same situation as previous use case
  • Use case: existing more complex document
    - load file 20190828-bathroom.countertop.FCStd attached to bejant's post https://forum.freecadweb.org/viewtopic. ... 63#p330163
    - revert without changing anything-> Crash!
  • Same use case as before with changing something
    ->Same behaviour: crash!
OS: macOS High Sierra (10.13)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.17904 (Git)
Build type: Release
Branch: master
Hash: ffcac528d54195092a8ab2e9ab6f4ed39bcaebbc
Python version: 3.7.3
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Germany (en_DE)

There are different places where issues are reported. The tracker is the right place to track these. Users can see if they are fixed or not. I would vote for a new project "Link" where the Big Link Merge issues are collected.

To keep realthunder's back as free as possible I encourage other users to keep track of the state of those tickets.
You need at least FreeCAD 0.19.23300 to edit my current sketches.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Giovanni Bianchessi
Posts: 12
Joined: Fri Aug 16, 2019 8:16 pm

Re: File->Revert crash

Postby Giovanni Bianchessi » Thu Aug 29, 2019 5:07 pm

With release 17904, also opening a recent file lead to crash:

Code: Select all

Process:               FreeCAD [22374]
Path:                  /private/var/folders/*/FreeCAD.app/Contents/Resources/bin/FreeCAD
Identifier:            ???
Version:               ??? (0.19-17904)
Code Type:             X86-64 (Native)
Parent Process:        ??? [22370]
Responsible:           FreeCAD [22374]
User ID:               507

Date/Time:             2019-08-29 19:03:00.991 +0200
OS Version:            Mac OS X 10.13.6 (17G8030)
Report Version:        12
Anonymous UUID:        B86CC982-2F52-FB9B-B3CE-5EBB7D92DE4B

Sleep/Wake UUID:       D1DF9A21-3056-4583-A879-488FBB439DC8

Time Awake Since Boot: 20000 seconds
Time Since Wake:       1300 seconds

System Integrity Protection: enabled

Notes:                 Translocated Process

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Segmentation fault: 11
Termination Reason:    Namespace SIGNAL, Code 0xb
Terminating Process:   exc handler [0]
Regards
Giovanni Bianchessi
Last edited by Giovanni Bianchessi on Fri Aug 30, 2019 5:46 pm, edited 3 times in total.
chrisb
Posts: 30686
Joined: Tue Mar 17, 2015 9:14 am

Re: File->Revert crash

Postby chrisb » Thu Aug 29, 2019 8:56 pm

If you use code tags </> the post's readability is improved. You can edit your post.
You need at least FreeCAD 0.19.23300 to edit my current sketches.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.