About at the end of my rope with freecad ...

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!
garnish
Posts: 7
Joined: Fri Oct 14, 2016 11:50 pm

About at the end of my rope with freecad ...

Post by garnish »

First let me apologize in advance. I work in other open source projects and I hate when people come in and complain about open source software without offering patches ...

But I'm a kernel guy, not a gui guy...

I posted a little while back about the OS X build of FreeCAD crashing frequently... It seemed nobody else was having these problems. So I kept pressing ahead... My son was having the same sorts of crashing problems and getting frustrated with freecad in general so he reverted back to Sketchup which is what he's grown used to... But he's 15 so his mind should be maleable and I figure it's better he learn parametric modelling instead ... Yesterday I was helping him with a model he's been working on for his truck interior and we were saving frequently; pretty much at every step... And we experienced a number of crashes... I gathered 'stderr'

Code: Select all

FreeCAD 0.16, Libs: 0.16R6706 (Git)
© Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2015
  #####                 ####  ###   ####
  #                    #      # #   #   #
  #     ##  #### ####  #     #   #  #   #
  ####  # # #  # #  #  #     #####  #   #
  #     #   #### ####  #    #     # #   #
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##

Coin warning in cc_glglue_instance(): Error when setting up the GL context. This can happen if there is no current context, or if the context has been set up incorrectly.
2016-11-20 08:06:56.249 FreeCAD[29004:28668632] modalSession has been exited prematurely - check for a reentrant call to endModalSession:
2016-11-20 08:07:49.922 FreeCAD[29004:28668632] modalSession has been exited prematurely - check for a reentrant call to endModalSession:
.
.
Coin warning in cc_glglue_instance(): Error when setting up the GL context. This can happen if there is no current context, or if the context has been set up incorrectly.
Coin warning in cc_glglue_instance(): Error when setting up the GL context. This can happen if there is no current context, or if the context has been set up incorrectly.
Coin warning in cc_glglue_instance(): Error when setting up the GL context. This can happen if there is no current context, or if the context has been set up incorrectly.
.
.
The mesh data structure has some defects
.
.
The mesh data structure has some defects
The mesh data structure has some defects
No point picked.
No point picked.
No point picked.
Coin warning in cc_glglue_instance(): Error when setting up the GL context. This can happen if there is no current context, or if the context has been set up incorrectly.
.
.
2016-11-20 10:06:40.939 FreeCAD[29004:28668632] modalSession has been exited prematurely - check for a reentrant call to endModalSession:
2016-11-20 10:06:55.131 FreeCAD[29004:28668632] modalSession has been exited prematurely - check for a reentrant call to endModalSession:
*** Abort *** an exception was raised, but no catch was found.
	... The exception is:SIGSEGV 'segmentation violation' detected. Address 18
I can't reproduce the crashes reliably because whenever it crashes, we'd restart and re-do the exact same operation and it would succeed. The crashes also seem to be tied to random actions... For example, using 'space' to hide a sketch, or clicking on an edge with the 'Trim an edge' tool ...

Other times the viewport (the portion of the window which contains the model you're working on) would lock up so you couldn't select any objects, or pan, or zoom... All the menus appear to work fine but nothing would update in the model viewport. So that would force a quit&restart...

Eventually, after a few hours, we finally got my son's model finished and printed..

This morning I decided to load another model I was working on. I had it printed successfully but I needed to make a slight cut in a cylinder... I deleted the pad and entered the sketch editor. I drew a rectangle, constrained it and trimmed an edge. That worked so Save it. Then I drew another rectangle, constrained it and trimmed another edge. As soon as I clicked on the edge, FreeCAD crashed. Same error as above. Unfortunately, this time when I restarted FreeCAD and loaded my model, it said the sketch was corrupt and it gave me the option of entering some sketch repair tool... After fixing a couple of errant constraints it went back into my model which was now completely gone. The file is tiny now too so presumably repairing the constraints deleted all of the entities in my model..

Somewhat luckily, there is a .FCStd1 file that contains a very early version of my model so at least I haven't lost the whole thing ...

This whole thing is exceedingly frustrating... I'm probably going to look at OpenSCAD. A friend of mine who was running FreeCAD on Linux was experiencing some random crashes so he switched to OpenSCAD... I'm not sure if the programmatic interface is for me. Too much like my day job..

Here's what FreeCAD has to say about itself:

OS: Mac OS X
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6706 (Git)
Build type: Release
Branch: tag: 0.16.6706
Hash: f86a4e411ff7848dea98d7242f43b7774bee8fa0
Python version: 2.7.11
Qt version: 4.8.7
Coin version: 3.1.3
OCC version: 6.8.0.oce-0.17


It would appear I'm running the latest version.

uname says:

Darwin chimay.local 15.4.0 Darwin Kernel Version 15.4.0: Fri Feb 26 22:08:05 PST 2016; root:xnu-3248.40.184~3/RELEASE_X86_64 x86_64

OS X 10.11.4.


I apologize for the frustrated tone of this post. I feel like I've wasted dozens of hours of my free time on this and I don't get a lot of hours of 'free time'... I'm happy to help test for anyone willing to look into this and I can drive gdb if someone wants... I just don't have it in me to install a toolchain and try to build FreeCAD and start debugging something that doesn't happen repeatedly.
User avatar
saso
Veteran
Posts: 1924
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: About at the end of my rope with freecad ...

Post by saso »

Maybe you could try the latest 0.17 dev releases (I would ;) ) https://github.com/FreeCAD/FreeCAD/releases

