Ticket #4197 - Error Using Expression to Fill PropertyString

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!
Post Reply
User avatar
wandererfan
Veteran
Posts: 6309
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Ticket #4197 - Error Using Expression to Fill PropertyString

Post by wandererfan »

Is there a problem using spreadsheet cell value to fill a PropertyString? I've tried with a few different PropertyStrings and the behaviour seems consistent.

Starting with the attached file,
- Select "Cube"
- select "Rename" from RMB context menu
- press Expression icon
- assign "Spreadsheet.A1" as new Label
- press Recompute
- result :

Code: Select all

<Exception> basic_string::_M_construct null not valid
in property binding 'Label'
101.749 <App> Document.cpp(3440): Failed to recompute ExpressionRefToSpreadsheet#Box: basic_string::_M_construct null not valid
in property binding 'Label'
Recompute failed! Please check report view.
Traceback (most recent call last):
  File "<string>", line 1, in <module>
<class 'SystemError'>: <built-in method recompute of App.Document object at 0x5595de0a3cb8> returned a result with an error set
<Exception> basic_string::_M_construct null not valid
in property binding 'Label'
120.544 <App> Document.cpp(3440): Failed to recompute ExpressionRefToSpreadsheet#Box: basic_string::_M_construct null not valid
in property binding 'Label'
Recompute failed! Please check report view.
Traceback (most recent call last):
  File "<string>", line 1, in <module>
<class 'SystemError'>: <built-in method recompute of App.Document object at 0x5595de0a3cb8> returned a result with an error set
And a popup:
DependencyCycles.png
DependencyCycles.png (17.2 KiB) Viewed 1435 times

OS: Linux Mint 19 (X-Cinnamon/cinnamon)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Python version: 3.6.8
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Canada (en_CA)
Attachments
ExpressionRefToSpreadsheet.FCStd
(4.06 KiB) Downloaded 22 times
Last edited by Kunda1 on Fri Nov 29, 2019 12:51 pm, edited 1 time in total.
Reason: Added ticket number to thread title
chrisb
Veteran
Posts: 54166
Joined: Tue Mar 17, 2015 9:14 am

Re: Error Using Expression to Fill PropertyString

Post by chrisb »

FreeCAD crashes if I recompute your file.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
chrisb
Veteran
Posts: 54166
Joined: Tue Mar 17, 2015 9:14 am

Re: Error Using Expression to Fill PropertyString

Post by chrisb »

I investigated this a bit further
- If I enter an expression Spreadsheet.A1 for the label, the contents of A1 is shown correctly
- however, the cube is still marked for recompute
- if I recompute, FreeCAD crashes
- I experience the same behaviour as in the previous 3 steps if I use an alias for Cell A1

- I can save the file before the recompute is performed
- when I reopen it, the cube has the new name and is marked for recompute.
- and if I recompute, ... (see above)

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
wandererfan
Veteran
Posts: 6309
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Error Using Expression to Fill PropertyString

Post by wandererfan »

User avatar
adrianinsaval
Veteran
Posts: 5544
Joined: Thu Apr 05, 2018 5:15 pm

Re: Error Using Expression to Fill PropertyString

Post by adrianinsaval »

ezzieyguywuf wrote:
realthunder wrote:
Sorry to bother you guys, maybe one of you is willing to tackle this issue?
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: Ticket #4197 - Error Using Expression to Fill PropertyString

Post by realthunder »

PR submitted here
Try Assembly3 with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
User avatar
adrianinsaval
Veteran
Posts: 5544
Joined: Thu Apr 05, 2018 5:15 pm

Re: Ticket #4197 - Error Using Expression to Fill PropertyString

Post by adrianinsaval »

realthunder wrote: Mon Dec 09, 2019 12:41 am PR submitted here
Thanks!
Post Reply