[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: 9
Joined: Sun Nov 10, 2019 6:46 am

Re: Crash on spreadsheet in-cell value edit

Postby lpala » Thu Nov 14, 2019 6:35 am

ulrich1a wrote:
Wed Nov 13, 2019 10:05 pm
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
Sure,
here it is. Everything I change in-cell makes FC crash, even if I change a cell that has no alias.

Luca
Attachments
RoundedBox.FCStd
File that makes FC crash
(108.08 KiB) Downloaded 7 times
lpala
Posts: 9
Joined: Sun Nov 10, 2019 6:46 am

Re: Crash on spreadsheet in-cell value edit

Postby lpala » Thu Nov 14, 2019 7:48 am

sgrogan wrote:
Wed Nov 13, 2019 10:08 pm
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?
Just tried... same behaviour.

Luca
chrisb
Posts: 27203
Joined: Tue Mar 17, 2015 9:14 am

Re: Crash on spreadsheet in-cell value edit

Postby chrisb » Thu Nov 14, 2019 4:22 pm

You can try to delete or move the complete config folder.
veeman
Posts: 2
Joined: Thu Nov 14, 2019 5:03 pm

Re: Crash on spreadsheet in-cell value edit

Postby veeman » Thu Nov 14, 2019 5:35 pm

Hey, im experiencing the same issue under Windows.
Changing an aliased value in the spreadsheet forces FreeCAD to crash mostly.
I attached an example file too.

OS: Windows 7 SP 1 (6.1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18686 (Git)
Build type: Release
Branch: master
Hash: f0cdad7f708c0185961cd7185e366df22e041d02
Python version: 3.6.7
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)
Attachments
TerminalStrip.FCStd
(32.9 KiB) Downloaded 8 times
chrisb
Posts: 27203
Joined: Tue Mar 17, 2015 9:14 am

Re: Crash on spreadsheet in-cell value edit

Postby chrisb » Thu Nov 14, 2019 8:20 pm

Please start FreeCAD from console and create a logfile using the additional parameter -l (small letter L).
ulrich1a
Posts: 1958
Joined: Sun Jul 07, 2013 12:08 pm

Re: Crash on spreadsheet in-cell value edit

Postby ulrich1a » Thu Nov 14, 2019 9:48 pm

I can confirm the crashes with the two posted models under Linux.

OS: Debian GNU/Linux 10 (buster) (XFCE/lightdm-xsession)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18569 (Git)
Build type: Unknown
Branch: Rueck6
Hash: 788a509184bdd47517b04da5be18bdbc30919e8f
Python version: 3.7.3
Qt version: 5.11.3
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)

It crashes only if I leaf the spreadsheet cell with the return key. It does not crash, when I just click into a different cell after changing the value.
I could not build myself a model that crashes. This seems to be a complicated issue.

Ulrich
Attachments
FreeCAD.log.crash2.zip
(2.76 KiB) Downloaded 4 times
veeman
Posts: 2
Joined: Thu Nov 14, 2019 5:03 pm

Re: Crash on spreadsheet in-cell value edit

Postby veeman » Fri Nov 15, 2019 1:04 pm

Like ulrich1a said it only happens when return is pressed.

It also works when I change the values within a macro:

Code: Select all

import FreeCAD
import Spreadsheet

doc = App.ActiveDocument
if doc is not None:
	Gui.activateWorkbench("SpreadsheetWorkbench")
	sheet = doc.getObject('Spreadsheet')
	if sheet is not None:
		sheet.set('LengthA', str('=100mil'))
		doc.recompute()
Attachments
FreeCAD.log.crash.sheet.win10.zip
(10.62 KiB) Downloaded 5 times
lpala
Posts: 9
Joined: Sun Nov 10, 2019 6:46 am

Re: Crash on spreadsheet in-cell value edit

Postby lpala » Fri Nov 15, 2019 1:51 pm

veeman wrote:
Fri Nov 15, 2019 1:04 pm
Like ulrich1a said it only happens when return is pressed.
I can confirm. It crashes only on return. Changing the value in other ways doesnt crash.
ulrich1a
Posts: 1958
Joined: Sun Jul 07, 2013 12:08 pm

Re: Crash on spreadsheet in-cell value edit

Postby ulrich1a » Fri Nov 15, 2019 4:41 pm

The crash seems to be depend on the complexity of the model. I made a block with three round holes in it. I can change the radius of the holes without a crash, until a radius is big enough, so that all three holes cross each other. The attached model crashes, if the value "Radius" in the spreadsheet is 10 or bigger.

This logs are pointing to event handling. This is something for experts in this field.

Ulrich
Attachments
SpreadsheetCrash3.FCStd
(87.59 KiB) Downloaded 7 times
lpala
Posts: 9
Joined: Sun Nov 10, 2019 6:46 am

Re: Crash on spreadsheet in-cell value edit

Postby lpala » Fri Nov 15, 2019 6:49 pm

ulrich1a wrote:
Fri Nov 15, 2019 4:41 pm
The crash seems to be depend on the complexity of the model. I made a block with three round holes in it. I can change the radius of the holes without a crash, until a radius is big enough, so that all three holes cross each other. The attached model crashes, if the value "Radius" in the spreadsheet is 10 or bigger.

This logs are pointing to event handling. This is something for experts in this field.

Ulrich
Same behaviour here. It the model is VERY simple it doesn't crash. As stated before, it seem to be related to some recomputing that happens always (even if I change not aliased cell).

Luca