Archived issue #0025133
TKOpenGl - Crash on closing a view containing presentations with capping
Description
The problem is reproduced with the current OCCT Git master and vc10 64-bit binaries (both debug and release).
When a 3D view containing a presentation with capping is closed, an application crashes.
Quick analysis with MS VisualStudio debugger showed that there is an endless recursion:
...
...
When a 3D view containing a presentation with capping is closed, an application crashes.
Quick analysis with MS VisualStudio debugger showed that there is an endless recursion:
...
TKernel.dll!Handle_Standard_Transient::EndScope() Line 54 C++
TKOpenGl.dll!OpenGl_CappingPlaneResource::Release(const OpenGl_Context * theContext) Line 62 C++
TKOpenGl.dll!OpenGl_Context::ReleaseDelayed() Line 1918 C++
TKOpenGl.dll!OpenGl_Context::~OpenGl_Context() Line 139 C++
TKOpenGl.dll!OpenGl_Context::`vector deleting destructor'() + 0x7d bytes C++
TKernel.dll!Standard_Transient::Delete() Line 72 + 0x30 bytes C++
TKernel.dll!Handle_Standard_Transient::EndScope() Line 54 C++
TKOpenGl.dll!OpenGl_CappingPlaneResource::Release(const OpenGl_Context * theContext) Line 62 C++
TKOpenGl.dll!OpenGl_Context::ReleaseDelayed() Line 1918 C++
TKOpenGl.dll!OpenGl_Context::~OpenGl_Context() Line 139 C++
...
Steps to reproduce
Scenario 1:
Scenario 2:
pload ALL test bugs vis bug24901 vclose View1
Scenario 2:
pload ALL box b 1 1 1 vdisplay b vclipplane create pln1 vclipplane set pln1 object b vclipplane change pln1 capping on vclose
Public activity
15 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 Aug 22 19:53:00 2014 +0400
0025133: TKOpenGl - Crash on closing a view containing presentations with capping
OpenGl_Element destruction and resource deallocation methods now accept
a pointer to OpenGl_Context instead of a handle to avoid double deletion
of the context.
[revision removed]
Detailed log of new commits:
Author: Author
Date: Fri Aug 22 19:53:00 2014 +0400
0025133: TKOpenGl - Crash on closing a view containing presentations with capping
OpenGl_Element destruction and resource deallocation methods now accept
a pointer to OpenGl_Context instead of a handle to avoid double deletion
of the context.
Branch CR25133 is ready for reviewing.
Branch [archived branch] has been updated forcibly by Author.
[revision removed]
[revision removed]
Please test the patch.
Dear Commenter 1,
Branch CR25133 was compiled on Linux and Windows platforms.
There are following compilation errors (on Linux):
http://jenkins-test-02.nnov.opencascade.com/user/mnt/my-views/view/CR25133/job/mnt-CR25133-master_build_occt_linux/1/parsed_console/
../../../../src/OpenGl/OpenGl_CappingPlaneResource.cxx:59: error: prototype for ‘void OpenGl_CappingPlaneResource::Release(OpenGl_Context*)’ does not match any in class ‘OpenGl_CappingPlaneResource’
../../../../inc/OpenGl_CappingPlaneResource.hxx:53: error: candidate is: virtual void OpenGl_CappingPlaneResource::Release(const OpenGl_Context*)
There are following compilation errors (on Windows):
http://jenkins-test-02.nnov.opencascade.com/user/mnt/my-views/view/CR25133/job/mnt-CR25133-master_build_occt_windows/1/parsed_console/
..\..\..\src\OpenGl\OpenGl_CappingPlaneResource.cxx(60): error C2511: 'void OpenGl_CappingPlaneResource::Release(OpenGl_Context *)' : overloaded member function not found in 'OpenGl_CappingPlaneResource'
..\..\..\src\OpenGl\OpenGl_Font.cxx(58): error C2511: 'void OpenGl_Font::Release(OpenGl_Context *)' : overloaded member function not found in 'OpenGl_Font'
..\..\..\src\OpenGl\OpenGl_FrameBuffer.cxx(112): error C2511: 'void OpenGl_FrameBuffer::Release(OpenGl_Context *)' : overloaded member function not found in 'OpenGl_FrameBuffer'
..\..\..\src\OpenGl\OpenGl_LineAttributes.cxx(521): error C2511: 'void OpenGl_LineAttributes::Release(OpenGl_Context *)' : overloaded member function not found in 'OpenGl_LineAttributes'
..\..\..\src\OpenGl\OpenGl_PointSprite.cxx(53): error C2511: 'void OpenGl_PointSprite::Release(OpenGl_Context *)' : overloaded member function not found in 'OpenGl_PointSprite'
..\..\..\src\OpenGl\OpenGl_ShaderObject.cxx(129): error C2511: 'void OpenGl_ShaderObject::Release(OpenGl_Context *)' : overloaded member function not found in 'OpenGl_ShaderObject'
..\..\..\src\OpenGl\OpenGl_ShaderProgram.cxx(1249): error C2511: 'void OpenGl_ShaderProgram::Release(OpenGl_Context *)' : overloaded member function not found in 'OpenGl_ShaderProgram'
..\..\..\src\OpenGl\OpenGl_Texture.cxx(119): error C2511: 'void OpenGl_Texture::Release(OpenGl_Context *)' : overloaded member function not found in 'OpenGl_Texture'
..\..\..\src\OpenGl\OpenGl_TextureBufferArb.cxx(58): error C2511: 'void OpenGl_TextureBufferArb::Release(OpenGl_Context *)' : overloaded member function not found in 'OpenGl_TextureBufferArb'
..\..\..\src\OpenGl\OpenGl_VertexBuffer.cxx(73): error C2511: 'void OpenGl_VertexBuffer::Release(OpenGl_Context *)' : overloaded member function not found in 'OpenGl_VertexBuffer'
Branch CR25133 was compiled on Linux and Windows platforms.
There are following compilation errors (on Linux):
http://jenkins-test-02.nnov.opencascade.com/user/mnt/my-views/view/CR25133/job/mnt-CR25133-master_build_occt_linux/1/parsed_console/
../../../../src/OpenGl/OpenGl_CappingPlaneResource.cxx:59: error: prototype for ‘void OpenGl_CappingPlaneResource::Release(OpenGl_Context*)’ does not match any in class ‘OpenGl_CappingPlaneResource’
../../../../inc/OpenGl_CappingPlaneResource.hxx:53: error: candidate is: virtual void OpenGl_CappingPlaneResource::Release(const OpenGl_Context*)
There are following compilation errors (on Windows):
http://jenkins-test-02.nnov.opencascade.com/user/mnt/my-views/view/CR25133/job/mnt-CR25133-master_build_occt_windows/1/parsed_console/
..\..\..\src\OpenGl\OpenGl_CappingPlaneResource.cxx(60): error C2511: 'void OpenGl_CappingPlaneResource::Release(OpenGl_Context *)' : overloaded member function not found in 'OpenGl_CappingPlaneResource'
..\..\..\src\OpenGl\OpenGl_Font.cxx(58): error C2511: 'void OpenGl_Font::Release(OpenGl_Context *)' : overloaded member function not found in 'OpenGl_Font'
..\..\..\src\OpenGl\OpenGl_FrameBuffer.cxx(112): error C2511: 'void OpenGl_FrameBuffer::Release(OpenGl_Context *)' : overloaded member function not found in 'OpenGl_FrameBuffer'
..\..\..\src\OpenGl\OpenGl_LineAttributes.cxx(521): error C2511: 'void OpenGl_LineAttributes::Release(OpenGl_Context *)' : overloaded member function not found in 'OpenGl_LineAttributes'
..\..\..\src\OpenGl\OpenGl_PointSprite.cxx(53): error C2511: 'void OpenGl_PointSprite::Release(OpenGl_Context *)' : overloaded member function not found in 'OpenGl_PointSprite'
..\..\..\src\OpenGl\OpenGl_ShaderObject.cxx(129): error C2511: 'void OpenGl_ShaderObject::Release(OpenGl_Context *)' : overloaded member function not found in 'OpenGl_ShaderObject'
..\..\..\src\OpenGl\OpenGl_ShaderProgram.cxx(1249): error C2511: 'void OpenGl_ShaderProgram::Release(OpenGl_Context *)' : overloaded member function not found in 'OpenGl_ShaderProgram'
..\..\..\src\OpenGl\OpenGl_Texture.cxx(119): error C2511: 'void OpenGl_Texture::Release(OpenGl_Context *)' : overloaded member function not found in 'OpenGl_Texture'
..\..\..\src\OpenGl\OpenGl_TextureBufferArb.cxx(58): error C2511: 'void OpenGl_TextureBufferArb::Release(OpenGl_Context *)' : overloaded member function not found in 'OpenGl_TextureBufferArb'
..\..\..\src\OpenGl\OpenGl_VertexBuffer.cxx(73): error C2511: 'void OpenGl_VertexBuffer::Release(OpenGl_Context *)' : overloaded member function not found in 'OpenGl_VertexBuffer'
Branch [archived branch] has been updated forcibly by Author.
[revision removed]
[revision removed]
Old OpenGl headers replaced with the correct modified ones.
Branch CR25133 ready for testing.
Branch [archived branch] has been updated by Participant.
[revision removed]
Detailed log of new commits:
Author: mkv
Date: Tue Aug 26 18:18:09 2014 +0400
Test cases for issue CR25133
[revision removed]
Detailed log of new commits:
Author: mkv
Date: Tue Aug 26 18:18:09 2014 +0400
Test cases for issue CR25133
Dear Commenter 1,
Branch CR25133 from occt git-repository (and master from products git-repository) was compiled on Linux and Windows platforms and tested.
[revision removed]
Number of compiler warnings:
occt component :
Linux: 15 (15 on master)
Windows: 0 (0 on master)
products component :
Linux: 11 (11 on master)
Windows: 1 (1 on master)
Regressions/Differences:
No regressions/differences
Testing cases:
http://occt-tests/CR25133-master-occt/Debian60-64/bugs/vis/bug25133_1.html
http://occt-tests/CR25133-master-occt/Windows-32-VC10/bugs/vis/bug25133_1.html
bugs vis(004) bug25133_1: OK
http://occt-tests/CR25133-master-occt/Debian60-64/bugs/vis/bug25133_2.html
http://occt-tests/CR25133-master-occt/Windows-32-VC10/bugs/vis/bug25133_2.html
bugs vis(004) bug25133_2: OK
Testing on Linux:
occt component :
Total MEMORY difference: 353233644 / 353263524
Total CPU difference: 46752.170000000166 / 44482.54000000008
products component :
Total MEMORY difference: 110220336 / 110151972
Total CPU difference: 18126.739999999965 / 17587.009999999977
Testing on Windows:
occt component :
Total MEMORY difference: 240908636 / 241085560
Total CPU difference: 46232.640625 / 40204.328125
products component :
Total MEMORY difference: 66556616 / 66446108
Total CPU difference: 15525.84375 / 15948.671875
There are no differences in images found by testdiff.
Branch CR25133 from occt git-repository (and master from products git-repository) was compiled on Linux and Windows platforms and tested.
[revision removed]
Number of compiler warnings:
occt component :
Linux: 15 (15 on master)
Windows: 0 (0 on master)
products component :
Linux: 11 (11 on master)
Windows: 1 (1 on master)
Regressions/Differences:
No regressions/differences
Testing cases:
http://occt-tests/CR25133-master-occt/Debian60-64/bugs/vis/bug25133_1.html
http://occt-tests/CR25133-master-occt/Windows-32-VC10/bugs/vis/bug25133_1.html
bugs vis(004) bug25133_1: OK
http://occt-tests/CR25133-master-occt/Debian60-64/bugs/vis/bug25133_2.html
http://occt-tests/CR25133-master-occt/Windows-32-VC10/bugs/vis/bug25133_2.html
bugs vis(004) bug25133_2: OK
Testing on Linux:
occt component :
Total MEMORY difference: 353233644 / 353263524
Total CPU difference: 46752.170000000166 / 44482.54000000008
products component :
Total MEMORY difference: 110220336 / 110151972
Total CPU difference: 18126.739999999965 / 17587.009999999977
Testing on Windows:
occt component :
Total MEMORY difference: 240908636 / 241085560
Total CPU difference: 46232.640625 / 40204.328125
products component :
Total MEMORY difference: 66556616 / 66446108
Total CPU difference: 15525.84375 / 15948.671875
There are no differences in images found by testdiff.
Dear san,
It was detected that Voxel QT sample is not compiled
http://jenkins-test-03.nnov.opencascade.com:8080/user/mnt/my-views/view/CR25133/job/mnt-CR25133-master_build_occt_qt_samples_window/1/parsed_console/
1>src\VoxelClient_VisDrawer.cxx(121): error C2259: 'VoxelClient_VisDrawer::VisElement' : cannot instantiate abstract class
Please correct imediatly
It was detected that Voxel QT sample is not compiled
http://jenkins-test-03.nnov.opencascade.com:8080/user/mnt/my-views/view/CR25133/job/mnt-CR25133-master_build_occt_qt_samples_window/1/parsed_console/
1>src\VoxelClient_VisDrawer.cxx(121): error C2259: 'VoxelClient_VisDrawer::VisElement' : cannot instantiate abstract class
Please correct imediatly
Branch [archived branch] has been updated forcibly by Author.
[revision removed]
[revision removed]
Voxel QT sample corrected in branch CR25133, ready for testing.
Dear Commenter 1,
Voxel QT sample is compiled without errors.
Voxel QT sample is compiled without errors.
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]