Complex Sections

Discussions about the development of the TechDraw workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
domad
Veteran
Posts: 2055
Joined: Mon Jun 22, 2020 12:16 pm

Re: Complex Sections

Post by domad »

Greetings to the Community!
Hi @ M4x and @wandererfan
The result of the terminal after the crash:

Code: Select all

Program received signal SIGSEGV, Segmentation fault.
#0  /lib/x86_64-linux-gnu/libc.so.6(+0x43090) [0x7fc948b04090]
#1  0x7fc9161d1ff0 in TopoDS_Builder::Add(TopoDS_Shape&, TopoDS_Shape const&) const from /tmp/.mount_FreeCAnPDtkX/usr/lib/./libTKBRep.so.7+0x20
#2  0x7fc917481196 in BRepAlgo_NormalProjection::Add(TopoDS_Shape const&) from /tmp/.mount_FreeCAnPDtkX/usr/lib/./libTKBool.so.7+0x26
#3  0x7fc8cea4748c in TechDraw::DrawComplexSection::projectProfileWire(TopoDS_Wire, gp_Ax3) from /tmp/.mount_FreeCAnPDtkX/usr/lib/TechDraw.so+0x11c
#4  0x7fc8cea4ac61 in TechDraw::DrawComplexSection::makeAlignedPieces(TopoDS_Shape const&, TopoDS_Shape const&, double) from /tmp/.mount_FreeCAnPDtkX/usr/lib/TechDraw.so+0x491
#5  0x7fc8cea4cd6b in TechDraw::DrawComplexSection::prepareShape(TopoDS_Shape const&, double) from /tmp/.mount_FreeCAnPDtkX/usr/lib/TechDraw.so+0x8b
#6  0x7fc8ceaa1cca in TechDraw::DrawViewSection::onSectionCutFinished() from /tmp/.mount_FreeCAnPDtkX/usr/lib/TechDraw.so+0x11a
#7  /tmp/.mount_FreeCAnPDtkX/usr/bin/../lib/libQt5Core.so.5(+0x1dfacd) [0x7fc94907dacd]
#8  0x7fc948f4f7bd in QFutureWatcherBase::event(QEvent*) from /tmp/.mount_FreeCAnPDtkX/usr/bin/../lib/libQt5Core.so.5+0x77
#9  0x7fc9498f00f7 in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /tmp/.mount_FreeCAnPDtkX/usr/bin/../lib/libQt5Widgets.so.5+0xd9
#10  0x7fc94ac86399 in Gui::GUIApplication::notify(QObject*, QEvent*) from /tmp/.mount_FreeCAnPDtkX/usr/bin/../lib/libFreeCADGui.so+0x89
#11  0x7fc949060608 in QCoreApplication::notifyInternal2(QObject*, QEvent*) from /tmp/.mount_FreeCAnPDtkX/usr/bin/../lib/libQt5Core.so.5+0x8e
#12  0x7fc94906086f in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) from /tmp/.mount_FreeCAnPDtkX/usr/bin/../lib/libQt5Core.so.5+0x1fb
#13  /tmp/.mount_FreeCAnPDtkX/usr/bin/../lib/libQt5Core.so.5(+0x1f37dd) [0x7fc9490917dd]
#14  /tmp/.mount_FreeCAnPDtkX/usr/bin/../lib/./libglib-2.0.so.0(g_main_context_dispatch+0x25c) [0x7fc94520d1bc]
#15  /tmp/.mount_FreeCAnPDtkX/usr/bin/../lib/./libglib-2.0.so.0(+0x58489) [0x7fc94520d489]
#16  /tmp/.mount_FreeCAnPDtkX/usr/bin/../lib/./libglib-2.0.so.0(g_main_context_iteration+0x31) [0x7fc94520d551]
#17  0x7fc9490913f3 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /tmp/.mount_FreeCAnPDtkX/usr/bin/../lib/libQt5Core.so.5+0x5b
#18  0x7fc94905e18a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) from /tmp/.mount_FreeCAnPDtkX/usr/bin/../lib/libQt5Core.so.5+0x186
#19  0x7fc9490623b5 in QCoreApplication::exec() from /tmp/.mount_FreeCAnPDtkX/usr/bin/../lib/libQt5Core.so.5+0x107
#20  0x7fc94ac0ab9e in Gui::Application::runApplication() from /tmp/.mount_FreeCAnPDtkX/usr/bin/../lib/libFreeCADGui.so+0x1b2e
#21  /tmp/.mount_FreeCAnPDtkX/usr/bin/freecad(+0x68e5) [0x564615a0f8e5]
#22  /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0x7fc948ae5083]
#23  /tmp/.mount_FreeCAnPDtkX/usr/bin/freecad(+0x6c29) [0x564615a0fc29]
domad
Veteran
Posts: 2055
Joined: Mon Jun 22, 2020 12:16 pm

Re: Complex Sections

Post by domad »

Greetings to the Community!
Also in Version: 0.21.30858 (Git) AppImage, the same crash occurs.
User avatar
wandererfan
Veteran
Posts: 6270
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Complex Sections

Post by wandererfan »

domad wrote: Sat Nov 05, 2022 12:44 pm
Fails should be fixed by: profile segment outside shape git commit 38f1906ae0 and fail on checking "live update" git commit c5a263bdd8.
domad
Veteran
Posts: 2055
Joined: Mon Jun 22, 2020 12:16 pm

Re: Complex Sections

Post by domad »

