Part Sphere uIso crashes FC

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
Chris_G
Veteran
Posts: 2598
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Part Sphere uIso crashes FC

Post by Chris_G »

Hi,
The following code crashes FC :

Code: Select all

import Part
obj = App.ActiveDocument.addObject("Part::Sphere","Sphere")
App.activeDocument().recompute()
obj.Shape.Faces[0].Surface.uIso(1.0)
The crash log is :

Code: Select all

FreeCAD 0.17, Libs: 0.17R10101 (Git)
© Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2017
  #####                 ####  ###   ####  
  #                    #      # #   #   # 
  #     ##  #### ####  #     #   #  #   # 
  ####  # # #  # #  #  #     #####  #   # 
  #     #   #### ####  #    #     # #   # 
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##

Fasteners workbench Loaded
QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: Aucun fichier ou dossier de ce type
Program received signal SIGSEGV, Segmentation fault.
#0  /lib/x86_64-linux-gnu/libc.so.6(+0x35860) [0x7f5d9fd1c860]
#1  0x7f5d6e679559 in Part::GeomCircle::GeomCircle(Handle_Geom_Circle const&) from /usr/lib/freecad-daily/lib/Part.so+0x49
#2  0x7f5d6e54ee10 in Part::SpherePy::uIso(_object*) from /usr/lib/freecad-daily/lib/Part.so+0xa0
#3  0x7f5d6e54eff3 in Part::SpherePy::staticCallback_uIso(_object*, _object*) from /usr/lib/freecad-daily/lib/Part.so+0x33
#4  /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x62c6) [0x7f5da18bb296]
#5  /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x86c) [0x7f5da1a1599c]
#6  /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalCode+0x19) [0x7f5da18b4e49]
#7  0x7f5da2a23133 in Gui::InteractiveInterpreter::runCode(PyCodeObject*) const from /usr/lib/freecad-daily/lib/libFreeCADGui.so+0x43
#8  0x7f5da2a232bc in Gui::InteractiveInterpreter::runSource(char const*) const from /usr/lib/freecad-daily/lib/libFreeCADGui.so+0x5c
#9  0x7f5da2a245d7 in Gui::InteractiveInterpreter::push(char const*) from /usr/lib/freecad-daily/lib/libFreeCADGui.so+0xa7
#10  0x7f5da2a24e92 in Gui::PythonConsole::runSource(QString const&) from /usr/lib/freecad-daily/lib/libFreeCADGui.so+0xf2
#11  0x7f5da2a25812 in Gui::PythonConsole::runSourceFromMimeData(QString const&) from /usr/lib/freecad-daily/lib/libFreeCADGui.so+0x272
#12  0x7f5da2a285e4 in Gui::PythonConsole::insertFromMimeData(QMimeData const*) from /usr/lib/freecad-daily/lib/libFreeCADGui.so+0x1d4
#13  /usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x424bda) [0x7f5da0f63bda]
#14  0x7f5da0f67cab in QTextControl::processEvent(QEvent*, QMatrix const&, QWidget*) from /usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x72b
#15  0x7f5da0f5c4ab in QTextControl::processEvent(QEvent*, QPointF const&, QWidget*) from /usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x5b
#16  0x7f5da11c8e34 in QPlainTextEdit::keyPressEvent(QKeyEvent*) from /usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x234
#17  0x7f5da2a4cc92 in Gui::TextEdit::keyPressEvent(QKeyEvent*) from /usr/lib/freecad-daily/lib/libFreeCADGui.so+0x22
#18  0x7f5da2a275fd in Gui::PythonConsole::keyPressEvent(QKeyEvent*) from /usr/lib/freecad-daily/lib/libFreeCADGui.so+0x2ad
#19  0x7f5da0d5b3d3 in QWidget::event(QEvent*) from /usr/lib/x86_64-linux-gnu/libQtGui.so.4+0xd43
#20  0x7f5da112465e in QFrame::event(QEvent*) from /usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x1e
#21  0x7f5da11a9dab in QAbstractScrollArea::event(QEvent*) from /usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x2bb
#22  0x7f5da11c8605 in QPlainTextEdit::event(QEvent*) from /usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x55
#23  0x7f5da0d0403c in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x8c
#24  0x7f5da0d0c2c3 in QApplication::notify(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x1603
#25  0x7f5da28eafb4 in Gui::GUIApplication::notify(QObject*, QEvent*) from /usr/lib/freecad-daily/lib/libFreeCADGui.so+0x54
#26  0x7f5da07d78ad in QCoreApplication::notifyInternal(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQtCore.so.4+0x8d
#27  /usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x26f703) [0x7f5da0dae703]
#28  /usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x26fc12) [0x7f5da0daec12]
#29  0x7f5da0d86d81 in QApplication::x11ProcessEvent(_XEvent*) from /usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x751
#30  /usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x272592) [0x7f5da0db1592]
#31  /lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x2a7) [0x7f5d9943c7d7]
#32  /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x4aa40) [0x7f5d9943ca40]
#33  /lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x2c) [0x7f5d9943caec]
#34  0x7f5da080820e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/x86_64-linux-gnu/libQtCore.so.4+0x7e
#35  /usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x272666) [0x7f5da0db1666]
#36  0x7f5da07d612f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/x86_64-linux-gnu/libQtCore.so.4+0x3f
#37  0x7f5da07d6495 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/x86_64-linux-gnu/libQtCore.so.4+0x1b5
#38  0x7f5da07dc459 in QCoreApplication::exec() from /usr/lib/x86_64-linux-gnu/libQtCore.so.4+0x99
#39  0x7f5da28a3d32 in Gui::Application::runApplication() from /usr/lib/freecad-daily/lib/libFreeCADGui.so+0x15e2
#40  freecad-daily(main+0x661) [0x56354c96c101]
#41  /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1) [0x7f5d9fd073f1]
#42  freecad-daily(_start+0x2a) [0x56354c96d35a]
My FreeCAD Info :

Code: Select all

OS: Ubuntu 16.10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10101 (Git)
Build type: None
Branch: master
Hash: 99fa203f323927b0dd027420d4421b577b7420c3
Python version: 2.7.12+
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
Chris
User avatar
microelly2
Veteran
Posts: 4688
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Part Sphere uIso crashes FC

Post by microelly2 »

I have my own sphere according to the theory https://www.geometrictools.com/Document ... Sphere.pdf
bp_387.png
bp_387.png (15.13 KiB) Viewed 916 times
Edit: mu Error in script fixed
Attachments
kugel_nurbs.py
(1.14 KiB) Downloaded 31 times
Last edited by microelly2 on Sun Feb 19, 2017 9:20 pm, edited 1 time in total.
wmayer
Founder
Posts: 20307
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Part Sphere uIso crashes FC

Post by wmayer »

microelly2 wrote:I have my own sphere according to the theory https://www.geometrictools.com/Document ... Sphere.pdf
Broken macro:
NameError: name 'mu' is not defined
wmayer
Founder
Posts: 20307
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Part Sphere uIso crashes FC

Post by wmayer »

The following code crashes FC :
Not any more
git commit 448ac27
User avatar
Chris_G
Veteran
Posts: 2598
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: Part Sphere uIso crashes FC

Post by Chris_G »

wmayer wrote:Not any more
git commit 448ac27
Thanks a lot !
Post Reply