[Solved] Ticket #4191 - Crash on spreadsheet in-cell value edit

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
lpala
Posts: 11
Joined: Sun Nov 10, 2019 6:46 am

[Solved] Ticket #4191 - Crash on spreadsheet in-cell value edit

Post by lpala »

Hi,
I'm using FreeCAD dev snapshot (0.19pre branch). I'm experiencing a crash when editing spreadsheet's values in cell. it's not happening editing them in formula field. It happens since more a month (sorry I cant remember the first snapshot that contained this bug).
It doesn't happen in 0.18 branch (al least up to 0.18.3).

I've already filed a bug in mantis: 0004191(sorry, i've searched it in forum and i've not found any reference to I filed it directly).

Does anyone have the same problem?
Thanks
Luca

OS: macOS Mojave (10.14)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18694 (Git)
Build type: Release
Branch: master
Hash: c3ba04183e016e15410d84bae4d00556d22c7da5
Python version: 3.7.3
Qt version: 5.12.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: Italian/Italy (it_IT)
Last edited by Kunda1 on Mon Jan 13, 2020 7:38 pm, edited 2 times in total.
Reason: Changed to [SOLVED]
chrisb
Veteran
Posts: 54201
Joined: Tue Mar 17, 2015 9:14 am

Re: Crash on spreadsheet in-cell value edit

Post by chrisb »

These bug reports without discussing first are really a pain in the ass. Are you really unable to read a huuuge banner? And not even now any crossreferences :roll:

What could we have done to make you create a forum discussion first?
Bildschirmfoto 2019-11-10 um 10.51.36.png
Bildschirmfoto 2019-11-10 um 10.51.36.png (108.8 KiB) Viewed 1530 times
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
chrisb
Veteran
Posts: 54201
Joined: Tue Mar 17, 2015 9:14 am

Re: Crash on spreadsheet in-cell value edit

Post by chrisb »

Works here flawless.
For reproducing I did
- create a spreadsheet
- doubleclick for editing the spreadsheet
- select cell a1
- enter value 1
- select cell b2
- enter value 2
- select cell c3
- enter value 3


OS: macOS High Sierra (10.13)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18644 (Git)
Build type: Release
Branch: master
Hash: 481870be2b48ef95b59acf1440b069d42b6fad23
Python version: 3.7.3
Qt version: 5.12.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Germany (en_DE)
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
openBrain
Veteran
Posts: 9041
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Crash on spreadsheet in-cell value edit

Post by openBrain »

chrisb wrote: Sun Nov 10, 2019 10:10 am Works here flawless.
Your version seems to be 50 commits behind OP's one. ;) Maybe a regression.
chrisb
Veteran
Posts: 54201
Joined: Tue Mar 17, 2015 9:14 am

Re: Crash on spreadsheet in-cell value edit

Post by chrisb »

openBrain wrote: Sun Nov 10, 2019 10:14 am Your version seems to be 50 commits behind OP's one. ;) Maybe a regression.
It's one week old, i.e. less than a month. The new version is out right now, I will retry.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
chrisb
Veteran
Posts: 54201
Joined: Tue Mar 17, 2015 9:14 am

Re: Crash on spreadsheet in-cell value edit

Post by chrisb »

Same test as above, works still flawless.

OS: macOS High Sierra (10.13)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18694 (Git)
Build type: Release
Branch: master
Hash: c3ba04183e016e15410d84bae4d00556d22c7da5
Python version: 3.7.3
Qt version: 5.12.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Germany (en_DE)
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Crash on spreadsheet in-cell value edit

Post by Kunda1 »

lpala wrote: Sun Nov 10, 2019 6:53 am :bell:
Care to retest with latest dev version and report back ?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
lpala
Posts: 11
Joined: Sun Nov 10, 2019 6:46 am

Re: Crash on spreadsheet in-cell value edit

Post by lpala »

Hi All,
i've just downloaded latest version and started debugging it with lldb.
I've the same behaviour. If I edit a cell directly from it, FC will crash. If I edit int formula area it will not crash.

