View Issue Details

IDProjectCategoryView StatusLast Update
0002836SketcherBugpublic2017-08-19 19:32
Reportergarnish Assigned Towmayer  
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionfixed 
PlatformMacOSOS XOS Version10.11.4
Product Version0.17 
Target Version0.17Fixed in Version0.17 
Summary0002836: Crash in sketcher
DescriptionThis is further to this post: http://forum.freecadweb.org/viewtopic.php?f=3&t=18652&p=145434

This morning I started a new project in FreeCAD 0.17, Libs: 0.17R9172 (Git) and it crashed while editing a sketch attached to the face of another sketch.

I downloaded the latest: FreeCAD 0.17, Libs: 0.17R9564 (Git)

After doing 'crash recovery', I regenerated the model to the state I was in on R1972 and then FC crashed performing the same action as the first crash but saving my file first right at the point before the crash.

After creating an account on the bug tracker, I tried to reproduce the crash by creating a rectangle on a sketch and it crashed exactly the same. The output is:

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.
*** Abort *** an exception was raised, but no catch was found.
    ... The exception is:SIGSEGV 'segmentation violation' detected. Address 0

The previous crash on R9564 was slightly different:

*** Abort *** an exception was raised, but no catch was found.
    ... The exception is:SIGSEGV 'segmentation violation' detected. Address 168

And the first crash referenced above (in R9172) was different again:

*** Abort *** an exception was raised, but no catch was found.
    ... The exception is:SIGBUS 'bus error' detected.

Steps To ReproduceDraw a rectangle in the sketcher on Sketch001 that extends from the leftmost circle to the rightmost circle and is vertically within the circles and does not extend outside of the leftmost to rightmost circle. I have a screenshot but the bug tracker appears to only want me to attach a single file so I decided it would be best to attach the model instead of the screenshot. I will attempt to attach the screenshot after I file the bug.
TagsNo tags attached.
FreeCAD Information

Relationships

related to 0002710 closedabdullah Freecad doesn't show sketch elements added when overconstrained 

Activities

garnish

2017-01-08 14:15

reporter  

approximate fill.FCStd (11,264 bytes)

garnish

2017-01-08 14:15

reporter  

garnish

2017-01-08 14:18

reporter   ~0007569

ok. I managed to attach the screenshot. Immediately after completing the rectangle, the crash happens. This is the output from the crash as a result of making the screenshot:

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.
*** Abort *** an exception was raised, but no catch was found.
    ... The exception is:SIGSEGV 'segmentation violation' detected. Address 0



Since I have to complete this model I'll move over to OpenSCAD to continue working on it but will leave this model unmodified so I can test future builds..

normandc

2017-01-08 21:46

manager   ~0007570

Last edited: 2017-01-08 21:47

First, your model has a few errors which could either be the result of the crash, but also from a poor understanding of the new PartDesign work flow. The Pad is outside the Body, which is empty apart from the BodyOrigin planes and axes. And Sketch001 is also outside of the Body.

When editing then closing Sketch001 (no crash here), the Report view shows the following message:

Document::recompute: The graph must be a DAG.

The Dependency graph shows the "Footprint w/out bumpers" sketch has a circular dependency unto itself, not sure how it happened.

You wrote "it crashed while editing a sketch attached to the face of another sketch." This is an impossibility because a sketch does not have a face. A sketch is a 2D construct that can be attached to a plane or to a face.

I have repaired your file as best as I could, but had to delete and redo the Pad as I couldn't move it to the body, FreeCAD gave an error "Some of the selected features have dependencies in the source body".

Please open "approximate fill_normandc1.fcstd", first activate the Body, then edit Sketch001 and see if you still get a crash.

My FreeCAD info:
OS: Ubuntu 14.04.5 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.9542 (Git)
Build type: None
Branch: master
Hash: 96dc57c06861922b9dde830e3bcc07e43ed11cf7
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17

normandc

2017-01-08 21:47

manager  

garnish

2017-01-08 21:57

reporter   ~0007571

I definitely have a poor understanding of the new work-flow as I only encountered it when upgrading in hopes of resolving crashes with 0.16 ... I thought I was creating a sketch on one face of the pad so I mis-typed above. I was hoping to put the three circles on the side of the pad. 'Body's are new to me in this context so I don't know how to work with them.

