Testing the Drawing Module

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
triplus
Posts: 5016
Joined: Mon Dec 12, 2011 4:45 pm

Testing the Drawing Module

Postby triplus » Tue Apr 01, 2014 9:31 pm

It appears there is a demand for testing the Drawing Module. It's in the stage where I any testing would be quite helpful, mainly to get feedback on the user interface and push this into the master for testing. I am aware there are some deficiencies both in missing features and bugs, but I need some motivation to finish up the GUI to make it more user friendly. Input on this would be helpful. In particular GUI mocks - hand drawings on tissue paper are accepted!

Note: Windows testers would be helpful


http://freecadamusements.blogspot.com/2 ... art-1.html

On Ubuntu 13.10 (32bit) for successful compile i had to use:

Code: Select all

cmake -DCMAKE_BUILD_TYPE=Debug -DFREECAD_USE_EXTERNAL_PIVY=true ../FreeCAD_sf_master


And just a side note:

Cloning FreeCAD shouldn't take too long (it's about a 70mb download).


If i am not mistaken it is about twice that much.

Anyway after i compiled successfully i opened Part Design workbench and created single Box. I opened Drawing Workbench and tried to create drawing of it. In about 10 attempts trying different options (3 buttons) to insert a view only once was i successful everything else crashed FreeCAD. I did not see the template itself in that try just single view but trying to test the features i eventually crashed FreeCAD too.

The most common output in the terminal i got was:

Always after the start:

Code: Select all

void DBusMenuExporterPrivate::addAction(QAction*, int): Already tracking action "Toggle visibility" under id 228


Or inserting A3 Template and trying to insert new View:

Code: Select all

Section Plane doesn't intersect part
Unhandled Base::Exception caught in GUIApplication::notify.
The error message is: Sectional View Result is Empty


After doing everything else usually this happens as end result:

Code: Select all

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


P.S. This is it for now. Tomorrow i can try on Ubuntu 13.10 (64 bit) to see if it behaves better!
triplus
Posts: 5016
Joined: Mon Dec 12, 2011 4:45 pm

Re: Testing the Drawing Module

Postby triplus » Wed Apr 02, 2014 1:03 am

Well i had some spare time and struggled for a while but could not figure out how to successfully compile it on Ubuntu 13.10 (64 bit). For now i guess is for others to try and report back what they achieved.
User avatar
quick61
Posts: 3673
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: Testing the Drawing Module

Postby quick61 » Wed Apr 02, 2014 2:07 pm

Hi triplus, I'v built the Drawing branch on my Kubuntu 64 bit machine and had no troubles with the build. As usual, I built with external pivy as that package is already installed and sense I have zipos installed, I flagged that to be used external as well. Compiled as release build.

I'm getting crashes at several points but the most common one is when I go to the Drawing WB, select a drawing template, then try to select the part to be used in the Drawing. Right at the point of clicking on the part is where the crash occurs. I have yet to see this branch produce a Drawing no matter which way I try to get at it. Looks like there is still a bit more work to do. The back trace below.

Mark

OS: Ubuntu 13.10
Platform: 64-bit
Version: 0.14.3177 (Git)
Branch: drawing
Hash: daf2620a232cb0b969bffda51796c4f2133df373
Python version: 2.7.5+
Qt version: 4.8.4
Coin version: 4.0.0a
SoQt version: 1.5.0
OCC version: 6.7.0

Code: Select all

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff70b5d00 in App::PropertyLink::getValue() const () from /home/mark/Build/Drawing/lib/libFreeCADApp.so
(gdb) bt
#0  0x00007ffff70b5d00 in App::PropertyLink::getValue() const () from /home/mark/Build/Drawing/lib/libFreeCADApp.so
#1  0x00007fffc45ff688 in Drawing::FeaturePage::getPageWidth() const () from /home/mark/Build/Drawing/Mod/Drawing/Drawing.so
#2  0x00007fffc489a5a6 in DrawingGui::CanvasView::drawBackground(QPainter*, QRectF const&) ()
   from /home/mark/Build/Drawing/Mod/Drawing/DrawingGui.so
#3  0x00007ffff6249845 in QGraphicsView::paintEvent(QPaintEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#4  0x00007fffc489bd4a in DrawingGui::CanvasView::paintEvent(QPaintEvent*) () from /home/mark/Build/Drawing/Mod/Drawing/DrawingGui.so
#5  0x00007ffff5c9b104 in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#6  0x00007ffff603c5be in QFrame::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#7  0x00007ffff6247e09 in QGraphicsView::viewportEvent(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#8  0x00007ffff54d6a26 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) ()
   from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#9  0x00007ffff5c4bddc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#10 0x00007ffff5c52470 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#11 0x00007ffff75af35f in Gui::GUIApplication::notify(QObject*, QEvent*) () from /home/mark/Build/Drawing/lib/libFreeCADGui.so