Generally dev releases are considered as less stable and it is recommended for users to use the stable releases, however with FreeCAD most long time users will know to tell you that the latest dev releases are most of the time much better, specially a few months after the latest final release when a ton of new features are added to the dev branch... Still, note that different features in dev releases could be added and removed during the development and sometimes things could not be backward / forward compatible (generally however this is not the case).
Last edited by saso on Mon Nov 21, 2016 2:03 pm, edited 1 time in total.
User avatar
bejant
Veteran
Posts: 6075
Joined: Thu Jul 11, 2013 3:06 pm

Re: Mac OSX Random Crashes - at the end of my rope with FreeCAd

Post by bejant »

Hi garnish and welcome. FreeCAD definitely should not be crashing like that (I've never had such frequent and random crashes), but I can't help you with that problem so you'll have to wait for someone else. I replied to mention that you can increase the number of saved backups (so that every time you save you won't be overwriting the latest copy) by going to Edit > Preferences > General icon > Document tab and changing the value of "Create up to backup files ...".
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: About at the end of my rope with freecad ...

Post by triplus »

Hi @garnish.

Some of the errors you are getting were reported in the past and did lead to FreeCAD crash. But i guess that should be fixed already and what would help is providing a procedure to repeat the crash. As it is much easier to figure out what is going on if that is provided.

P.S. Another thing to try out in such situations is:

https://en.wikipedia.org/wiki/Cut_the_Rope
garnish
Posts: 7
Joined: Fri Oct 14, 2016 11:50 pm

Re: About at the end of my rope with freecad ...

Post by garnish »

triplus wrote:Hi @garnish.

Some of the errors you are getting were reported in the past and did lead to FreeCAD crash. But i guess that should be fixed already and what would help is providing a procedure to repeat the crash. As it is much easier to figure out what is going on if that is provided.

P.S. Another thing to try out in such situations is:

https://en.wikipedia.org/wiki/Cut_the_Rope
I do understand how to debug stuff as that's what I do all day long... As I mentioned, I've not found anything to reliably reproduce the problem or else I would have filed a bug report with all the information necessary to reproduce the problem...

The video game reference is confusing though.

I'm going to try out the dev releases as suggested 'saso' and I'm going to bump up the number of backup files to keep as suggested by 'bejant'...
User avatar
tanderson69
Veteran
Posts: 1626
Joined: Thu Feb 18, 2010 1:07 am

Re: About at the end of my rope with freecad ...

Post by tanderson69 »

maybe a bug between qt and mac?
https://bugreports.qt.io/browse/QTBUG-37699
garnish
Posts: 7
Joined: Fri Oct 14, 2016 11:50 pm

Re: About at the end of my rope with freecad ...

Post by garnish »

tanderson69 wrote:maybe a bug between qt and mac?
https://bugreports.qt.io/browse/QTBUG-37699
Interesting. Says it was fixed in 5.3.1 but was not patched in 4.x... All I can find for *Qt* in FreeCAD.app is:

/Applications/FreeCAD.app/Contents/lib/libQtCLucene.4.dylib

So that could definitely be...

I installed FreeCAD_0.17-8972.14594dd-OSX-x86_64 last night and it hasn't crashed but has a Start-Page that keeps coming back whenever I exit the sketch editor (even after closing the start page repeatedly)... So someone must be in the middle of updating something...
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: About at the end of my rope with freecad ...

Post by Kunda1 »

@garnish posted debug output in the ticket: http://freecadweb.org/tracker/view.php?id=2836#c7601

Code: Select all

Here’s what I got. I’ll leave the debugger attached in case you want me to run additional debugging commands…



chimay bin $ lldb ./FreeCAD
(lldb) target create "./FreeCAD"
Current executable set to './FreeCAD' (x86_64).
(lldb) run
Process 91315 launched: './FreeCAD' (x86_64)
FreeCAD 0.17, Libs: 0.17R9564 (Git)
© Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2016
 ##### #### ### ####
 # # # # # #
 # ## #### #### # # # # #
 #### # # # # # # # ##### # #
 # # #### #### # # # # #
 # # # # # # # # # ## ## ##
 # # #### #### ### # # #### ## ## ##