I can't explain the circular dependency. I'm not sure what I did to cause that.

But you're correct that it does not crash when performing that action now.

Thanks. Obviously there's a bug there somewhere that I antagonized by not knowing what I was doing.

normandc

2017-01-08 22:14

manager   ~0007572

Have a look at this topic which goes over the changes introduced in 0.17's PartDesign workbench (which we commonly dub "PartDesignNext"): http://forum.freecadweb.org/viewtopic.php?f=3&t=15432

And don't hesitate to ask for clarifications in that topic.

As for circular dependencies, we've realized recently that in PDN they are very easy to produce inadvertently. It's an issue that needs to be addressed, as well as many other bugs, which is why using 0.17's PartDesignNext for production work is not recommended at this time. But since 0.16 is unusable for you, I can only suggest that while using 0.17 you save often and raise the number of backups in Edit --> Preferences / General / Document.

garnish

2017-01-08 22:16

reporter   ~0007573

Thank you for your help.

wmayer

2017-01-09 21:35

administrator   ~0007586

NormandC:
First, your model has a few errors which could either be the result of the crash, but also from a poor understanding of the new PartDesign work flow. The Pad is outside the Body, which is empty apart from the BodyOrigin planes and axes. And Sketch001 is also outside of the Body.

I guess the broken document is the result of recent changes in PDN. ickby said that older projects created with 0.17 will be affected but it's rather easy to fix them by drag and dropping the objects to the body.

garnish:
I couldn't reproduce a crash. Are you able to run FreeCAD in a debugger? Since you are on OSX you should do something like:

lldb ./FreeCAD
run
# after the crash
bt

garnish

2017-01-10 15:13

reporter   ~0007601

[I accidentally replied to the email notification from Mantis. Here is the same text. Apologies if it appears twice]

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 #39: 0x000000010481494b QtCore`QCoreApplication::exec() + 199
   frame #40: 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

garnish

2017-01-15 14:46

reporter   ~0007794

Just started a new model and tried to use PDN 'correctly' and very quickly experienced another crash. I'm attaching to this bug but it is probably a different crash.

I created a body, created a sketch in that body, fully constrained it and then saved it.

Then I created a second body and created a sketch in that body, fully constrained it and created a pad. unfortunately, I didn't save it.

I decided to create a pad for the first body but was given a bunch of options on the left pane at which point I realized that wasn't quite what I wanted so I pressed 'Cancel' and experienced this crash:

(lldb) run
Process 98523 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.
2017-01-15 07:00:31.422 FreeCAD[98523:82996877] modalSession has been exited prematurely - check for a reentrant call to endModalSession:
2017-01-15 07:00:57.337 FreeCAD[98523:82996877] modalSession has been exited prematurely - check for a reentrant call to endModalSession:
2017-01-15 07:02:43.787 FreeCAD[98523:82996877] modalSession has been exited prematurely - check for a reentrant call to endModalSession:
2017-01-15 07:02:53.571 FreeCAD[98523:82996877] modalSession has been exited prematurely - check for a reentrant call to endModalSession:
2017-01-15 07:03:03.200 FreeCAD[98523:82996877] modalSession has been exited prematurely - check for a reentrant call to endModalSession:
  71.332017-01-15 07:06:14.631 FreeCAD[98523:82996877] modalSession has been exited prematurely - check for a reentrant call to endModalSession:
