View Issue Details

IDProjectCategoryView StatusLast Update
0031685CommunityOCCT:Data Exchangepublic2020-12-02 17:13
Reporterrobertlipman Assigned Tobugmaster  
PrioritynormalSeveritycrash 
Status closedResolutionfixed 
Product Version7.0.0 
Target Version7.5.0Fixed in Version7.5.0 
Summary0031685: Data Exchange, STEPCAFControl_Reader - NULL dereference on translating PLACED_DATUM_TARGET_FEATURE
DescriptionCAD Assistant crashes when importing the attached SolidWorks STEP files. There is nothing unusual about the STEP files. Other viewers correctly import the files. This issue might have already been resolved in 7.5.0. I have reported other problems with STEP file import.
Steps To ReproduceImport the STEP files into CAD Assistant.

pload XDE OCAF VISUALIZATION
# reading STEP is OK
#teatreadstep NIST_FTC_10_ASME1_RB_SW1802.STP s
# translation into XCAF document crashes with NULL dereference
ReadStep D NIST_FTC_10_ASME1_RB_SW1802.STP
TagsNo tags attached.
Test case numberbugs/step/bug31685_1,bug31685_2,bug31685_3

Attached Files

  • SolidWorks-OCCT.zip (2,241,792 bytes)

Relationships

parent of 0031796 newgka Open CASCADE Data Exchange, DGT - support new types of datum target 
Not all the children of this issue are yet resolved or closed.

Activities

robertlipman

2020-07-23 18:41

reporter  

SolidWorks-OCCT.zip (2,241,792 bytes)

kgv

2020-07-24 12:23

developer   ~0093282

Last edited: 2020-07-24 12:34