Coin warning in cc_glglue_instance(): Error when setting up the GL context. This can happen if there is no current context, or if the context has been set up incorrectly.
Can't find Origin for "Body"
Can't find Origin for "Body"
Can't find Origin for "Body"
Can't find Origin for "Body"
Document::recompute: The graph must be a DAG.
Process 91315 stopped
* thread #1: tid = 0x4a5cf1e, 0x000000011c85b664 SketcherGui.so`SketcherGui::ViewProviderSketch::drawConstraintIcons() + 596, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
   frame #0: 0x000000011c85b664 SketcherGui.so`SketcherGui::ViewProviderSketch::drawConstraintIcons() + 596
SketcherGui.so`SketcherGui::ViewProviderSketch::drawConstraintIcons:
-> 0x11c85b664 <+596>: movq (%r14), %rax
   0x11c85b667 <+599>: movq 0x168(%rax), %rax
   0x11c85b66e <+606>: movl $0x1, %esi
   0x11c85b673 <+611>: movq %r14, %rdi
(lldb) bt
* thread #1: tid = 0x4a5cf1e, 0x000000011c85b664 SketcherGui.so`SketcherGui::ViewProviderSketch::drawConstraintIcons() + 596, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
 * frame #0: 0x000000011c85b664 SketcherGui.so`SketcherGui::ViewProviderSketch::drawConstraintIcons() + 596
   frame #1: 0x000000011c85966a SketcherGui.so`SketcherGui::ViewProviderSketch::mouseMove(SbVec2s const&, Gui::View3DInventorViewer*) + 2010
   frame 0000002: 0x00000001002b02dc libFreeCADGui.dylib`Gui::ViewProvider::eventCallback(void*, SoEventCallback*) + 428
   frame 0000003: 0x00000001015853fe libCoin.60.dylib`SoEventCallback::handleEvent(SoHandleEventAction*) + 164
   frame 0000004: 0x0000000101406935 libCoin.60.dylib`SoAction::traverse(SoNode*) + 91
   frame 0000005: 0x00000001014f007f libCoin.60.dylib`SoChildList::traverse(SoAction*, int, int) + 123
   frame 0000006: 0x000000010158c749 libCoin.60.dylib`SoGroup::doAction(SoAction*) + 87
   frame 0000007: 0x00000001015a2490 libCoin.60.dylib`SoSeparator::doAction(SoAction*) + 40
   frame 0000008: 0x0000000101406935 libCoin.60.dylib`SoAction::traverse(SoNode*) + 91
   frame 0000009: 0x00000001014f007f libCoin.60.dylib`SoChildList::traverse(SoAction*, int, int) + 123
   frame 0000010: 0x000000010158c749 libCoin.60.dylib`SoGroup::doAction(SoAction*) + 87
   frame 0000011: 0x00000001015a2490 libCoin.60.dylib`SoSeparator::doAction(SoAction*) + 40
   frame 0000012: 0x0000000101406935 libCoin.60.dylib`SoAction::traverse(SoNode*) + 91
   frame 0000013: 0x000000010140f6e4 libCoin.60.dylib`SoHandleEventAction::beginTraversal(SoNode*) + 104
   frame 0000014: 0x0000000101406586 libCoin.60.dylib`SoAction::apply(SoNode*) + 360
   frame 0000015: 0x00000001014f4621 libCoin.60.dylib`SoEventManager::actuallyProcessEvent(SoEvent const*) + 97
   frame 0000016: 0x000000010026630c libFreeCADGui.dylib`SIM::Coin3D::Quarter::QuarterWidget::processSoEvent(SoEvent const*) + 28
   frame 0000017: 0x000000010026de6c libFreeCADGui.dylib`SIM::Coin3D::Quarter::SoQTQuarterAdaptor::processSoEvent(SoEvent const*) + 92
   frame 0000018: 0x00000001002923d9 libFreeCADGui.dylib`Gui::View3DInventorViewer::processSoEventBase(SoEvent const*) + 9
   frame 0000019: 0x000000010027bffb libFreeCADGui.dylib`Gui::BlenderNavigationStyle::processSoEvent(SoEvent const*) + 2347
   frame 0000020: 0x0000000100278100 libFreeCADGui.dylib`Gui::NavigationStyle::processEvent(SoEvent const*) + 288
   frame 0000021: 0x00000001002923c0 libFreeCADGui.dylib`Gui::View3DInventorViewer::processSoEvent(SoEvent const*) + 128
   frame 0000022: 0x000000010025b0c3 libFreeCADGui.dylib`SIM::Coin3D::Quarter::EventFilter::eventFilter(QObject*, QEvent*) + 307
   frame 0000023: 0x00000001048146eb QtCore`QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) + 111
   frame 0000024: 0x0000000103a4c54e QtGui`QApplicationPrivate::notify_helper(QObject*, QEvent*) + 178
   frame 0000025: 0x0000000103a4ded4 QtGui`QApplication::notify(QObject*, QEvent*) + 2082
   frame 0000026: 0x0000000100067b0b libFreeCADGui.dylib`Gui::GUIApplication::notify(QObject*, QEvent*) + 75
   frame 0000027: 0x00000001048144f6 QtCore`QCoreApplication::notifyInternal(QObject*, QEvent*) + 118
   frame 0000028: 0x0000000103a4ce0b QtGui`QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) + 415
   frame 0000029: 0x0000000103a05143 QtGui`qt_mac_handleMouseEvent(NSEvent*, QEvent::Type, Qt::MouseButton, QWidget*, bool) + 1292
   frame 0000030: 0x00007fff99e43bb5 AppKit`-[NSWindow _reallySendEvent:isDelayedEvent:] + 2108
   frame 0000031: 0x00007fff9988263d AppKit`-[NSWindow sendEvent:] + 517
   frame 0000032: 0x00000001039fd6c3 QtGui`-[QCocoaWindow sendEvent:] + 113
   frame 0000033: 0x00007fff99802b3c AppKit`-[NSApplication sendEvent:] + 2540
   frame 0000034: 0x0000000103a01b68 QtGui`-[QNSApplication sendEvent:] + 97
   frame 0000035: 0x00007fff99669ef6 AppKit`-[NSApplication run] + 796
   frame 0000036: 0x0000000103a09ace QtGui`QEventDispatcherMac::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 1496
   frame 0000037: 0x0000000104811bc7 QtCore`QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 77
   frame 0000038: 0x0000000104811d41 QtCore`QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 365
   frame 0000039: 0x000000010481494b QtCore`QCoreApplication::exec() + 199
   frame 0000040: 0x000000010002300b libFreeCADGui.dylib`Gui::Application::runApplication() + 7915
   frame 0000041: 0x0000000100008cc6 FreeCAD`main + 4070
   frame 0000042: 0x00007fff87d0c5ad libdyld.dylib`start + 1
   frame 0000043: 0x00007fff87d0c5ad libdyld.dylib`start + 1