2017-01-15 07:08:03.102 FreeCAD[98523:82996877] modalSession has been exited prematurely - check for a reentrant call to endModalSession:
2017-01-15 07:08:41.477 FreeCAD[98523:82996877] modalSession has been exited prematurely - check for a reentrant call to endModalSession:
2017-01-15 07:08:53.667 FreeCAD[98523:82996877] modalSession has been exited prematurely - check for a reentrant call to endModalSession:
2017-01-15 07:09:03.081 FreeCAD[98523:82996877] modalSession has been exited prematurely - check for a reentrant call to endModalSession:
2017-01-15 07:09:28.313 FreeCAD[98523:82996877] modalSession has been exited prematurely - check for a reentrant call to endModalSession:
2017-01-15 07:09:36.662 FreeCAD[98523:82996877] modalSession has been exited prematurely - check for a reentrant call to endModalSession:
2017-01-15 07:09:46.761 FreeCAD[98523:82996877] modalSession has been exited prematurely - check for a reentrant call to endModalSession:
2017-01-15 07:10:21.641 FreeCAD[98523:82996877] modalSession has been exited prematurely - check for a reentrant call to endModalSession:
2017-01-15 07:10:31.261 FreeCAD[98523:82996877] modalSession has been exited prematurely - check for a reentrant call to endModalSession:
2017-01-15 07:10:39.966 FreeCAD[98523:82996877] modalSession has been exited prematurely - check for a reentrant call to endModalSession:
2017-01-15 07:10:47.560 FreeCAD[98523:82996877] modalSession has been exited prematurely - check for a reentrant call to endModalSession:
2017-01-15 07:10:57.944 FreeCAD[98523:82996877] modalSession has been exited prematurely - check for a reentrant call to endModalSession:
2017-01-15 07:11:07.481 FreeCAD[98523:82996877] modalSession has been exited prematurely - check for a reentrant call to endModalSession:
2017-01-15 07:11:16.999 FreeCAD[98523:82996877] modalSession has been exited prematurely - check for a reentrant call to endModalSession:
2017-01-15 07:11:24.936 FreeCAD[98523:82996877] modalSession has been exited prematurely - check for a reentrant call to endModalSession:
2017-01-15 07:11:31.884 FreeCAD[98523:82996877] modalSession has been exited prematurely - check for a reentrant call to endModalSession:
2017-01-15 07:11:40.633 FreeCAD[98523:82996877] modalSession has been exited prematurely - check for a reentrant call to endModalSession:
2017-01-15 07:11:52.490 FreeCAD[98523:82996877] modalSession has been exited prematurely - check for a reentrant call to endModalSession:
2017-01-15 07:12:09.163 FreeCAD[98523:82996877] modalSession has been exited prematurely - check for a reentrant call to endModalSession:
2017-01-15 07:12:19.226 FreeCAD[98523:82996877] modalSession has been exited prematurely - check for a reentrant call to endModalSession:
2017-01-15 07:12:21.551 FreeCAD[98523:82996877] modalSession has been exited prematurely - check for a reentrant call to endModalSession:
2017-01-15 07:13:21.056 FreeCAD[98523:82996877] modalSession has been exited prematurely - check for a reentrant call to endModalSession:
2017-01-15 07:29:46.634 FreeCAD[98523:82996877] modalSession has been exited prematurely - check for a reentrant call to endModalSession:
2017-01-15 07:32:29.557 FreeCAD[98523:82996877] modalSession has been exited prematurely - check for a reentrant call to endModalSession:
2017-01-15 07:33:34.492 FreeCAD[98523:82996877] modalSession has been exited prematurely - check for a reentrant call to endModalSession:
2017-01-15 07:34:03.748 FreeCAD[98523:82996877] modalSession has been exited prematurely - check for a reentrant call to endModalSession:
2017-01-15 07:34:14.659 FreeCAD[98523:82996877] modalSession has been exited prematurely - check for a reentrant call to endModalSession:
Process 98523 stopped
* thread #1: tid = 0x4f26e8d, 0x0000000100b0d37d libFreeCADApp.dylib`App::Document::getObjectsOfType(Base::Type const&) const + 61, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
    frame #0: 0x0000000100b0d37d libFreeCADApp.dylib`App::Document::getObjectsOfType(Base::Type const&) const + 61
