Archived issue #0031877
DRAW - some Visualization commands are not protected against uninitialized viewer
Description
The issue comes from analysis of issue #0031817 - some DRAW commands in ViewerTest use global AIS_InteractiveContext object returned by global function TheAISContext() without checking it for being non-null. Thus all they will generate exception instead of reasonable message in the case if viewer is not initialized (vinit is not called).
Steps to reproduce
pload VISUALIZATION
vsetdispmode 1
vpickshapes
vsize
vplanetri a
vsetdispmode 1
vpickshapes
vsize
vplanetri a
Public activity
4 archived notes
Participants are labeled by their role within this record.
Branch [archived branch] has been created by Author.
[revision removed]
Detailed log of new commits:
Author: Author
Date: Fri Oct 2 06:54:01 2020 +0300
0031877: DRAW - some Visualization commands are not protected against uninitialized viewer
Added protections in DRAW commands against accessing Null context
Added test bugs demo bug31877
[revision removed]
Detailed log of new commits:
Author: Author
Date: Fri Oct 2 06:54:01 2020 +0300
0031877: DRAW - some Visualization commands are not protected against uninitialized viewer
Added protections in DRAW commands against accessing Null context
Added test bugs demo bug31877
Fix pushed to CR31877 and tested, see Jenkins job CR31877-abv (note that failure of sample-java build is due to some other reason - it fails in all recent builds).
Please review.
Please review.
Combination -
OCCT branch : [archived branch]
master SHA - [revision removed]
[revision removed]
Products branch : [archived branch] SHA - [revision removed]
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.
Number of compiler warnings:
No new/fixed warnings
Regressions/Differences/Improvements:
No regressions/differences
CPU differences:
Debian80-64:
OCCT
Total CPU difference: 17992.300000000254 / 17994.53000000008 [-0.01%]
Products
Total CPU difference: 12161.930000000115 / 12171.670000000115 [-0.08%]
Windows-64-VC14:
OCCT
Total CPU difference: 19710.375 / 19728.265625 [-0.09%]
Products
Total CPU difference: 13569.53125 / 13538.390625 [+0.23%]
Image differences :
No differences that require special attention
Memory differences :
No differences that require special attention
OCCT branch : [archived branch]
master SHA - [revision removed]
[revision removed]
Products branch : [archived branch] SHA - [revision removed]
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.
Number of compiler warnings:
No new/fixed warnings
Regressions/Differences/Improvements:
No regressions/differences
CPU differences:
Debian80-64:
OCCT
Total CPU difference: 17992.300000000254 / 17994.53000000008 [-0.01%]
Products
Total CPU difference: 12161.930000000115 / 12171.670000000115 [-0.08%]
Windows-64-VC14:
OCCT
Total CPU difference: 19710.375 / 19728.265625 [-0.09%]
Products
Total CPU difference: 13569.53125 / 13538.390625 [+0.23%]
Image differences :
No differences that require special attention
Memory differences :
No differences that require special attention
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Related records