I've tried with an empty document and it doesn't crash. But add a part and setting some references in sketches make FC crash again.

It seems to be related at some recomputing actions (even if it's so strange).

Here is the back trace generated by lldb:

Code: Select all

* thread #1, name = 'CrBrowserMain', queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
  * frame #0: 0x0000000102393df9 libQt5Core.5.dylib`QMetaObject::cast(QObject const*) const + 21
    frame #1: 0x00000001292c6982 SpreadsheetGui.so`SpreadsheetGui::SheetTableView::closeEditor(QWidget*, QAbstractItemDelegate::EndEditHint) + 50
    frame #2: 0x00000001023ace09 libQt5Core.5.dylib`QMetaObject::activate(QObject*, int, int, void**) + 1833
    frame #3: 0x0000000101b4ba3e libQt5Widgets.5.dylib`QAbstractItemDelegate::closeEditor(QWidget*, QAbstractItemDelegate::EndEditHint) + 66
    frame #4: 0x00000001023ace09 libQt5Core.5.dylib`QMetaObject::activate(QObject*, int, int, void**) + 1833
    frame #5: 0x00000001292b8c5d SpreadsheetGui.so`SpreadsheetGui::LineEdit::event(QEvent*) + 173
    frame #6: 0x00000001019ae145 libQt5Widgets.5.dylib`QApplicationPrivate::notify_helper(QObject*, QEvent*) + 223
    frame #7: 0x00000001019af3bf libQt5Widgets.5.dylib`QApplication::notify(QObject*, QEvent*) + 1361
    frame #8: 0x00000001001a52e9 libFreeCADGui.dylib`Gui::GUIApplication::notify(QObject*, QEvent*) + 89
    frame #9: 0x000000010239028e libQt5Core.5.dylib`QCoreApplication::notifyInternal2(QObject*, QEvent*) + 140
    frame #10: 0x00000001019e77a6 libQt5Widgets.5.dylib`___lldb_unnamed_symbol1032$$libQt5Widgets.5.dylib + 136
    frame #11: 0x00000001019e7107 libQt5Widgets.5.dylib`___lldb_unnamed_symbol1028$$libQt5Widgets.5.dylib + 469
    frame #12: 0x00000001019ae145 libQt5Widgets.5.dylib`QApplicationPrivate::notify_helper(QObject*, QEvent*) + 223
    frame #13: 0x00000001019af08f libQt5Widgets.5.dylib`QApplication::notify(QObject*, QEvent*) + 545
    frame #14: 0x00000001001a52e9 libFreeCADGui.dylib`Gui::GUIApplication::notify(QObject*, QEvent*) + 89
    frame #15: 0x000000010239028e libQt5Core.5.dylib`QCoreApplication::notifyInternal2(QObject*, QEvent*) + 140
    frame #16: 0x0000000101eb8df2 libQt5Gui.5.dylib`QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyEvent*) + 158
    frame #17: 0x0000000101eabb2d libQt5Gui.5.dylib`QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 93
    frame #18: 0x0000000101ea966e libQt5Gui.5.dylib`QWindowSystemInterface::flushWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 310
    frame #19: 0x000000010e20a4ce libqcocoa.dylib`___lldb_unnamed_symbol732$$libqcocoa.dylib + 1095
    frame #20: 0x000000010e20a64d libqcocoa.dylib`___lldb_unnamed_symbol733$$libqcocoa.dylib + 60
    frame #21: 0x00007fff3434e367 AppKit`-[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:] + 6840
    frame #22: 0x00007fff3434c667 AppKit`-[NSWindow(NSEventRouting) sendEvent:] + 478
    frame #23: 0x000000010e20d479 libqcocoa.dylib`___lldb_unnamed_symbol826$$libqcocoa.dylib + 519
    frame #24: 0x00007fff341ec889 AppKit`-[NSApplication(NSEvent) sendEvent:] + 2953
    frame #25: 0x000000010e212752 libqcocoa.dylib`___lldb_unnamed_symbol1006$$libqcocoa.dylib + 59
    frame #26: 0x00007fff341da5c0 AppKit`-[NSApplication run] + 755
    frame #27: 0x000000010e20fbf1 libqcocoa.dylib`___lldb_unnamed_symbol901$$libqcocoa.dylib + 1403
    frame #28: 0x000000010238de7d libQt5Core.5.dylib`QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 265
    frame #29: 0x000000010239077a libQt5Core.5.dylib`QCoreApplication::exec() + 252
    frame #30: 0x00000001000ec401 libFreeCADGui.dylib`Gui::Application::runApplication() + 11265
    frame #31: 0x0000000100004fa6 FreeCAD`main + 5958
    frame #32: 0x00007fff62b413d5 libdyld.dylib`start + 1
    frame #33: 0x00007fff62b413d5 libdyld.dylib`start + 1
I got this in console:

Code: Select all

Process 8355 launched: '/Applications/FreeCAD.app/Contents/Resources/bin/FreeCAD' (x86_64)
FreeCAD 0.19, Libs: 0.19R18714 (Git)
© Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2019
  #####                 ####  ###   ####  
  #                    #      # #   #   # 
  #     ##  #### ####  #     #   #  #   # 
  ####  # # #  # #  #  #     #####  #   # 
  #     #   #### ####  #    #     # #   # 
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##

Sheet Metal workbench loaded
Error in InitApplications module 'FreeCAD' has no attribute 'GuiUp'
--------------------------------------------------------------------------------
Traceback (most recent call last):
  File "<string>", line 620, in <module>
  File "<string>", line 162, in InitApplications
  File "/Applications/FreeCAD.app/Contents/Resources/lib/python3.7/site-packages/freecad/__init__.py", line 8, in <module>
    import Draft as draft
  File "/Applications/FreeCAD.app/Contents/Resources/Mod/Draft/Draft.py", line 53, in <module>
    if FreeCAD.GuiUp:
AttributeError: module 'FreeCAD' has no attribute 'GuiUp'
--------------------------------------------------------------------------------
2019-11-13 22:05:06.802127+0100 FreeCAD[8355:5606481] MessageTracer: Falling back to default whitelist
2019-11-13 22:05:27.613133+0100 FreeCAD[8355:5607113] GVA info: preferred scaler idx 0
2019-11-13 22:05:29.015953+0100 QtWebEngineProcess[8383:5607190] [User Defaults] Couldn't read values in CFPrefsPlistSource<0x108a219b0> (Domain: com.apple.universalaccess, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: Yes): accessing preferences outside an application's container requires user-preference-read or file-read-data sandbox access
Thread size out of range
Thread size out of range
Thread size out of range
Thread size out of range
Thread size out of range
Thread size out of range
Thread size out of range
Thread size out of range
Thread size out of range
Thread size out of range
Thread size out of range
Thread size out of range
Thread size out of range
Thread size out of range
Thread size out of range
Thread size out of range
Thread size out of range
PartDesign::Pad / Pad002: Links go out of the allowed scope
Not yet supported geometry for external geometry
Clear constraints to external geometry
Not yet supported geometry for external geometry
Clear constraints to external geometry
Version tried is:

Code: Select all

OS: macOS Mojave (10.14)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18714 (Git)
Build type: Release
Branch: master
Hash: a7ad04ba4aefb486fbc5e7c68da3dd488443b08c
Python version: 3.7.3
Qt version: 5.12.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: Italian/Italy (it_IT)
I hope this info can be useful. I can add other info. Just ask.

Luca
ulrich1a
Veteran
Posts: 1957
Joined: Sun Jul 07, 2013 12:08 pm

Re: Crash on spreadsheet in-cell value edit

Post by ulrich1a »

lpala wrote: Wed Nov 13, 2019 9:16 pm I can add other info. Just ask.
Can you post an example file, which contain all the elements, where you would get the crash in the next step?

Ulrich
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: Crash on spreadsheet in-cell value edit

Post by sgrogan »

lpala wrote: Wed Nov 13, 2019 9:16 pm I hope this info can be useful. I can add other info. Just ask.
Hey Luca
Can you uninstall Sheet Metal ad-on and try again?
"fight the good fight"
Post Reply