(lldb) register read
General Purpose Registers:
      rax = 0x0000000000000000
      rbx = 0x000000000000000d
      rcx = 0x000000000000006d
      rdx = 0x0000000000000000
      rdi = 0x0000000118faf820
      rsi = 0x000000000000000d
      rbp = 0x00007fff5fbfd330
      rsp = 0x00007fff5fbfd050
       r8 = 0x0000000000000005
       r9 = 0x00000000ffffffff
      r10 = 0x0000000019c84b9a
      r11 = 0x0000000118a00000
      r12 = 0x0000000117eb7920
      r13 = 0x0000000100c93cb0 libFreeCADApp.dylib`typeinfo for App::DocumentObject
      r14 = 0x0000000000000000
      r15 = 0x0000000117e530a8
      rip = 0x000000011c85b664 SketcherGui.so`SketcherGui::ViewProviderSketch::drawConstraintIcons() + 596
   rflags = 0x0000000000010202
       cs = 0x000000000000002b
       fs = 0x0000000000000000
       gs = 0x0000000000000000 
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
chrisb
Veteran
Posts: 54193
Joined: Tue Mar 17, 2015 9:14 am

Re: About at the end of my rope with freecad ...

Post by chrisb »

I think I posted before that I have exactly the same FreeCAD version. However, my system is slightly newer:

El Capitan 10.11.5
Darwin maccb.xxx.xxx 15.5.0 Darwin Kernel Version 15.5.0: Tue Apr 19 18:36:36 PDT 2016; root:xnu-3248.50.21~8/RELEASE_X86_64 x86_64

What kind of Mac do you use? I remember there was some issue with different hardware not offering all the expected functions to FreeCAD but I cannot find it.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
garnish
Posts: 7
Joined: Fri Oct 14, 2016 11:50 pm

Re: About at the end of my rope with freecad ...

Post by garnish »

MacBook Pro 13-inch Early 2015 (huh, thought it was newer)...

It would seem the root of my problem is that I don't know how to use the new PDN work flow so I somehow created circular dependencies and this is allegedly easy to do in 0.17 ...

I'll just have to wait until 0.17 is stabilized before trying FC again. For now OpenSCAD is meeting my needs.
Post Reply