STEPCAFControl_Reader crashes on trying to translate the PLACED_DATUM_TARGET_FEATURE referring to PRODUCT_DEFINITION_SHAPE:
0000025=PRODUCT_DEFINITION('design','',#11580,#11578);
0000023=PRODUCT_DEFINITION_SHAPE('','',0000025);
#12714=PLACED_DATUM_TARGET_FEATURE('DetailItem65','area',0000023,.T.,'1');


as code expects only StepAP242_GeometricItemSpecificUsage and not StepRepr_ProductDefinitionShape here (regression after 0031685 in OCCT 7.0.0):
    if (aType == XCAFDimTolObjects_DatumTargetType_Area) {
      // Area datum target
      Interface_EntityIterator anIterDTF = aGraph.Shareds(aDT);
      Handle(StepAP242_GeometricItemSpecificUsage) aGISU;
      for (; anIterDTF.More() && aGISU.IsNull(); anIterDTF.Next()) {
        aGISU = Handle(StepAP242_GeometricItemSpecificUsage)::DownCast(anIterDTF.Value());
      }
      Handle(StepRepr_RepresentationItem) anItem;
      if (aGISU->NbIdentifiedItem() > 0)
        anItem = aGISU->IdentifiedItemValue(1);


git

2020-07-24 12:32

administrator   ~0093283

Branch CR31685 has been created by kgv.

SHA-1: 76f901bac02f2bf48a6f112388196121f35c7e62


Detailed log of new commits:

Author: kgv
Date: Fri Jul 24 12:34:37 2020 +0300

    0031685: Data Exchange, STEPCAFControl_Reader - NULL dereference on translating PLACED_DATUM_TARGET_FEATURE
    
    Added missing NULL check.

git

2020-09-14 14:04

administrator   ~0094724

Branch CR31685_1 has been created by dpasukhi.

SHA-1: 868466e23e489a398f30c5394386e5eb757322ad


Detailed log of new commits:

Author: dpasukhi
Date: Sun Sep 13 21:13:49 2020 +0300

    0031685: Data Exchange, STEPCAFControl_Reader - NULL dereference on translating PLACED_DATUM_TARGET_FEATURE
    
    Add check for null object

kgv

2020-09-14 14:13

developer   ~0094729

Please also check with specification if STEP file is valid or invalid (e.g. if an entity could be of the type written in the file). In the latter case, printing a warning would be useful, in the first case OCCT translator might be necessary to improve to handle another type of argument as well (could be postponed after integration of NULL check if requires considerable effots).

git

2020-09-14 16:55

administrator   ~0094758

Branch CR31685 has been updated forcibly by dpasukhi.

SHA-1: b669cb55806d18b6164dec506fe064d6b64f7b7d

dpasukhi

2020-09-14 17:01

administrator   ~0094759

Last edited: 2020-09-14 17:40

Dear kgv,
you're right.
A function setDatumToXCAF() was incorrect,namely work with a XCAFDimTolObjects_DatumTargetType_Area type. (Not valid sharing and use a high type)
Step file is valid.
I'm still trying to fix it ( this commit is not correct )

git

2020-09-24 10:13

administrator   ~0095256

Branch CR31685_1 has been updated forcibly by dpasukhi.

SHA-1: 321b4584a3a328fee8b394fb0e15d31459008ff6

git

2020-09-24 19:46

administrator   ~0095289

Branch CR31685_1 has been updated forcibly by dpasukhi.

SHA-1: 4df5b0d98e61480e40655fd2fb1f5f78bc46e96b

dpasukhi

2020-09-24 20:16

administrator   ~0095292

Last edited: 2020-09-25 09:59

Fix incorrect sharing of Placed Datum Target Feature for the 'area' type have been done.
NIST_FTC_06_ASME1_RD_SW1802.STP contains unsupported datum target types, such as 'curve', 'circular curve'. 'circular curve'.
https://www.cax-if.org/documents/AP242ed2_HTML/AP242ed2_1.htm#S0PLACED_DATUM_TARGET_FEATURE
The Description of PLACED_DATUM_TARGET_FEATURE can be ['point','line','rectangle','circle','circular curve'];
And according "Recommended practices" it can be 'area'.
'Curve' - is unknown type, 'circular curve' - is unsupported.
This problem is not solved. I'll create a new ticket for resolve it.

git

2020-09-25 00:05

administrator   ~0095294

Branch CR31685_1 has been updated forcibly by dpasukhi.

SHA-1: 2875c55d2d348f54c5a6dbbdce80771caf6c5ef8

dpasukhi

2020-09-25 09:45

administrator   ~0095299

Dear Irina,
please review CR31685_1.
All test are OK. No regressions.

ika

2020-09-25 10:39

developer   ~0095309

No remarks.

Dear bugmaster,
please integrate

OCCT - CR31685_1
Products - NOT

bugmaster

2020-09-27 14:12

administrator   ~0095370

Combination -
OCCT branch : IR-2020-09-25
master SHA - d7bc5c833ec064bd103ebbff2882146ad5a7e7de
a206de37fbfa0bf71bd534ae47192bbec23b8522
Products branch : IR-2020-09-25 SHA - a8c0c30ba368a2503bbdf9800228ace93993dfff
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: 18039.260000000093 / 17637.5100000001 [+2.28%]
Products
Total CPU difference: 12124.200000000114 / 12092.06000000011 [+0.27%]
Windows-64-VC14:
OCCT
Total CPU difference: 19753.9375 / 18982.296875 [+4.07%]
Products
Total CPU difference: 13527.921875 / 13315.40625 [+1.60%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

git

2020-09-27 14:29

administrator   ~0095380

Branch CR31685_1 has been deleted by inv.

SHA-1: 2875c55d2d348f54c5a6dbbdce80771caf6c5ef8

git

2020-09-27 14:30

administrator   ~0095401

Branch CR31685 has been deleted by inv.

SHA-1: b669cb55806d18b6164dec506fe064d6b64f7b7d

Related Changesets

occt: master d64863f9

2020-09-13 18:13:49

dpasukhi


Committer: bugmaster Details Diff
0031685: Data Exchange, STEPCAFControl_Reader - NULL dereference on translating PLACED_DATUM_TARGET_FEATURE

- Fix incorrect sharing DatumTargetType_Area
- Add check for null object
Affected Issues
0031685
mod - src/STEPCAFControl/STEPCAFControl_Reader.cxx Diff File
add - tests/bugs/step/bug31685_1 Diff File
add - tests/bugs/step/bug31685_2 Diff File
add - tests/bugs/step/bug31685_3 Diff File

occt: master 14abc514

2020-09-13 18:13:49

dpasukhi


Committer: bugmaster Details Diff
0031685: Data Exchange, STEPCAFControl_Reader - NULL dereference on translating PLACED_DATUM_TARGET_FEATURE

- Fix incorrect sharing DatumTargetType_Area
- Add check for null object
Affected Issues
0031685
mod - src/STEPCAFControl/STEPCAFControl_Reader.cxx Diff File
add - tests/bugs/step/bug31685_1 Diff File
add - tests/bugs/step/bug31685_2 Diff File
add - tests/bugs/step/bug31685_3 Diff File

Issue History

Date Modified Username Field Change
2020-07-23 18:41 robertlipman New Issue
2020-07-23 18:41 robertlipman Assigned To => gka
2020-07-23 18:41 robertlipman File Added: SolidWorks-OCCT.zip
2020-07-24 12:08 kgv Product Version 7.3.0 => 7.0.0
2020-07-24 12:08 kgv Target Version => 7.5.0
2020-07-24 12:11 kgv Steps to Reproduce Updated
2020-07-24 12:23 kgv Note Added: 0093282
2020-07-24 12:24 kgv Summary CAD Assistant crash with SolidWorks STEP file => Data Exchange, STEPCAFControl_Reader - NULL dereference while translating PLACED_DATUM_TARGET_FEATURE
2020-07-24 12:24 kgv Summary Data Exchange, STEPCAFControl_Reader - NULL dereference while translating PLACED_DATUM_TARGET_FEATURE => Data Exchange, STEPCAFControl_Reader - NULL dereference on translating PLACED_DATUM_TARGET_FEATURE
2020-07-24 12:32 git Note Added: 0093283
2020-07-24 12:34 kgv Note Edited: 0093282
2020-09-10 14:25 gka Assigned To gka => dpasukhi
2020-09-10 14:25 gka Status new => assigned
2020-09-14 14:04 git Note Added: 0094724
2020-09-14 14:13 kgv Note Added: 0094729
2020-09-14 16:55 git Note Added: 0094758
2020-09-14 17:01 dpasukhi Note Added: 0094759
2020-09-14 17:05 dpasukhi Note Edited: 0094759
2020-09-14 17:40 dpasukhi Note Edited: 0094759
2020-09-22 18:19 szy Target Version 7.5.0 => 7.6.0
2020-09-22 19:05 kgv Target Version 7.6.0 => 7.5.0
2020-09-24 10:13 git Note Added: 0095256
2020-09-24 19:44 dpasukhi Summary Data Exchange, STEPCAFControl_Reader - NULL dereference on translating PLACED_DATUM_TARGET_FEATURE => Data Exchange - NULL dereference on translating PLACED_DATUM_TARGET_FEATURE
2020-09-24 19:46 git Note Added: 0095289
2020-09-24 20:06 dpasukhi Summary Data Exchange - NULL dereference on translating PLACED_DATUM_TARGET_FEATURE => Data Exchange, STEPCAFControl_Reader - NULL dereference on translating PLACED_DATUM_TARGET_FEATURE
2020-09-24 20:16 dpasukhi Note Added: 0095292
2020-09-25 00:05 git Note Added: 0095294
2020-09-25 09:45 dpasukhi Note Added: 0095299
2020-09-25 09:45 dpasukhi Assigned To dpasukhi => ika
2020-09-25 09:45 dpasukhi Status assigned => resolved
2020-09-25 09:59 dpasukhi Note Edited: 0095292
2020-09-25 10:39 ika Note Added: 0095309
2020-09-25 10:39 ika Assigned To ika => bugmaster
2020-09-25 10:39 ika Status resolved => reviewed
2020-09-25 16:59 dpasukhi Relationship added parent of 0031796
2020-09-27 12:17 bugmaster Test case number => bugs/step/bug31685_1,bug31685_2,bug31685_3
2020-09-27 14:12 bugmaster Note Added: 0095370
2020-09-27 14:12 bugmaster Status reviewed => tested
2020-09-27 14:13 bugmaster Changeset attached => occt master d64863f9
2020-09-27 14:13 bugmaster Status tested => verified
2020-09-27 14:13 bugmaster Resolution open => fixed
2020-09-27 14:29 git Note Added: 0095380
2020-09-27 14:30 git Note Added: 0095401
2020-10-03 14:05 bugmaster Changeset attached => occt master 14abc514
2020-12-02 16:43 emo Fixed in Version => 7.5.0
2020-12-02 17:13 emo Status verified => closed