#12 0x00007ffff54d68bd in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#13 0x00007ffff5c95811 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) ()
   from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#14 0x00007ffff5c96240 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#15 0x00007ffff5c960af in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#16 0x00007ffff5c960af in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#17 0x00007ffff5c960af in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#18 0x00007ffff5c960af in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#19 0x00007ffff5c953cc in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) ()
   from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#20 0x00007ffff5c96240 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#21 0x00007ffff5c953cc in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) ()
   from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
---Type <return> to continue, or q <return> to quit---
#22 0x00007ffff5c96240 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#23 0x00007ffff5c953cc in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) ()
   from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#24 0x00007ffff5c96240 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#25 0x00007ffff5c953cc in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) ()
   from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#26 0x00007ffff5c96240 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#27 0x00007ffff5c960af in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#28 0x00007ffff5c953cc in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) ()
   from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#29 0x00007ffff5c96240 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#30 0x00007ffff5c960af in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#31 0x00007ffff5c960af in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#32 0x00007ffff5c960af in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#33 0x00007ffff5c960af in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#34 0x00007ffff5c960af in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#35 0x00007ffff5c960af in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#36 0x00007ffff5c960af in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#37 0x00007ffff5c953cc in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) ()
   from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#38 0x00007ffff5e57f9e in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
---Type <return> to continue, or q <return> to quit---
#39 0x00007ffff5c8afc0 in QWidgetPrivate::syncBackingStore() () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#40 0x00007ffff5c9ac82 in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#41 0x00007ffff6054db3 in QMainWindow::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#42 0x00007ffff77c3efb in Gui::MainWindow::event(QEvent*) () from /home/mark/Build/Drawing/lib/libFreeCADGui.so
#43 0x00007ffff5c4bdfc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#44 0x00007ffff5c52470 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#45 0x00007ffff75af35f in Gui::GUIApplication::notify(QObject*, QEvent*) () from /home/mark/Build/Drawing/lib/libFreeCADGui.so
#46 0x00007ffff54d68bd in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#47 0x00007ffff54d9e1f in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#48 0x00007ffff621a082 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#49 0x00007ffff6223669 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#50 0x00007ffff54eedce in QObject::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#51 0x00007ffff623097b in QGraphicsScene::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#52 0x00007ffff5c4bdfc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#53 0x00007ffff5c52470 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#54 0x00007ffff75af35f in Gui::GUIApplication::notify(QObject*, QEvent*) () from /home/mark/Build/Drawing/lib/libFreeCADGui.so
#55 0x00007ffff54d68bd in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#56 0x00007ffff54d9e1f in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#57 0x00007ffff5504093 in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#58 0x00007fffee57c3b6 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#59 0x00007fffee57c708 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#60 0x00007fffee57c7ac in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#61 0x00007ffff55039d1 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#62 0x00007ffff5ced9d6 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#63 0x00007ffff54d55ef in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#64 0x00007ffff54d58e5 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#65 0x00007ffff54dae5b in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#66 0x00007ffff75a6f8c in Gui::Application::runApplication() () from /home/mark/Build/Drawing/lib/libFreeCADGui.so
#67 0x0000000000404043 in main ()
This post made with 0.0% Micro$oft products - GOT LINUX?
triplus
Posts: 5016
Joined: Mon Dec 12, 2011 4:45 pm

Re: Testing the Drawing Module

Postby triplus » Wed Apr 02, 2014 6:29 pm

Hi triplus, I'v built the Drawing branch on my Kubuntu 64 bit machine and had no troubles with the build. As usual, I built with external pivy as that package is already installed and sense I have zipos installed, I flagged that to be used external as well. Compiled as release build.


Yes i used external pivy but did not try Release build only Debug. Will try that next time. Anyway:

I'm getting crashes at several points but the most common one is when I go to the Drawing WB, select a drawing template, then try to select the part to be used in the Drawing. Right at the point of clicking on the part is where the crash occurs. I have yet to see this branch produce a Drawing no matter which way I try to get at it. Looks like there is still a bit more work to do.


Yes this i guess confirms what i have seen currently there is too much FreeCAD crashing to do any tests. Will wait for Luke to confirm we should try again and then try to compile and test and hopefully give some useful feedback again.
mrlukeparry
Posts: 652
Joined: Fri Jul 22, 2011 8:37 pm
Contact:

