TechDraw Multithread Testing
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
- babaroga
- Posts: 180
- Joined: Sun Aug 14, 2016 6:52 pm
- Location: Banja Luka, Republic of Srpska, Bosnia and Herzegovina
Re: Multithread Testing
Thank you for this breakthrough. I am using Freecad for generation of 3d views for assembly instructions of furniture.
I tested your branch and it opens my latest bunk bed model with 5 opened drawings with 3D model views in around 20s.
Freecad built from master takes 3 minutes and 15 seconds for same file.
Generation of 3d view on a new page takes 2:50 on FC from master and 0:16 with FC with multithread.
I tested your branch and it opens my latest bunk bed model with 5 opened drawings with 3D model views in around 20s.
Freecad built from master takes 3 minutes and 15 seconds for same file.
Generation of 3d view on a new page takes 2:50 on FC from master and 0:16 with FC with multithread.
Re: Multithread Testing
Yes, works flawless yet. I do not know any issue now. I like the two new features!wandererfan wrote: ↑Fri Jul 29, 2022 6:31 pm New version available that fixes this. Other changes: fix dimensions on redraw when keepUpdated = false, preference on Advanced tab for progress reporting.
I only have one file, that crashes (which does not crash in the master), but it is an old (0.19dev), with a DAG and many other issues. As i repaired it in the master, it worked. Is that relevant (for me it is not, but for others)?
Greetings
user1234
- babaroga
- Posts: 180
- Joined: Sun Aug 14, 2016 6:52 pm
- Location: Banja Luka, Republic of Srpska, Bosnia and Herzegovina
Re: Multithread Testing
In a matter of fact, there is one issue. When creating 3d view "Scale type" is set to Automatic and scale is set to 1.
So I get this..
When I change "Scale type" to Custom and then back to Automatic, Scale get some expected value like 0.005 and everything looks OK.
Anyway, this is 8-9x faster. On monday, I will have to generate 5-6 new 3D views so I would be able to test it in working environment.
So I get this..
When I change "Scale type" to Custom and then back to Automatic, Scale get some expected value like 0.005 and everything looks OK.
Anyway, this is 8-9x faster. On monday, I will have to generate 5-6 new 3D views so I would be able to test it in working environment.
- wandererfan
- Veteran
- Posts: 6326
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: Multithread Testing
Test file that crashes, please. I don't like crashes.
Re: Multithread Testing
Here and there a crash is not that bad. A good time to reset.
The file is too big, i managed tto make it smaller.
log:
Code: Select all
.....
Log: VPP::getMDIViewPage has no m_mdiView!
Log: VPP::getMDIViewPage has no m_mdiView!
Msg: ProjItem is finding hidden lines
Msg: Section is making section cut
Msg: ProjItem001 is finding hidden lines
Log: TechDraw::GeometryObject::addGeomFromCompound edgeCompound is NULL
Log: TIMING - ProjItem001 GO spent: 294.545 millisecs in HLRBRep_PolyAlgo & co
Err: Program received signal SIGSEGV, Segmentation fault.
Err: #0 /lib/x86_64-linux-gnu/libc.so.6(+0x3bd60) [0x7f5d9b753d60]
Err: #1 0x7f5c25925669 in TechDraw::GeometryObject::calcBoundingBox() const from /home/user/Programs/FreeCADhlrThreadrc1/build/Mod/TechDraw/TechDraw.so+0x29
Err: #2 0x7f5c258b5c5c in TechDraw::DrawViewPart::onHlrFinished() from /home/user/Programs/FreeCADhlrThreadrc1/build/Mod/TechDraw/TechDraw.so+0x2c
Err: #3 0x7f5c258b6146 in TechDraw::DrawViewPart::buildGeometryObject(TopoDS_Shape&, gp_Ax2&) from /home/user/Programs/FreeCADhlrThreadrc1/build/Mod/TechDraw/TechDraw.so+0x246
Err: #4 0x7f5c258adf3a in TechDraw::DrawViewPart::makeGeometryForShape(TopoDS_Shape&) from /home/user/Programs/FreeCADhlrThreadrc1/build/Mod/TechDraw/TechDraw.so+0x19a
Err: #5 0x7f5c258ae0a1 in TechDraw::DrawViewPart::partExec(TopoDS_Shape&) from /home/user/Programs/FreeCADhlrThreadrc1/build/Mod/TechDraw/TechDraw.so+0x41
Err: #6 0x7f5c258b6523 in TechDraw::DrawViewPart::execute() from /home/user/Programs/FreeCADhlrThreadrc1/build/Mod/TechDraw/TechDraw.so+0x103
Err: #7 0x7f5c258d1150 in TechDraw::DrawProjGroupItem::execute() from /home/user/Programs/FreeCADhlrThreadrc1/build/Mod/TechDraw/TechDraw.so+0xb0
Err: #8 0x7f5c258d1231 in TechDraw::DrawProjGroupItem::onDocumentRestored() from /home/user/Programs/FreeCADhlrThreadrc1/build/Mod/TechDraw/TechDraw.so+0x11
Err: #9 0x7f5d9d714aae in App::Document::afterRestore(std::vector<App::DocumentObject*, std::allocator<App::DocumentObject*> > const&, bool) from /home/user/Programs/FreeCADhlrThreadrc1/build/lib/libFreeCADApp.so+0x57e
Err: #10 0x7f5d9d71584a in App::Document::afterRestore(bool) from /home/user/Programs/FreeCADhlrThreadrc1/build/lib/libFreeCADApp.so+0x4a
Err: #11 0x7f5d9d8dcf14 in App::Application::openDocuments(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >*, bool) from /home/user/Programs/FreeCADhlrThreadrc1/build/lib/libFreeCADApp.so+0x13f4
Err: #12 0x7f5d9d8ddbea in App::Application::openDocument(char const*, bool) from /home/user/Programs/FreeCADhlrThreadrc1/build/lib/libFreeCADApp.so+0xea
Err: #13 0x7f5d9d8f6b9d in App::Application::sOpenDocument(_object*, _object*, _object*) from /home/user/Programs/FreeCADhlrThreadrc1/build/lib/libFreeCADApp.so+0xcd
Err: #14 /lib/x86_64-linux-gnu/libpython3.9.so.1.0(+0x10cc93) [0x7f5d9ce69c93]
Err: #15 /lib/x86_64-linux-gnu/libpython3.9.so.1.0(_PyObject_MakeTpCall+0x90) [0x7f5d9ce23a50]
Err: #16 /lib/x86_64-linux-gnu/libpython3.9.so.1.0(_PyEval_EvalFrameDefault+0x8632) [0x7f5d9cdd52f2]
Err: #17 /lib/x86_64-linux-gnu/libpython3.9.so.1.0(+0x1a4ddc) [0x7f5d9cf01ddc]
Err: #18 /lib/x86_64-linux-gnu/libpython3.9.so.1.0(_PyEval_EvalCodeWithName+0x4e) [0x7f5d9cf0212e]
Err: #19 /lib/x86_64-linux-gnu/libpython3.9.so.1.0(PyEval_EvalCodeEx+0x3e) [0x7f5d9cf0217e]
Err: #20 /lib/x86_64-linux-gnu/libpython3.9.so.1.0(PyEval_EvalCode+0x1b) [0x7f5d9cefd72b]
Err: #21 /lib/x86_64-linux-gnu/libpython3.9.so.1.0(+0x1e9735) [0x7f5d9cf46735]
Err: #22 /lib/x86_64-linux-gnu/libpython3.9.so.1.0(PyRun_StringFlags+0x93) [0x7f5d9cf47013]
Err: #23 0x7f5d9d406df8 in Base::InterpreterSingleton::runString[abi:cxx11](char const*) from /home/user/Programs/FreeCADhlrThreadrc1/build/lib/libFreeCADBase.so+0x58
Err: #24 0x7f5d9dfe1921 in Gui::Command::_runCommand(char const*, int, Gui::Command::DoCmd_Type, char const*) from /home/user/Programs/FreeCADhlrThreadrc1/build/lib/libFreeCADGui.so+0x81
Err: #25 0x7f5d9dfe1a7f in Gui::Command::_doCommand(char const*, int, Gui::Command::DoCmd_Type, char const*, ...) from /home/user/Programs/FreeCADhlrThreadrc1/build/lib/libFreeCADGui.so+0xcf
Err: #26 0x7f5d9df12977 in Gui::Application::open(char const*, char const*) from /home/user/Programs/FreeCADhlrThreadrc1/build/lib/libFreeCADGui.so+0x557
Err: #27 0x7f5d9dfec56c in StdCmdOpen::activated(int) from /home/user/Programs/FreeCADhlrThreadrc1/build/lib/libFreeCADGui.so+0x60c
Err: #28 0x7f5d9dfe3afd in Gui::Command::_invoke(int, bool) from /home/user/Programs/FreeCADhlrThreadrc1/build/lib/libFreeCADGui.so+0x21d
Err: #29 0x7f5d9dfe3efe in Gui::Command::invoke(int, Gui::Command::TriggerSource) from /home/user/Programs/FreeCADhlrThreadrc1/build/lib/libFreeCADGui.so+0xfe
Err: #30 /lib/x86_64-linux-gnu/libQt5Core.so.5(+0x2e45e0) [0x7f5d9bda85e0]
Err: #31 0x7f5d9c82fb62 in QAction::triggered(bool) from /lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x42
Err: #32 0x7f5d9c8323a1 in QAction::activate(QAction::ActionEvent) from /lib/x86_64-linux-gnu/libQt5Widgets.so.5+0xe1
Err: #33 /lib/x86_64-linux-gnu/libQt5Widgets.so.5(+0x2521b2) [0x7f5d9c9251b2]
Err: #34 0x7f5d9c9252d1 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) from /lib/x86_64-linux-gnu/libQt5Widgets.so.5+0xf1
Err: #35 0x7f5d9ca149ca in QToolButton::mouseReleaseEvent(QMouseEvent*) from /lib/x86_64-linux-gnu/libQt5Widgets.so.5+0xa
Err: #36 0x7f5d9c875fae in QWidget::event(QEvent*) from /lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x1ce
Err: #37 0x7f5d9c83615f in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x7f
Err: #38 0x7f5d9c83d04b in QApplication::notify(QObject*, QEvent*) from /lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x49b
Err: #39 0x7f5d9dfaaa58 in Gui::GUIApplication::notify(QObject*, QEvent*) from /home/user/Programs/FreeCADhlrThreadrc1/build/lib/libFreeCADGui.so+0x68
Err: #40 0x7f5d9bd71fca in QCoreApplication::notifyInternal2(QObject*, QEvent*) from /lib/x86_64-linux-gnu/libQt5Core.so.5+0x12a
Err: #41 0x7f5d9c83c076 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) from /lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x1d6
Err: #42 /lib/x86_64-linux-gnu/libQt5Widgets.so.5(+0x1bb011) [0x7f5d9c88e011]
Err: #43 /lib/x86_64-linux-gnu/libQt5Widgets.so.5(+0x1be33e) [0x7f5d9c89133e]
Err: #44 0x7f5d9c83615f in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x7f
Err: #45 0x7f5d9dfaaa58 in Gui::GUIApplication::notify(QObject*, QEvent*) from /home/user/Programs/FreeCADhlrThreadrc1/build/lib/libFreeCADGui.so+0x68
Err: #46 0x7f5d9bd71fca in QCoreApplication::notifyInternal2(QObject*, QEvent*) from /lib/x86_64-linux-gnu/libQt5Core.so.5+0x12a
Err: #47 0x7f5d9c14c583 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) from /lib/x86_64-linux-gnu/libQt5Gui.so.5+0x653
Err: #48 0x7f5d9c12264c in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /lib/x86_64-linux-gnu/libQt5Gui.so.5+0xac
Err: #49 /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5(+0x697da) [0x7f5d9606b7da]
Err: #50 /lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x25b) [0x7f5d99b1ee6b]
Err: #51 /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x52118) [0x7f5d99b1f118]
Err: #52 /lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x2f) [0x7f5d99b1f1cf]
Err: #53 0x7f5d9bdc951f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /lib/x86_64-linux-gnu/libQt5Core.so.5+0x5f
Err: #54 0x7f5d9bd7098b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) from /lib/x86_64-linux-gnu/libQt5Core.so.5+0x12b
Err: #55 0x7f5d9bd78c00 in QCoreApplication::exec() from /lib/x86_64-linux-gnu/libQt5Core.so.5+0x90
Err: #56 0x7f5d9df1ec7f in Gui::Application::runApplication() from /home/user/Programs/FreeCADhlrThreadrc1/build/lib/libFreeCADGui.so+0x1aef
Err: #57 /home/user/Programs/FreeCADhlrThreadrc1/build/bin/FreeCAD(+0x67ec) [0x556c2cca47ec]
Err: #58 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xea) [0x7f5d9b73ed0a]
Err: #59 /home/user/Programs/FreeCADhlrThreadrc1/build/bin/FreeCAD(+0x6a8a) [0x556c2cca4a8a]
Greetings
user1234
edit: i forget to mention, bides that file does not crash in the master, is still corrupt. You will see that in the dependency graph and in the dimensions
- wandererfan
- Veteran
- Posts: 6326
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
- wandererfan
- Veteran
- Posts: 6326
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
- babaroga
- Posts: 180
- Joined: Sun Aug 14, 2016 6:52 pm
- Location: Banja Luka, Republic of Srpska, Bosnia and Herzegovina
Re: Multithread Testing
Good morning.
My bad. It is command "Insert view" or TechDraw_View
Same thing happens also with "Insert Projection Group". If I just select 3D objects, select one secondary view eg. Right and press OK I get this.
If I Press "Redraw page", nothing changes.
If I press "Refresh" (Std_Refresh) on Projection group, nothing changes.
If I press "Refresh" on "Front" projection I get this.
If I press "Refresh" again, Front view gets even smaller. Please note, after each refresh in model tree "ProjGroup" and "Front" have status touched.
After one more refresh, Front view gets even smaller and after one more it gets invisible (no dots or lines visible)
I tried to do "Refresh page" from TD workbench afterwards and now my laptop is going with two CPU cores at 100% and nothing on page (for 15 minutes and counting). I finally deleted Projection group from page and cores go down in about 3-4 minutes.
Now, I took new page, and created a new Projection group. I picked also Right Secondary projection. I changed "Scale type" to Page and then back to Automatic. After pressing OK to generate drawing page I got expected result.
Only downside is that Projection group ad Front view in tree always have check mark. And I have two CPU cores running at 100% at all time.
My bad. It is command "Insert view" or TechDraw_View
Same thing happens also with "Insert Projection Group". If I just select 3D objects, select one secondary view eg. Right and press OK I get this.
If I Press "Redraw page", nothing changes.
If I press "Refresh" (Std_Refresh) on Projection group, nothing changes.
If I press "Refresh" on "Front" projection I get this.
If I press "Refresh" again, Front view gets even smaller. Please note, after each refresh in model tree "ProjGroup" and "Front" have status touched.
After one more refresh, Front view gets even smaller and after one more it gets invisible (no dots or lines visible)
I tried to do "Refresh page" from TD workbench afterwards and now my laptop is going with two CPU cores at 100% and nothing on page (for 15 minutes and counting). I finally deleted Projection group from page and cores go down in about 3-4 minutes.
Now, I took new page, and created a new Projection group. I picked also Right Secondary projection. I changed "Scale type" to Page and then back to Automatic. After pressing OK to generate drawing page I got expected result.
Only downside is that Projection group ad Front view in tree always have check mark. And I have two CPU cores running at 100% at all time.
- babaroga
- Posts: 180
- Joined: Sun Aug 14, 2016 6:52 pm
- Location: Banja Luka, Republic of Srpska, Bosnia and Herzegovina
Re: Multithread Testing
I forgot to include my system info
Code: Select all
OS: Manjaro Linux (KDE/plasmawayland)
Word size of FreeCAD: 64-bit
Version: 0.21.29851 (Git)
Build type: Unknown
Branch: hlrThreadrc1
Hash: 24448c60cc0ba38501b42aa528527e25a6e969f8
Python 3.10.5, Qt 5.15.5, Coin 4.0.1, Vtk 9.1.0, OCC 7.5.3
Locale: English/United States (en_US)
Installed mods:
* Manipulator 1.4.5
* Render 2022.2.0
* fasteners 0.3.44
* Assembly4 0.12.0
* A2plus 0.4.56a
* sheetmetal 0.2.49
* InventorLoader 1.3.0
* Curves 0.4.4
* kicadStepUpMod 10.13.0
- babaroga
- Posts: 180
- Joined: Sun Aug 14, 2016 6:52 pm
- Location: Banja Luka, Republic of Srpska, Bosnia and Herzegovina
Re: Multithread Testing
There is one more...
After generation of drawing page, some underlying geometry with scale =1 is left in view.
In Freecad it looks like this:
When drawing is exported as SVG and opened in Inkscape with Display mode set to Outline, it looks like this:
This big bed is invisible until I switch Display mode to Outline
EDIT: This does not happen every time. I will try to figure out pattern triggering this issue.
After generation of drawing page, some underlying geometry with scale =1 is left in view.
In Freecad it looks like this:
When drawing is exported as SVG and opened in Inkscape with Display mode set to Outline, it looks like this:
This big bed is invisible until I switch Display mode to Outline
EDIT: This does not happen every time. I will try to figure out pattern triggering this issue.