wandererfan wrote: Mon Nov 07, 2022 4:47 pm ...
Greetings to the Community!
... as always very fast and effective, thank you! :)
User avatar
FBXL5
Posts: 981
Joined: Sat Aug 03, 2019 8:45 pm

Re: Complex Sections

Post by FBXL5 »

I still have crash issues. :(

Code: Select all

OS: macOS 10.16
Word size of FreeCAD: 64-bit
Version: 0.21.30868 (Git)
Build type: Release
Branch: master
Hash: b3372a52054fc34c243ac508ce67717b1476f2a9
Python 3.10.6, Qt 5.15.4, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3
Locale: C/Default (C)
Installed mods: 
  * freecad.gears 1.0.0
  * fcgear 1.0.0
  * Render 2022.2.0
  * Curves.backup1662374221.0929039
  * fasteners 0.4.23
  * sheetmetal 0.2.58
  * Curves 0.5.13
  * Assembly3 0.11.3
My example file with complex sections now crashes FC every time the drawing page gets redrawn; and that's right after the file opened...

Now I'm tired trying to fix the file and so use simple sections to show another imperfection:

The complex and the simple sections have in common that their x axis is always horizontal and not parallel to the section line as one would expect it. (only A-A is according to standards now)
Snip macro screenshot-9c43ae.png
Snip macro screenshot-9c43ae.png (66.18 KiB) Viewed 914 times
Trying to turn the section views shows that the hatching has a different spin centre. This was the case for complex sections as well, as long as I was able to test them before the file started crashing
Snip macro screenshot-8c3cba.png
Snip macro screenshot-8c3cba.png (73.73 KiB) Viewed 914 times
At least the section views are correct according to the section lines and arrow directions, they only need to be automatically turned to the expected angle some how.
aapo
Posts: 615
Joined: Mon Oct 29, 2018 6:41 pm

Re: Complex Sections

Post by aapo »

FBXL5 wrote: Tue Nov 08, 2022 3:26 pm I still have crash issues. :(
I had some crashes, too. They seem to be mainly caused by changing the section view directions; the view from the front with z-axis upwards works for me.

Trying to turn the section views shows that the hatching has a different spin centre. This was the case for complex sections as well, as long as I was able to test them before the file started crashing
Snip macro screenshot-8c3cba.png

At least the section views are correct according to the section lines and arrow directions, they only need to be automatically turned to the expected angle some how.
I noticed the same problem today. I'll try to make a simple example about the problem.
User avatar
wandererfan
Veteran
Posts: 6270
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Complex Sections

Post by wandererfan »

FBXL5 wrote: Tue Nov 08, 2022 3:26 pm My example file with complex sections now crashes FC every time the drawing page gets redrawn; and that's right after the file opened...
Could I have a copy of the file that crashes please?

Your simple section file would be great test data too.

Thanks,
User avatar
FBXL5
Posts: 981
Joined: Sat Aug 03, 2019 8:45 pm

Re: Complex Sections

Post by FBXL5 »

wandererfan wrote: Tue Nov 08, 2022 9:14 pm Could I have a copy of the file that crashes please?
No problem.
The crashing one:
TechDrawTest-1.FCStd
(469.82 KiB) Downloaded 8 times
The simple section only one:
I opened the the file above with an older version of FC, removed the complex section page and saved it; I'm not sure if the older version left some geometric descriptions it couldn't handle:
TechDrawTest-2.FCStd
(461.44 KiB) Downloaded 8 times
aapo
Posts: 615
Joined: Mon Oct 29, 2018 6:41 pm

Re: Complex Sections

Post by aapo »

aapo wrote: Tue Nov 08, 2022 3:42 pm I noticed the same problem today. I'll try to make a simple example about the problem.
Quoting myself, I succeeded to make a relatively simple example giving me partial crash with ComplexSection (.FCStd attached):

Code: Select all

11:05:14  Unhandled unknown exception caught in GUIApplication::notify.
EDIT: Curiously, sometimes it crashes, and sometimes it produces exactly the aligned or offset section I wanted.
ComplexSectionBug_p01.png
ComplexSectionBug_p01.png (392.67 KiB) Viewed 795 times

Code: Select all

OS: Debian GNU/Linux bookworm/sid (KDE/plasma)
Word size of FreeCAD: 64-bit
Version: 0.21.30906 (Git)
Build type: Release
Branch: master
Hash: 4a27fa4ed55a6d57ce29d29fcc41e448278c550f
Python 3.10.8, Qt 5.15.6, Coin 4.0.0, Vtk 7.1.1, OCC 7.6.3
Locale: English/United States (en_US)
Installed mods: 
  * Assembly4
  * Render
  * fasteners
  * FCGear
  * Manipulator
  * Curves
  * sheetmetal
Attachments
ComplexSectionBug.FCStd
(176.7 KiB) Downloaded 11 times
User avatar
wandererfan
Veteran
Posts: 6270
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Complex Sections

Post by wandererfan »

FBXL5 wrote: Wed Nov 09, 2022 7:03 am
Your version (Version: 0.21.30868 (Git)) does not include these 2 fixes:
git commit c5a263bdd8 [TD]Prevent ComplexSection creation without valid direction
git commit 38f1906ae0 [TD]fix exception on empty compound

My version (Version: 0.21.30899 +1 (Git)) has those two fixes and does not crash when opening "TechDrawTest-1.FCStd".
Attachments
Blatt_ComplexNoCrashOnLoad.png
Blatt_ComplexNoCrashOnLoad.png (36.64 KiB) Viewed 745 times
Post Reply