Re: Testing the Drawing Module

Postby mrlukeparry » Wed Apr 02, 2014 6:56 pm

hi guys,

Please be patient. I only put that guide up because a few people were asking how to test it. I need to do a second part of the guide because the user interface (task view / toolbar) hasn't been set up yet. This is mainly because nobody has helped with feedback/ideas, so I've been putting it off...

For example:

0x00007ffff70b5d00 in App::PropertyLink::getValue() const () from /home/mark/Build/Drawing/lib/libFreeCADApp.so
(gdb) bt
#0 0x00007ffff70b5d00 in App::PropertyLink::getValue() const () from /home/mark/Build/Drawing/lib/libFreeCADApp.so
#1 0x00007fffc45ff688 in Drawing::FeaturePage::getPageWidth() const () from /home/mark/Build/Drawing/Mod/Drawing/Drawing.so

This i'd imagine is because a template hasn't been loaded. This i need to explain in part 2.

Ideally I need help with ideas for the GUI. This also includes Icons too...
triplus
Posts: 5016
Joined: Mon Dec 12, 2011 4:45 pm

Re: Testing the Drawing Module

Postby triplus » Wed Apr 02, 2014 7:42 pm

No worry Luke do not feel the pressure. We will wait for part 2 of the tutorial.

This i'd imagine is because a template hasn't been loaded. This i need to explain in part 2.


Yes i do believe i was facing this (template not being loaded) based on my impressions trying different things.
ulrich1a
Posts: 1406
Joined: Sun Jul 07, 2013 12:08 pm

Re: Testing the Drawing Module

Postby ulrich1a » Thu Apr 03, 2014 10:23 am

triplus wrote:Yes i do believe i was facing this (template not being loaded) based on my impressions trying different things.
Did you have also a look here: http://freecad-tutorial.blogspot.de/201 ... qus_thread
Here Normand explains how to load a template.
It might be, that also the osifont is needed. This font was used, when I tested Lukes Drawing workbench. From the 4 buttons shown, for me only the first two produced something useful, not crashing.
I was able to make a view from a cube and give it a dimension after some trials.

Adding an angle dimension to the cube gave: The angle could not be calculated.

Ulrich
jmaustpc
Posts: 8101
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Testing the Drawing Module

Postby jmaustpc » Thu Apr 03, 2014 10:44 am

mrlukeparry wrote:Ideally I need help with ideas for the GUI. This also includes Icons too...


Hi Luke
I'm happy to make the icons if you like? I suggest you just don't have an icon at first for all the places you want one, such that the default white box with black cross shows up, then I will go through it and make something for all those spots, if you like?

Jim
triplus
Posts: 5016
Joined: Mon Dec 12, 2011 4:45 pm

Re: Testing the Drawing Module

Postby triplus » Thu Apr 03, 2014 5:47 pm

ulrich1a wrote:
triplus wrote:Yes i do believe i was facing this (template not being loaded) based on my impressions trying different things.
Did you have also a look here: http://freecad-tutorial.blogspot.de/201 ... qus_thread
Here Normand explains how to load a template.
It might be, that also the osifont is needed. This font was used, when I tested Lukes Drawing workbench. From the 4 buttons shown, for me only the first two produced something useful, not crashing.
I was able to make a view from a cube and give it a dimension after some trials.

Adding an angle dimension to the cube gave: The angle could not be calculated.

Ulrich


I see. I assumed two available options in drop down menu do have real templates saved under Mod/Drawing/Templates for custom build but this is not true. Indeed i will investigate next time and try to load one manually. Quick test when i wanted to load custom A4 template from default FreeCAD location (usr/share...) crashed it. Maybe new SVG templates need additional "code snippet" or something else is the cause. I am not sure i will have time to play with this before weekend. Anyway there is no rush and i do believe much will get sorted out when playing more with it.
ulrich1a
Posts: 1406
Joined: Sun Jul 07, 2013 12:08 pm

Re: Testing the Drawing Module

Postby ulrich1a » Thu Apr 03, 2014 7:44 pm

In order to avoid a crash after adding a page, a doubleclick onto the page icon in the document tree is needed. Then a drawing view is generated and a template can be specified.

There is may be something wrong with the document update mechanism.

Ulrich

OS: Debian GNU/Linux 7.4 (wheezy)
Platform: 32-bit
Version: 0.14.3177 (Git)
Branch: drawing
Hash: daf2620a232cb0b969bffda51796c4f2133df373
Python version: 2.7.3
Qt version: 4.8.2
Coin version: 3.1.3
SoQt version: 1.5.0
OCC version: 6.7.0