MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0025689Community[OCCT] OCCT:Data Exchangepublic2015-01-07 06:332015-05-14 15:32
ReporterVico Liang 
Assigned Tobugmaster 
PrioritynormalSeveritycrash 
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version[OCCT] 6.8.0 
Target Version[OCCT] 6.9.0Fixed in Version[OCCT] 6.9.0 
Summary0025689: 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++
Steps To ReproduceStandard_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.)
TagsNo tags attached.
Test case numberNot needed
Attached Files? file icon Test.bat (1,356 bytes) 2015-01-26 19:22

- Relationships
related to 0023679newgka Open CASCADE IGESControl_Writer does not initialize properly unless IGESControl_Controller::Init() is called in advance 

-  Notes
(0035948)
gka (developer)
2015-01-12 12:09

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.
(0035981)
Vico Liang (developer)
2015-01-13 05:52

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.
(0036675)
git (administrator)
2015-01-26 19:13

Branch CR25689 has been created by akz.

SHA-1: 046c034ffe51e236cc96a4d532233b7d6c968cac


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.
(0036679)
akz (developer)
2015-01-26 19:20

The branch CR25689 is ready to be reviewed.
(0036689)
gka (developer)
2015-01-27 11:06
edited on: 2015-01-27 11:06

Branch CR25689 is ready to be tested

(0036855)
git (administrator)
2015-01-29 18:16

Branch CR25689 has been updated forcibly by apn.

SHA-1: 393b7efc7a57e33f0d8a7319adf7cb7828b72264
(0037034)
apn (administrator)
2015-02-03 18:15

Dear BugMaster,
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.
SHA-1: 393b7efc7a57e33f0d8a7319adf7cb7828b72264

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:
Test.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.
(0038541)
git (administrator)
2015-03-18 13:35

Branch CR25689 has been deleted by inv.

SHA-1: 393b7efc7a57e33f0d8a7319adf7cb7828b72264

- Related Changesets
occt: master 843e15cd
Timestamp: 2015-01-26 16:12:41
Author: akz
Committer: bugmaster
Details ] Diff ]
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.
mod - src/IGESControl/IGESControl_Writer.cxx Diff ] File ]
mod - src/IGESData/IGESData_BasicEditor.cdl Diff ] File ]
mod - src/IGESData/IGESData_BasicEditor.cxx Diff ] File ]

- Issue History
Date Modified Username Field Change
2015-01-07 06:33 Vico Liang New Issue
2015-01-07 06:33 Vico Liang Assigned To => gka
2015-01-12 12:09 gka Note Added: 0035948
2015-01-12 12:09 gka Assigned To gka => Vico Liang
2015-01-12 12:10 gka Status new => feedback
2015-01-13 05:52 Vico Liang Note Added: 0035981
2015-01-13 05:53 Vico Liang Assigned To Vico Liang => gka
2015-01-13 05:53 Vico Liang Status feedback => assigned
2015-01-22 10:59 gka Assigned To gka => Vico Liang
2015-01-22 10:59 gka Assigned To Vico Liang => akz
2015-01-26 19:13 git Note Added: 0036675
2015-01-26 19:13 akz File Added: Test.bat
2015-01-26 19:20 akz Note Added: 0036679
2015-01-26 19:20 akz Assigned To akz => gka
2015-01-26 19:20 akz Status assigned => resolved
2015-01-26 19:20 akz Steps to Reproduce Updated View Revisions
2015-01-26 19:22 akz File Deleted: Test.bat
2015-01-26 19:22 akz File Added: Test.bat
2015-01-27 11:06 gka Note Added: 0036689
2015-01-27 11:06 gka Assigned To gka => bugmaster
2015-01-27 11:06 gka Status resolved => reviewed
2015-01-27 11:06 gka Note Edited: 0036689 View Revisions
2015-01-27 11:38 gka Relationship added related to 0023679
2015-01-29 18:02 apn Assigned To bugmaster => apn
2015-01-29 18:16 git Note Added: 0036855
2015-02-03 18:15 apn Note Added: 0037034
2015-02-03 18:15 apn Test case number => Not needed
2015-02-03 18:15 apn Assigned To apn => bugmaster
2015-02-03 18:15 apn Status reviewed => tested
2015-02-06 15:38 bugmaster Changeset attached => occt master 843e15cd
2015-02-06 15:38 bugmaster Status tested => verified
2015-02-06 15:38 bugmaster Resolution open => fixed
2015-03-18 13:35 git Note Added: 0038541
2015-05-14 15:29 user533 Status verified => closed
2015-05-14 15:32 user533 Fixed in Version => 6.9.0


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker