Archived issue #0025689
IGESCAFControl_Writer crash in constructor.
Description
TKIGES.dll!IGESData_GlobalSection::IGESData_GlobalSection(const IGESData_GlobalSection & __that) C++
> TKIGES.dll!IGESData_BasicEditor::SetUnitName(const char * const name) Line 99 C++
TKIGES.dll!IGESControl_Writer::IGESControl_Writer() Line 57 C++
TKXDEIGES.dll!IGESCAFControl_Writer::IGESCAFControl_Writer() Line 112 C++
> TKIGES.dll!IGESData_BasicEditor::SetUnitName(const char * const name) Line 99 C++
TKIGES.dll!IGESControl_Writer::IGESControl_Writer() Line 57 C++
TKXDEIGES.dll!IGESCAFControl_Writer::IGESCAFControl_Writer() Line 112 C++
Steps to reproduce
Standard_Boolean IGESData_BasicEditor::SetUnitName (const Standard_CString name)
{
Standard_Integer flag = IGESData_BasicEditor::UnitNameFlag (name);
IGESData_GlobalSection GS = themodel->GlobalSection(); //[BUG]themodel is NULL.
...
}
//---------------------------------------
It is impossible to create test script as far as the crash can be provided only in clear application. There is attached the .bat script which compiles, build and run the small application.
If the application was run without exceptions - the crash is fixed.
(To use the .bat file, you should have MS Windows and Visual Studio 10.
Please, correct the products path and OCCT path in the script.)
{
Standard_Integer flag = IGESData_BasicEditor::UnitNameFlag (name);
IGESData_GlobalSection GS = themodel->GlobalSection(); //[BUG]themodel is NULL.
...
}
//---------------------------------------
It is impossible to create test script as far as the crash can be provided only in clear application. There is attached the .bat script which compiles, build and run the small application.
If the application was run without exceptions - the crash is fixed.
(To use the .bat file, you should have MS Windows and Visual Studio 10.
Please, correct the products path and OCCT path in the script.)
Public activity
8 archived notes
Participants are labeled by their role within this record.
Could you please provide us example to reproduce crash or you can analyze cause of the crash and will give us fix for such cases.
If i call "IGESControl_Controller::Init()" before IGESCAFControl_Writer, the crash won't occur. This might be helpful for bug fix.
My code is simple, i just construct a IGESCAFControl_Writer object and it crash.
My code is simple, i just construct a IGESCAFControl_Writer object and it crash.
Branch [archived branch] has been created by Participant.
[revision removed]
Detailed log of new commits:
Author: akz
Date: Mon Jan 26 19:12:41 2015 +0300
0025689: IGESCAFControl_Writer crash in constructor.
Cause of bug is that the IGESData_BasicEditor is created before an initialization of IGESControl_Controller::Init(). IGESData_BasicEditor cannot find template "iges", so the model is still empty after creation.
1) Added a default constructor to the IGESData_BasicEditor. Can be initialized via Init() method.
2) Added some null checks in the places, where are provided access to the model (IGESData_BasicEditor's member).
3) Initialization of the IGESData_BasicEditor was placed after initialization if the IGESControl_Controller.
[revision removed]
Detailed log of new commits:
Author: akz
Date: Mon Jan 26 19:12:41 2015 +0300
0025689: IGESCAFControl_Writer crash in constructor.
Cause of bug is that the IGESData_BasicEditor is created before an initialization of IGESControl_Controller::Init(). IGESData_BasicEditor cannot find template "iges", so the model is still empty after creation.
1) Added a default constructor to the IGESData_BasicEditor. Can be initialized via Init() method.
2) Added some null checks in the places, where are provided access to the model (IGESData_BasicEditor's member).
3) Initialization of the IGESData_BasicEditor was placed after initialization if the IGESControl_Controller.
The branch CR25689 is ready to be reviewed.
Branch CR25689 is ready to be tested
Branch [archived branch] has been updated forcibly by Commenter 3.
[revision removed]
[revision removed]
Dear Commenter 1,
Branch CR25689 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested in Release mode.
[revision removed]
Number of compiler warnings:
occt component :
Linux: 18 (18 on master)
Windows: 0 (0 on master)
products component :
Linux: 11 (11 on master)
Windows: 1 (1 on master)
Regressions/Differences:
No regressions
Testing cases:
Attachment 1 (BAT) was run without exceptions - the crash is fixed.
Testing on Linux:
Total MEMORY difference: 369299968 / 370114884
Total CPU difference: 53641.909999999894 / 51750.710000000094
Testing on Windows:
Total MEMORY difference: 276006756 / 275761696
Total CPU difference: 37432.03125 / 38148.203125
There are not differences in images found by testdiff.
Branch CR25689 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested in Release mode.
[revision removed]
Number of compiler warnings:
occt component :
Linux: 18 (18 on master)
Windows: 0 (0 on master)
products component :
Linux: 11 (11 on master)
Windows: 1 (1 on master)
Regressions/Differences:
No regressions
Testing cases:
Attachment 1 (BAT) was run without exceptions - the crash is fixed.
Testing on Linux:
Total MEMORY difference: 369299968 / 370114884
Total CPU difference: 53641.909999999894 / 51750.710000000094
Testing on Windows:
Total MEMORY difference: 276006756 / 275761696
Total CPU difference: 37432.03125 / 38148.203125
There are not differences in images found by testdiff.
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Related records