MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0031685Community[OCCT] OCCT:Data Exchangepublic2020-07-23 18:412020-10-03 14:06
Reporterrobertlipman 
Assigned Tobugmaster 
PrioritynormalSeveritycrash 
StatusverifiedResolutionfixed 
PlatformOSOS Version
Product Version[OCCT] 7.0.0 
Target Version[OCCT] 7.5.0Fixed in Version 
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 Fileszip file icon SolidWorks-OCCT.zip (2,241,792 bytes) 2020-07-23 18:41

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

-  Notes
(0093282)
kgv (developer)
2020-07-24 12:23
edited on: 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);


(0093283)
git (administrator)
2020-07-24 12:32

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.
(0094724)
git (administrator)
2020-09-14 14:04

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
(0094729)
kgv (developer)
2020-09-14 14:13

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).
(0094758)
git (administrator)
2020-09-14 16:55

Branch CR31685 has been updated forcibly by dpasukhi.

SHA-1: b669cb55806d18b6164dec506fe064d6b64f7b7d
(0094759)
dpasukhi (developer)
2020-09-14 17:01
edited on: 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 )

(0095256)
git (administrator)
2020-09-24 10:13

Branch CR31685_1 has been updated forcibly by dpasukhi.

SHA-1: 321b4584a3a328fee8b394fb0e15d31459008ff6
(0095289)
git (administrator)
2020-09-24 19:46

Branch CR31685_1 has been updated forcibly by dpasukhi.

SHA-1: 4df5b0d98e61480e40655fd2fb1f5f78bc46e96b
(0095292)
dpasukhi (developer)
2020-09-24 20:16
edited on: 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.

(0095294)
git (administrator)
2020-09-25 00:05

Branch CR31685_1 has been updated forcibly by dpasukhi.

SHA-1: 2875c55d2d348f54c5a6dbbdce80771caf6c5ef8
(0095299)
dpasukhi (developer)
2020-09-25 09:45

Dear Irina,
please review CR31685_1.
All test are OK. No regressions.
(0095309)
ika (developer)
2020-09-25 10:39

No remarks.

Dear bugmaster,
please integrate

OCCT - CR31685_1
Products - NOT
(0095370)
bugmaster (administrator)
2020-09-27 14:12

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
(0095380)
git (administrator)
2020-09-27 14:29

Branch CR31685_1 has been deleted by inv.

SHA-1: 2875c55d2d348f54c5a6dbbdce80771caf6c5ef8
(0095401)
git (administrator)
2020-09-27 14:30

Branch CR31685 has been deleted by inv.

SHA-1: b669cb55806d18b6164dec506fe064d6b64f7b7d

- Related Changesets
occt: master d64863f9
Timestamp: 2020-09-13 18:13:49
Author: 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
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
Timestamp: 2020-09-13 18:13:49
Author: 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
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 Relationship added child of 0026689
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 View Revisions
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 View Revisions
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 View Revisions
2020-09-14 17:40 dpasukhi Note Edited: 0094759 View Revisions
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 View Revisions
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


Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker