DiscussionsIssue archiveOCCT:Data Exchange

Archived issue #0033487

Data Exchange, Step Import - Unresolved reference crashes

CommunityOCCT:Data Exchangeverified15 public notes

Search issues

Description

Call STEPCAFControl_Reader->Transfer() caused exception Access Violation when file has Unresolved Reference, see Attachment 4 (PNG).
Other attached files occt_bug[1, 2, 4].PNG shows other exception details.
https://github.com/Open-Cascade-SAS/OCCT/pull/76

Steps to reproduce

Read STEP file with Unresolved Reference (Attachment 4 (PNG)) and use STEPCAFControl_Reader.
I've to ask my college if I can provide this file.

Additional information

When I've set STEPCAFControl_Reader.SetColorMode(false) file is normally read.

Public activity

15 archived notes

Participants are labeled by their role within this record.

01Commenter 2
Dear Commenter 3
please reattache a files. There was some problem with attachemtns
02Author
03Author
Missing attached files.
Attachment 6 (PNG) (16,061 bytes)   
Attachment 5 (PNG) (39,358 bytes)   
Attachment 4 (PNG) (17,108 bytes)   
Attachment 3 (PNG) (92,422 bytes)   
Attachment 2 (PNG) (39,039 bytes)   
04Author
Attached Attachment 6 (PNG) is from CAD Assistant.

And see loaded model with applied PR https://github.com/Open-Cascade-SAS/OCCT/pull/13.
Attachment 1 (JPG) (133,409 bytes)   
05Commenter 2
06Commenter 2
Needs to prepare correct fix to check empty name
07Commenter 4
Branch [archived branch] has been created by Participant.

[revision removed]


Detailed log of new commits:

Author: ichesnok
Date: Tue Apr 16 16:38:20 2024 +0100

    0033487: Data Exchange, Step Import - Unresolved reference crashes
    
    IsNull() check added for Handle(StepVisual_FillAreaStyleColour).
08Commenter 2
Commenter 5 please share details about why this entity is null inside file. It is not exist or we have no read some data?

Please avoid to write git commit message with trivial description. Try to describe a scenario that leads to the issue and issue itself.
09Author
I would like to share this model with unresolved references, but I don't have a permission for it.
I can only offer to test it after some provided fix.
10Commenter 4
Branch [archived branch] has been created by Commenter 2.

[revision removed]


Detailed log of new commits:

Author: dkulikov
Date: Mon Sep 23 13:59:28 2024 +0000

    0033487: Data Exchange, Step Import - Unresolved reference crashes
    
    Fixed crash in STEPConstruct_Styles::GetColors() due to nullptr
    dereferencing when source step file has missing
    FILL_AREA_STYLE_COLOUR entities.
    
    STEPConstruct_Styles::GetColors () is refactored.
    
    Test bug33487 ia added to check that crash doesn't occur.
11Commenter 4
Branch [archived branch] has been updated by Commenter 2.

[revision removed]


Detailed log of new commits:

Author: dkulikov
Date: Mon Sep 23 16:29:40 2024 +0000

    code style fix
12Commenter 4
Branch [archived branch] has been updated by Commenter 2.

[revision removed]


Detailed log of new commits:

Author: dkulikov
Date: Mon Sep 23 18:20:05 2024 +0000

    small fix
13Commenter 4
Branch [archived branch] has been updated by Commenter 2.

[revision removed]


Detailed log of new commits:

Author: dkulikov
Date: Tue Sep 24 09:49:19 2024 +0000

    small fix
14Author
I can confirm that problematic STP model is loading correctly without crash. Thank you for fixing.
15Commenter 2