libFreeCADApp.dylib`App::Document::getObjectsOfType:
-> 0x100b0d37d <+61>: movq (%rax), %rbx
    0x100b0d380 <+64>: cmpq 0x8(%rax), %rbx
    0x100b0d384 <+68>: je 0x100b0d439 ; <+249>
    0x100b0d38a <+74>: leaq -0x38(%rbp), %r13
(lldb) tb
No breakpoints currently set.
(lldb) bt
* thread #1: tid = 0x4f26e8d, 0x0000000100b0d37d libFreeCADApp.dylib`App::Document::getObjectsOfType(Base::Type const&) const + 61, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
  * frame #0: 0x0000000100b0d37d libFreeCADApp.dylib`App::Document::getObjectsOfType(Base::Type const&) const + 61
    frame #1: 0x00000001194ca013 Part.so`Part::BodyBase::findBodyOf(App::DocumentObject const*) + 67
    frame 0000002: 0x000000011c51a780 _PartDesign.so`PartDesign::Body::findBodyOf(App::DocumentObject const*) + 16
    frame 0000003: 0x000000011c3b81f6 PartDesignGui.so`PartDesignGui::TaskBoxPrimitives::~TaskBoxPrimitives() + 54
    frame 0000004: 0x000000011c3b82ce PartDesignGui.so`PartDesignGui::TaskBoxPrimitives::~TaskBoxPrimitives() + 14
    frame 0000005: 0x000000010024497f libFreeCADGui.dylib`Gui::TaskView::TaskDialog::~TaskDialog() + 63
    frame 0000006: 0x000000011c3bb48e PartDesignGui.so`PartDesignGui::TaskPrimitiveParameters::~TaskPrimitiveParameters() + 14
    frame 0000007: 0x000000010024352a libFreeCADGui.dylib`Gui::TaskView::TaskView::removeDialog() + 266
    frame 0000008: 0x0000000100243953 libFreeCADGui.dylib`Gui::TaskView::TaskView::reject() + 179
    frame 0000009: 0x0000000104828d93 QtCore`QMetaObject::activate(QObject*, QMetaObject const*, int, void**) + 2207
    frame 0000010: 0x0000000103d84f53 QtGui`QDialogButtonBoxPrivate::_q_handleButtonClicked() + 187
    frame 0000011: 0x0000000104828d93 QtCore`QMetaObject::activate(QObject*, QMetaObject const*, int, void**) + 2207
    frame 0000012: 0x0000000103fa84ca QtGui`QAbstractButton::clicked(bool) + 64
    frame 0000013: 0x0000000103d5be84 QtGui`QAbstractButtonPrivate::emitClicked() + 52
    frame 0000014: 0x0000000103d5bd85 QtGui`QAbstractButtonPrivate::click() + 207
    frame 0000015: 0x0000000103d5c72e QtGui`QAbstractButton::mouseReleaseEvent(QMouseEvent*) + 88
    frame 0000016: 0x0000000103a8eca9 QtGui`QWidget::event(QEvent*) + 709
    frame 0000017: 0x0000000103d5c63b QtGui`QAbstractButton::event(QEvent*) + 175
    frame 0000018: 0x0000000103a4c55e QtGui`QApplicationPrivate::notify_helper(QObject*, QEvent*) + 194
    frame 0000019: 0x0000000103a4ded4 QtGui`QApplication::notify(QObject*, QEvent*) + 2082
    frame 0000020: 0x0000000100067b0b libFreeCADGui.dylib`Gui::GUIApplication::notify(QObject*, QEvent*) + 75
    frame 0000021: 0x00000001048144f6 QtCore`QCoreApplication::notifyInternal(QObject*, QEvent*) + 118
    frame 0000022: 0x0000000103a4ce0b QtGui`QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) + 415
    frame 0000023: 0x0000000103a05143 QtGui`qt_mac_handleMouseEvent(NSEvent*, QEvent::Type, Qt::MouseButton, QWidget*, bool) + 1292
    frame 0000024: 0x00007fff99e427b3 AppKit`-[NSWindow _handleMouseUpEvent:isDelayedEvent:] + 119
    frame 0000025: 0x00007fff99e4344d AppKit`-[NSWindow _reallySendEvent:isDelayedEvent:] + 212
    frame 0000026: 0x00007fff9988263d AppKit`-[NSWindow sendEvent:] + 517
    frame 0000027: 0x00000001039fd6c3 QtGui`-[QCocoaWindow sendEvent:] + 113
    frame 0000028: 0x00007fff99802b3c AppKit`-[NSApplication sendEvent:] + 2540
    frame 0000029: 0x0000000103a01b68 QtGui`-[QNSApplication sendEvent:] + 97
    frame 0000030: 0x00007fff99669ef6 AppKit`-[NSApplication run] + 796
    frame 0000031: 0x0000000103a09ace QtGui`QEventDispatcherMac::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 1496
    frame 0000032: 0x0000000104811bc7 QtCore`QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 77
    frame 0000033: 0x0000000104811d41 QtCore`QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 365
    frame 0000034: 0x000000010481494b QtCore`QCoreApplication::exec() + 199
    frame 0000035: 0x000000010002300b libFreeCADGui.dylib`Gui::Application::runApplication() + 7915
    frame 0000036: 0x0000000100008cc6 FreeCAD`main + 4070
    frame 0000037: 0x00007fff87d0c5ad libdyld.dylib`start + 1
    frame 0000038: 0x00007fff87d0c5ad libdyld.dylib`start + 1
(lldb) register read
General Purpose Registers:
       rax = 0x0000000000000000
       rbx = 0x000000011d096440
       rcx = 0x0000000106136620
       rdx = 0x00007fff5fbfd4d0
       rdi = 0x00007fff5fbfd4e0
       rsi = 0x000000011d096440
       rbp = 0x00007fff5fbfd4c0
       rsp = 0x00007fff5fbfd460
        r8 = 0x00000000000003ff
        r9 = 0xffffffffffffffff
       r10 = 0x0000000105eb6bf0
       r11 = 0x00000001042c19d0 (void *)0x00000001042c19f8: QCocoaView
       r12 = 0x00007fff5fbfd4e0
       r13 = 0x0000000100243df0 libFreeCADGui.dylib`Gui::TaskView::TaskView::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)
       r14 = 0x00007fff5fbfd4d0
       r15 = 0x0000000106848c00
       rip = 0x0000000100b0d37d libFreeCADApp.dylib`App::Document::getObjectsOfType(Base::Type const&) const + 61
    rflags = 0x0000000000010206
        cs = 0x000000000000002b
        fs = 0x0000000000000000
        gs = 0x0000000000000000

Recovery produced only the first body/sketch but nothing regarding the second body so I can not reproduce the crash.

wmayer

2017-01-23 21:48

administrator   ~0007931

Stupid question:
In the debugger output there appears the number "596" after SketcherGui::ViewProviderSketch::drawConstraintIcons(). What does this mean? Is it an offset value?

The crash you observed in your last post is indeed a different issue. I experienced it too and committed a fix.

garnish

2017-01-24 03:44

reporter   ~0007942

yes, that would be the offset from the beginning of the function to where the bug is. If I had source and this was gdb, I would say "list SketcherGui::ViewProviderSketch::drawConstraintIcons+596" or something like that...

There's probably a similar way to do that in lldb but I'm not familiar with it.

wmayer

2017-01-25 21:55

administrator   ~0007988

I have no idea how to use the "list" command.

What I did so far:
+ make a debug build with cmake (-DCMAKE_BUILD_TYPE=Debug)
+ gdb ./FreeCAD
+ break SketcherGui::ViewProviderSketch::drawConstraintIcons
+ run
FreeCAD then hits the breakpoint
Now when entering list SketcherGui::ViewProviderSketch::drawConstraintIcons
there is no output.
When I enter list "SketcherGui::ViewProviderSketch::drawConstraintIcons+596" I get an error message.

Any ideas how to continue?

Kunda1

2017-02-17 10:51

administrator   ~0008330

@garnish ping

garnish

2017-02-17 11:55

reporter   ~0008333

Got the ping. It looks like someone needs help using a debugger. I don't know how to use lldb. Here's a helpful page on lldb.

https://lldb.llvm.org/lldb-gdb.html

 I haven't built FC from source, I don't know how FC works inside, nor how it's supposed to work. I'm a kernel guy.

I no longer experience crashes with FC since I've stopped using FC completely. Maybe you should close this bug?

Kunda1

2017-05-01 22:57

administrator   ~0008840

@wmayer should we keep this open?

Kunda1

2017-05-26 22:48

administrator   ~0009162

@Abdullah if you have a moment can you weigh in on this?

abdullah

2017-05-27 07:28

manager   ~0009165

Last edited: 2017-05-27 12:04

It crashes with auto-update, it does not crash without it. Related to 0002710, in that early return from the execute function leaves sketch solver and viewer geometry/constraints out of sync. Then it crashes in the SoNode indexing.

When reaching a solution to the other ticket this may be automatically resolved as well.

abdullah

2017-05-27 10:30

manager   ~0009168

Last edited: 2017-06-02 15:15

It is in fact a generalisation of the 0002710, so it is better to handle this first, which will solve the problem for that one too. The solution is not the one proposed there in view of this ticket.

Summary:
execute() of SketchObject is not even executed, because Document::Recompute fails, because the dependency graph is not a DAG. Relevant code:

 try {
        // this sort gives the execute
        boost::topological_sort(d->DepList, std::front_inserter(make_order));
    }
    catch (const std::exception& e) {
        std::cerr << "Document::recompute: " << e.what() << std::endl;
        return -1;
    }
I think we need a general mechanism to tidy up objects when recompute is interrupted.

To be discussed in:
https://forum.freecadweb.org/viewtopic.php?f=10&t=19923&p=175762#p175762

wmayer

2017-08-19 15:51

administrator   ~0009959

https://github.com/FreeCAD/FreeCAD/commit/2004544e574cb45f7fdb5fb4f7ef02dfcad56aab

Kunda1

2017-08-19 19:32

administrator   ~0009965

c:FreeCAD:2004544e574cb45f7fdb5fb4f7ef02dfcad56aab:

Related Changesets

FreeCAD: master 8a100bf6

2017-01-23 21:48:02

wmayer

Details Diff
issue 0002836: Crash in sketcher Affected Issues
0002836
mod - src/Mod/PartDesign/Gui/TaskPrimitiveParameters.cpp Diff File
mod - src/Mod/PartDesign/Gui/TaskPrimitiveParameters.h Diff File

Issue History

Date Modified Username Field Change
2017-01-08 14:15 garnish New Issue
2017-01-08 14:15 garnish File Added: approximate fill.FCStd
2017-01-08 14:15 garnish File Added: Screen Shot 2017-01-08 at 7.11.22 AM.png
2017-01-08 14:18 garnish Note Added: 0007569
2017-01-08 21:46 normandc Note Added: 0007570
2017-01-08 21:47 normandc File Added: approximate fill_normandc1.FCStd
2017-01-08 21:47 normandc Note Edited: 0007570
2017-01-08 21:57 garnish Note Added: 0007571
2017-01-08 22:14 normandc Note Added: 0007572
2017-01-08 22:16 garnish Note Added: 0007573
2017-01-09 21:35 wmayer Note Added: 0007586
2017-01-10 15:13 garnish Note Added: 0007601
2017-01-15 14:46 garnish Note Added: 0007794
2017-01-23 21:48 wmayer Changeset attached => FreeCAD Master master 8a100bf6
2017-01-23 21:48 wmayer Note Added: 0007931
2017-01-23 22:24 Kunda1 Status new => feedback
2017-01-24 03:44 garnish Note Added: 0007942
2017-01-24 03:44 garnish Status feedback => new
2017-01-25 21:55 wmayer Note Added: 0007988
2017-02-17 10:51 Kunda1 Status new => feedback
2017-02-17 10:51 Kunda1 Note Added: 0008330
2017-02-17 11:55 garnish Note Added: 0008333
2017-02-17 11:55 garnish Status feedback => new
2017-03-15 20:11 Kunda1 Target Version => 0.17
2017-05-01 22:57 Kunda1 Note Added: 0008840
2017-05-26 22:48 Kunda1 Note Added: 0009162
2017-05-27 07:26 abdullah Relationship added related to 0002710
2017-05-27 07:28 abdullah Note Added: 0009165
2017-05-27 10:30 abdullah Note Added: 0009168
2017-05-27 12:03 Kunda1 Note View State: 0009165: private
2017-05-27 12:04 Kunda1 Note Edited: 0009165
2017-05-27 12:04 Kunda1 Note View State: 0009165: public
2017-05-27 12:04 Kunda1 Note Edited: 0009168
2017-06-02 15:14 Kunda1 Status new => confirmed
2017-06-02 15:15 Kunda1 Note Edited: 0009168
2017-08-19 15:51 wmayer Assigned To => wmayer
2017-08-19 15:51 wmayer Status confirmed => closed
2017-08-19 15:51 wmayer Resolution open => fixed
2017-08-19 15:51 wmayer Fixed in Version => 0.17
2017-08-19 15:51 wmayer Note Added: 0009959
2017-08-19 19:32 Kunda1 Note Added: 0009965