View Issue Details

IDProjectCategoryView StatusLast Update
0023756CommunityOCCT:Visualizationpublic2013-04-29 15:22
ReporterPawel Assigned Tosan 
PrioritynormalSeveritycrash 
Status closedResolutionfixed 
PlatformWindowsOSVC++ 2008 
Product Version6.5.4 
Target Version6.6.0Fixed in Version6.6.0 
Summary0023756: VBO rendering problem (1)
DescriptionAfter the compilation of OCCT with the modification from - 0023457 Slow text rendering - my application started crashing in the NVIDIA graphics driver (nvogInt.dll).

The first situation I was able to identify is when showing/hiding "Triedron" and then calling 'Update' immediately - see below.

The code can be tracked to OpenGl_PrimitiveArray.cxx, line 302:

glDrawArrays (myDrawMode, 0, myVbos[VBOVertices]->GetElemsNb());
Steps To ReproduceUnfortunately, I wasn't able to reproduce the problem using DRAW. The command 'vzbufftrihedron' works without a problem because no 'Update' is called. Hence I can only give a C++ reproducer:

V3d_View::TriedronDisplay
V3d_View::Update

or

V3d_View::TriedronErase
V3d_View::Update

Both of the above lines produce an exception in the graphics driver.
TagsNo tags attached.
Test case numberNot needed

Relationships

related to 0023457 closedkgv Slow text rendering 

Activities

san

2013-02-13 17:36

developer   ~0023323

Dear Pawel,

We failed to reproduce this bug on two workstations with NVIDIA graphic cards:

- Windows XP SP3 32-bit on Intel Core2Duo, NVIDIA Quadro FX570 graphic card, drivers version 195.62
- Windows 7 64-bit on Intel Core i7, NVIDIA GeForce GT 240M graphic card, drivers version 260.99

Could you please provide us with your system information, graphic card version and NVIDIA drivers version?
Have you tried different NVIDIA drivers release?

Pawel

2013-02-13 18:07

developer   ~0023324

Hello guys,

thanks for investigating.

The test machine was:
- Windows XP SP3 32-bit on Intel Core2Duo, NVIDIA Quadro FX1700, driver version 306.94

I can also test on an Win7 64-bit. I'll post the results soon.

san

2013-02-13 18:24

developer   ~0023325

And just for the sake of clarity, could you please try, at least temporarily, different release of NVIDIA drivers, maybe even an older one (sometimes "newer" does not mean "more stable")?

Pawel

2013-02-13 19:24

developer   ~0023327

Hello Sergey,

I have tested two more NVIDIA drivers for the Win XP configuration listed above:
311.15 and
275.89
Both of them give the same behaviour: crash.

I have also tried on
Windows 7 64-bit on Intel Core i7, NVIDIA Quadro 1000M, driver version 310.90
with the same result.

How did you test exactly?

I will try to reproduce the problem using OCCT samples.

Hope this helps.

Pawel

2013-02-13 20:10

developer   ~0023329

Another observation:

I have modified the VTestZBuffTrihedron method from the TKViewerTest project and called

V3dView->Update()

immediately after displaying the trihedron.

After calling 'vzbufftrihedron' in DRAW the problem is NOT reproduced.

I will try the samples now...

san

2013-02-14 10:07

developer   ~0023332

This was exactly our test case:

=============================================================
I have modified the VTestZBuffTrihedron method from the TKViewerTest project and called

V3dView->Update()

immediately after displaying the trihedron.
After calling 'vzbufftrihedron' in DRAW the problem is NOT reproduced.
=============================================================

And in order to proceed with analysis, we need a reproducer in a form of a DRAW command.

Pawel

2013-02-14 19:50

developer   ~0023345

Hello Sergey,

it took me some time but I was finally able to reproduce the problem using OCCT samples.

I have pushed the branch CR23756 that allows to spot the problem on my machine (Win XP SP3, 32-bit).

============
Reproducer 1
is the Viewer3d sample. I did not have to change the code to make it crash. I just had to remove the 'TKV2d' functionalities/references in order to compile it.

Please proceed as follows:
- Start the 'Viewer3d' sample
- Go to menu Options->Trihedron->Dynamic Trihedron [AIS_Trihedron is shown]
- Go to menu Options->Trihedron->Static Trihedron ... ['Z-Buffer' trihedron is shown]
- Now change the color e.g. White->Black -> this is where the crash occurs (OpenGl_PrimitiveArray.cxx, line 302)

