View Issue Details

IDProjectCategoryView StatusLast Update
0003980DraftBugpublic2019-06-10 11:44
ReporteropenBrain Assigned Toyorik  
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionfixed 
Product Version0.18 
Summary0003980: Expression in Draft:Scale tool is ignored / crashes FC
DescriptionWhen trying to use an expression as scaling value in Draft:Scale tool (through Property editor), it is ignored or worse crashes FreeCAD.
Same works correctly with the similar Draft:Clone.
---
Forum thread (fr)
---
OS: Ubuntu 18.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.1.
Build type: Release
Python version: 2.7.15rc1
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: French/France (fr_FR)
Steps To Reproduce
  1. Open a new design, insert any shape (eg. Part:Cube) & select Draft WB
  2. With shape selected, choose Scale tool
  3. Choose any reference point then validate default values (you get a clone)
  4. Select the obtained Scale shape
  5. In the Property Editor, try to enter an expression (eg. "Cube.Length/1mm") in any X/Y/Z scale factor => FC ignores or crashes
Additional InformationDr. Konqi's callstack (would bet Thread 1 is the culprit) :
Application: freecad-python2 (freecad-python2), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f75728f3780 (LWP 9924))]

Thread 6 (Thread 0x7f74bc7dc700 (LWP 9975)):
#0  0x00007f756f1fa839 in syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x00007f7535707722 in  () at /usr/lib/x86_64-linux-gnu/libtbb.so.2
0000002  0x00007f7535707769 in  () at /usr/lib/x86_64-linux-gnu/libtbb.so.2
0000003  0x00007f756dfad6db in start_thread (arg=0x7f74bc7dc700) at pthread_create.c:463
0000004  0x00007f756f20088f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 5 (Thread 0x7f74c57ff700 (LWP 9942)):
#0  0x00007f756f1f3bf9 in __GI___poll (fds=0x7f74c0004a10, nfds=1, timeout=7400) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f756a1ad5c9 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
0000002  0x00007f756a1ad6dc in g_main_context_iteration () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
0000003  0x00007f756fd549bb in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
0000004  0x00007f756fcf9a1a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
0000005  0x00007f756fb1823a in QThread::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
0000006  0x00007f756fb1d17d in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
0000007  0x00007f756dfad6db in start_thread (arg=0x7f74c57ff700) at pthread_create.c:463
0000008  0x00007f756f20088f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 4 (Thread 0x7f750e4bd700 (LWP 9941)):
#0  0x00007f756dfb39f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7f7513666114) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  0x00007f756dfb39f3 in __pthread_cond_wait_common (abstime=0x0, mutex=0x5566f1f690f0, cond=0x7f75136660e8) at pthread_cond_wait.c:502
0000002  0x00007f756dfb39f3 in __pthread_cond_wait (cond=0x7f75136660e8, mutex=0x5566f1f690f0) at pthread_cond_wait.c:655
0000003  0x00007f756f79f86c in std::condition_variable::wait(std::unique_lock<std::mutex>&) () at /usr/lib/x86_64-linux-gnu/libstdc++.so.6
0000004  0x00007f75129a70a7 in  () at /usr/lib/x86_64-linux-gnu/libQt5WebKit.so.5
0000005  0x00007f75129a71e9 in  () at /usr/lib/x86_64-linux-gnu/libQt5WebKit.so.5
0000006  0x00007f756f7a566f in  () at /usr/lib/x86_64-linux-gnu/libstdc++.so.6
0000007  0x00007f756dfad6db in start_thread (arg=0x7f750e4bd700) at pthread_create.c:463
0000008  0x00007f756f20088f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 3 (Thread 0x7f75420c3700 (LWP 9935)):
#0  0x00007f756dfb39f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5566f01762ec) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  0x00007f756dfb39f3 in __pthread_cond_wait_common (abstime=0x0, mutex=0x5566f0176298, cond=0x5566f01762c0) at pthread_cond_wait.c:502
0000002  0x00007f756dfb39f3 in __pthread_cond_wait (cond=0x5566f01762c0, mutex=0x5566f0176298) at pthread_cond_wait.c:655
0000003  0x00007f7542d61dcb in  () at /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
0000004  0x00007f7542d61af7 in  () at /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
0000005  0x00007f756dfad6db in start_thread (arg=0x7f75420c3700) at pthread_create.c:463
0000006  0x00007f756f20088f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 2 (Thread 0x7f754e326700 (LWP 9932)):
#0  0x00007f756f1f3bf9 in __GI___poll (fds=0x7f75480192b0, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f756a1ad5c9 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
0000002  0x00007f756a1ad6dc in g_main_context_iteration () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
0000003  0x00007f756fd549bb in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
0000004  0x00007f756fcf9a1a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
0000005  0x00007f756fb1823a in QThread::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
0000006  0x00007f755f780d45 in  () at /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
0000007  0x00007f756fb1d17d in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
0000008  0x00007f756dfad6db in start_thread (arg=0x7f754e326700) at pthread_create.c:463
0000009  0x00007f756f20088f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7f75728f3780 (LWP 9924)):
[KCrash Handler]
0000006  0x00007f7571546a2e in App::PropertyExpressionEngine::setValue(App::ObjectIdentifier const&, boost::shared_ptr<App::Expression>, char const*) () at /usr/lib/freecad-python2/lib/libFreeCADApp.so
0000007  0x00007f7571be2fb8 in Gui::ExpressionBinding::setExpression(boost::shared_ptr<App::Expression>) () at /usr/lib/freecad-python2/lib/libFreeCADGui.so
0000008  0x00007f7571ec0f89 in Gui::DoubleSpinBox::setExpression(boost::shared_ptr<App::Expression>) () at /usr/lib/freecad-python2/lib/libFreeCADGui.so
0000009  0x00007f7571ebf781 in Gui::DoubleSpinBox::finishFormulaDialog() () at /usr/lib/freecad-python2/lib/libFreeCADGui.so
0000010 0x00007f756fd2a665 in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
0000011 0x00007f75704f99ce in QDialog::finished(int) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
0000012 0x00007f75704fa1e6 in QDialog::done(int) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
0000013 0x00007f756fd2a665 in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
0000014 0x00007f7570401ba2 in QAbstractButton::clicked(bool) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
0000015 0x00007f7570401dba in  () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
0000016 0x00007f757040319a in  () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
0000017 0x00007f757040338d in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
0000018 0x00007f757034f048 in QWidget::event(QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
0000019 0x00007f757031083c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
0000020 0x00007f757031865f in QApplication::notify(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
0000021 0x00007f7571bed398 in Gui::GUIApplication::notify(QObject*, QEvent*) () at /usr/lib/freecad-python2/lib/libFreeCADGui.so
0000022 0x00007f756fcfb9e8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
0000023 0x00007f7570317632 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
0000024 0x00007f757036a16b in  () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
0000025 0x00007f757036c7da in  () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
0000026 0x00007f757031083c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
0000027 0x00007f7570318104 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
0000028 0x00007f7571bed398 in Gui::GUIApplication::notify(QObject*, QEvent*) () at /usr/lib/freecad-python2/lib/libFreeCADGui.so
0000029 0x00007f756fcfb9e8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
0000030 0x00007f756bc25583 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
0000031 0x00007f756bc27055 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
0000032 0x00007f756bbfe2eb in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
0000033 0x00007f755fcd71c0 in  () at /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
0000034 0x00007f756a1ad417 in g_main_context_dispatch () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
0000035 0x00007f756a1ad650 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
0000036 0x00007f756a1ad6dc in g_main_context_iteration () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
0000037 0x00007f756fd5499f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
0000038 0x00007f756fcf9a1a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#39 0x00007f756fd02ac4 in QCoreApplication::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#40 0x00007f7571b7cf5f in Gui::Application::runApplication() () at /usr/lib/freecad-python2/lib/libFreeCADGui.so
0000041 0x00005566edfdf592 in main ()
TagsDraft
FreeCAD Information

Activities

Kunda1

2019-05-30 12:17

administrator   ~0013130

@openBrain Thanks for the report.
Can you kindly reproduce this on 0.19dev ?

openBrain

2019-06-02 15:39

developer   ~0013137

Last edited: 2019-06-02 17:06

@Kunda1 Just tried with below version.
Indeed I can't reproduce, but :
 * The Scale function doesn't anymore expose its scaling properties in the property editor after usage
 * The Scale function doesn't work as it doesn't effectively scale the object (with different failure modes according usage conditions).
In brief it looks like the function is totally broken... Would this need another ticket ?
---
OS: Ubuntu 18.04.2 LTS (KDE/plasma)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19. (2019/06/01)
Build type: Release
Python version: 3.6.7
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: French/France (fr_FR)

Kunda1

2019-06-03 01:01

administrator   ~0013139

@openBrain if this ticket isn't reproducible anymore like you reported and new phenomena is happening then yes, lets close this ticket and open (a) ticket(s) dedicated to said new phenomena. Thank you.

openBrain

2019-06-03 17:45

developer   ~0013143

@Kunda1 Got it ! Let's see if it's not a transient in the dev (because it currently looks like a deep regression). I'll check again in few days and confirm.

openBrain

2019-06-07 16:18

developer   ~0013159

Confirmed that there where regressions in 2019/06/01 release that was preventing to reproduce the bug (Thread link)
After regressions fixed, bug declared here isn't present anymore.
Nonetheless I don't know if dev want this ticket just to be closed, or linked with patching commit (open question at the end of linked thread)...

openBrain

2019-06-09 21:10

developer   ~0013167

@Kunda1 : according Yorik, this ticket can be closed as is without further note added. ;)

Kunda1

2019-06-10 11:44

administrator   ~0013168

Fixed in https://github.com/FreeCAD/FreeCAD/commit/e2f65ef01
Thanks @openBrain for your tenacity on this and the heads-up! Your contributions are really helpful and improving FreeCAD for the better. :)

Issue History

Date Modified Username Field Change
2019-05-17 23:22 openBrain New Issue
2019-05-17 23:22 openBrain Tag Attached: Draft
2019-05-30 12:15 Kunda1 Severity major => crash
2019-05-30 12:17 Kunda1 Note Added: 0013130
2019-05-30 12:17 Kunda1 Status new => feedback
2019-06-02 15:39 openBrain Note Added: 0013137
2019-06-02 15:39 openBrain Status feedback => new
2019-06-02 17:06 openBrain Note Edited: 0013137
2019-06-03 01:01 Kunda1 Note Added: 0013139
2019-06-03 17:45 openBrain Note Added: 0013143
2019-06-07 16:18 openBrain Note Added: 0013159
2019-06-09 21:10 openBrain Note Added: 0013167
2019-06-10 11:44 Kunda1 Assigned To => yorik
2019-06-10 11:44 Kunda1 Status new => closed
2019-06-10 11:44 Kunda1 Resolution open => fixed
2019-06-10 11:44 Kunda1 Fixed in Version => 0.19
2019-06-10 11:44 Kunda1 Note Added: 0013168