Test request: quarter based viewer

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: Test request: quarter based viewer

Post by looo »

thanks!
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Test request: quarter based viewer

Post by NormandC »

Guys,

Lately I've been having display problems and I suspect the quarter-based viewer. It happens when I open multiple files. At some point one of the files won't display in Flat lines mode anymore, and sketches will disappear.

It just happened again. I had two files opened, here's how the remaining file was suddenly showing after I closed the other one.
FC_display_bug_01.png
FC_display_bug_01.png (20.01 KiB) Viewed 1594 times
I should add that the sketches completely disappeared, only when I selected them in the tree did they show again, but they are completely garbled.

After closing and opening FreeCAD again and loading the file, here's how it should look like:
File displayed properly after restart of FreeCAD.
File displayed properly after restart of FreeCAD.
FC_Display_bug_02.png (17.78 KiB) Viewed 1594 times
I have no idea how to troubleshoot this effectively as I cannot reliably reproduce this problem. Should I run FreeCAD through gdb from now on and wait for such issues to manifest again?

Using the Daily Builds PPA, details below. I also have MSAA 8x enabled.
OS: Ubuntu 14.04.1 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.15.4356 (Git)
Branch: master
Hash: 7aa91ecee36a293d0b075346039b0584188acc14
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.7.1
wmayer
Founder
Posts: 20245
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Test request: quarter based viewer

Post by wmayer »

Lately I've been having display problems and I suspect the quarter-based viewer. It happens when I open multiple files. At some point one of the files won't display in Flat lines mode anymore, and sketches will disappear.
So, then it's not only me. I have seen this already a few times but thought that it might be the graphic driver because it's another computer I am currently working with.
I have no idea how to troubleshoot this effectively as I cannot reliably reproduce this problem. Should I run FreeCAD through gdb from now on and wait for such issues to manifest again?
The debugger doesn't help. The problem is not that it crashes but it shows a strange behaviour. So, my guess is that it might be related to the marriage of Quarter and Qt's QGraphicsView and its resulting changes. I assume that somewhere in the code we have to set or reset an OpenGL state. This e.g. was also the problem we once had when opening an image and the 3d view and the image disappeared completely.
ickby
Veteran
Posts: 3116
Joined: Wed Oct 05, 2011 7:36 am

Re: Test request: quarter based viewer

Post by ickby »

Strange, I did never encounter that behaviour. But in my current development branch I integrated the coin rendering way better into qt's render process, hopefully that will help solving that issue.
wmayer
Founder
Posts: 20245
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Test request: quarter based viewer

Post by wmayer »

There is a workaround that always "fixed" the problem for me.
When the issue appears go to View > Create new view. This creates a further view of this document and everything goes back to normal. You then can safely close the first view.
wmayer
Founder
Posts: 20245
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Test request: quarter based viewer

Post by wmayer »

OK, here is a way to reproduce the problem reliably:
* create a document and add a box to it
* switch to Drawing workbench, add a drawing and insert the box into it
* while the SVG view is active you can close the 3d view
* go to View > Create new view and from now on the rendering is broken

In this case even the above workaround doesn't work any more. And if you create a further 3d view and switch between the tabs then FreeCAD may even crash (somewhere deep inside the graphic driver).
ickby
Veteran
Posts: 3116
Joined: Wed Oct 05, 2011 7:36 am

Re: Test request: quarter based viewer

Post by ickby »

I can reproduce it both with current master and my development branch. somehow the default lines are not displayed, only preselected and selected ones...
wmayer
Founder
Posts: 20245
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Test request: quarter based viewer

Post by wmayer »

One further observation:

I repeated this procedure on Ubuntu 12.04 (on virtual box) and I have a very similar effect. But the difference is that on Linux the edges disappear completely while on Windows there are edges but totally displaced and of wrong lengths.
But in both cases when I hover the area where the edges should be they appear normally.

However, when I create a new box then it is rendered normally. So, my conclusion is that it's not the viewer that is broken but the Inventor model. The shape node which handles the rendering of edges is the self-written node SoBrepEdgeSet and maybe there is a bug which didn't occur with the old but now does with the new viewer.
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Test request: quarter based viewer

Post by jmaustpc »

hi Guys
I see from your posts while I was testing that Werner has found much the same on 12.04 as I did on Kubuntu 14.04.
wmayer wrote:OK, here is a way to reproduce the problem reliably:
* create a document and add a box to it
* switch to Drawing workbench, add a drawing and insert the box into it
* while the SVG view is active you can close the 3d view
* go to View > Create new view and from now on the rendering is broken

In this case even the above workaround doesn't work any more. And if you create a further 3d view and switch between the tabs then FreeCAD may even crash (somewhere deep inside the graphic driver).
When I try the above, the cube in effect goes into shaded mode, i.e. the edges disappear. If I go to wireframe mode the cube disappears.

However if you create a new Part primitive, e.g. a Part Cylinder or another Part Cube, ....the new primitive does display correctly...although the first cube remains incorrectly displayed.

OS: Ubuntu 14.04.1 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.15.4368 (Git)
Branch: master
Hash: 845849fa91c47e849b567f499c3e99f4be845373
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.7.1.oce-0.17-dev
User avatar
tanderson69
Veteran
Posts: 1626
Joined: Thu Feb 18, 2010 1:07 am

Re: Test request: quarter based viewer

Post by tanderson69 »

Here I don't need to create the drawing. I can just:

1) file/new
2) cube
3) view/create new view

at this point, the new view shows up with invisible edges. With a crash in the graphics driver to follow shortly.
Post Reply