============
Reproducer 2
is the IE.sln from the CSharp sample.
I have changed the code in OCCViewer::InitViewer in order to provoke the crash. Compile the project, start it and try to open a new document (crash in OpenGl_PrimitiveArray.cxx, line 302).

Apparently, displaying two types of trihedrons twice in a row makes something go wrong (this is actually a real-world scenario I have: the application initializes the viewer with some default settings and then reads user options and applies them to the viewer).
============

I hope this helps to find the root cause of the crash.

Please let me know if you have any problems reproducing the crashes.

san

2013-02-15 11:53

developer   ~0023353

Dear Pavel,

Thank you a lot for your efforts!
We will try to reproduce the bug following your scenarios in the near days.

kgv

2013-02-20 14:01

developer   ~0023412

Patch is ready for review in CR23756_1 branch.

san

2013-02-20 14:59

developer   ~0023413

Branch CR23756_1 reviewed without remarks, ready for testing.

Pawel

2013-02-20 17:41

developer   ~0023418

The patch seems to solve the problem. No crashes occur where they used to before.
Thanks!

mkv

2013-02-21 12:16

tester   ~0023428

Dear BugMaster,

Branch CR23756_1 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
SHA-1: 91c1ca0dace0f18bbff46a2eee51d047bebe4de4

Number of compiler warnings:

occt component :
Linux: 3 (3 on master)
Windows: 39 (39 on master)

products component :
Linux: 9 (9 on master)
Windows: 50 (50 on master)

Regressions:
No regressions

Improvements:
No improvements

Testing cases:
Not needed

Testing on Linux:
Total MEMORY difference: 234420556 / 234629096
Total CPU difference: 10769.480000000121 / 10396.86000000029

Testing on Windows:
Total MEMORY difference: 339108148 / 337286356
Total CPU difference: 15753.34375 / 15545.90625

There are not serious differences in images found by testdiff.

Related Changesets

occt: master 27583309

2013-02-20 09:58:56

kgv


Committer: san Details Diff
0023756: VBO rendering problem (1)

Fixed asymmetric VBO unbind call in OpenGl_Text::drawText().
Affected Issues
0023756
mod - src/OpenGl/OpenGl_Text.cxx Diff File

Issue History

Date Modified Username Field Change
2013-02-12 20:27 Pawel New Issue
2013-02-12 20:27 Pawel Assigned To => bugmaster
2013-02-12 20:28 Pawel Relationship added related to 0023457
2013-02-12 20:36 abv Assigned To bugmaster => kgv
2013-02-12 20:36 abv Status new => assigned
2013-02-13 17:36 san Note Added: 0023323
2013-02-13 17:36 san Assigned To kgv => Pawel
2013-02-13 17:36 san Status assigned => feedback
2013-02-13 18:07 Pawel Note Added: 0023324
2013-02-13 18:07 Pawel Status feedback => assigned
2013-02-13 18:24 san Note Added: 0023325
2013-02-13 19:24 Pawel Note Added: 0023327
2013-02-13 20:10 Pawel Note Added: 0023329
2013-02-14 10:07 san Note Added: 0023332
2013-02-14 19:50 Pawel Note Added: 0023345
2013-02-14 19:50 Pawel Assigned To Pawel => san
2013-02-14 19:50 Pawel Status assigned => feedback
2013-02-15 11:53 san Note Added: 0023353
2013-02-15 11:53 san Assigned To san => kgv
2013-02-15 11:53 san Status feedback => assigned
2013-02-20 14:01 kgv Note Added: 0023412
2013-02-20 14:01 kgv Assigned To kgv => san
2013-02-20 14:01 kgv Status assigned => resolved
2013-02-20 14:01 kgv Target Version => 6.6.0
2013-02-20 14:59 san Note Added: 0023413
2013-02-20 14:59 san Assigned To san => bugmaster
2013-02-20 14:59 san Status resolved => reviewed
2013-02-20 17:02 mkv Assigned To bugmaster => mkv
2013-02-20 17:41 Pawel Note Added: 0023418
2013-02-21 12:16 mkv Note Added: 0023428
2013-02-21 12:18 mkv Test case number => Not needed
2013-02-21 12:18 mkv Assigned To mkv => bugmaster
2013-02-21 12:18 mkv Status reviewed => tested
2013-02-26 10:00 san Changeset attached => occt master 27583309
2013-02-26 10:00 san Assigned To bugmaster => san
2013-02-26 10:00 san Status tested => verified
2013-02-26 10:00 san Resolution open => fixed
2013-04-23 13:35 aiv Status verified => closed
2013-04-29 15:22 aiv Fixed in Version => 6.6.0