View Issue Details

IDProjectCategoryView StatusLast Update
0027185Open CASCADEOCCT:Data Exchangepublic2020-12-02 17:11
ReporterabvAssigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Target Version7.5.0Fixed in Version7.5.0 
Summary0027185: Data Exchange - IGES - incorrect reading of DE for undefined entity
DescriptionMethod IGESData_UndefinedEntity::ReadDir() incorrectly treats negative value of color number (field 13): error is generated, while negative value should be resolved to a Color Definition Entity.

This is due to error in the code (apparently copy-paste nature):

~~~~~
  iapb = Standard_False;
  if (v[14] < 0 || v[14] > max) iapb = Standard_True;
  else if (v[14] < 0) {
    anent = GetCasted(IGESData_IGESEntity,IR->BoundEntity((1+v[14])/2));
    if (!anent->IsKind(STANDARD_TYPE(IGESData_ColorEntity)))
      { thedstat += 512; v[14] = 0; }
  }
  
  // Sending of message : Color Number field is incorrect.
  if (iapb) {

~~~~~

This code will never read entity.
Here positive value of color index should indicate predefined color, while negative is a reference to color definition entity.

The same problem seem to be with reading some other fields in that class, e.g. Label Display Entity.

The issue is detected during analysis of regressions on branch CR27111_6.
It causes additional failure message reported by by "data c" command on first file loading in test de iges_2 F9:

 1 F:122 0 TabulatedCylinder : Directory Entry (Field 13) : Color Number field is incorrect (Pointer or Integer between 0 and 8 was expected).
Steps To Reproducetest de iges_2 F9
test bugs iges bug27186
TagsNo tags attached.
Test case numberde iges_2 F9

Relationships

related to 0026377 closedabv Open CASCADE Passing Handle objects as arguments to functions as non-const reference to base type is dangerous 
related to 0027111 closedabv Community Add generalized copy constructor in handle class for old compilers 
related to 0027186 newgka Open CASCADE IGES - reconsider creation of Undefined entity in case of failure 

Activities

mkv

2017-08-18 14:40

tester   ~0069579

Problem described in issue is reproduced on current state of OCCT.

git

2020-09-15 17:18

administrator   ~0094866

Branch CR27185 has been created by ika.

SHA-1: e5695540512a76dbb242c8c29b437cab6a99f240


Detailed log of new commits:

Author: ika
Date: Tue Sep 15 17:20:35 2020 +0300

    0027185: IGES - incorrect reading of DE for undefined entity
    
    Fix reading of pointers to color entity.

ika

2020-09-16 11:56

developer   ~0094902

Dear GKA,

could you please review branch CR27185?

http://occt-tests/CR27185-master-ika-OCCT/Debian80-64/diff_summary.html
http://occt-tests/CR27185-master-ika-OCCT/Windows-64-VC14/diff_summary.html
http://occt-tests/CR27185-master-ika-Products/Debian80-64/diff_summary.html
http://occt-tests/CR27185-master-ika-Products/Windows-64-VC14/diff_summary.html

gka

2020-09-18 14:30

developer   ~0095029

Branch CR27185 was reviewed

bugmaster

2020-09-19 17:19

administrator   ~0095060

Combination -
OCCT branch : IR-2020-09-18
master SHA - b0b766826118f74b9857a932b8cec8c52a25c492
a206de37fbfa0bf71bd534ae47192bbec23b8522
Products branch : IR-2020-09-18 SHA - a6486d839da1ba1383ef6cc1a1a446a172f494c7
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: 17528.97000000011 / 17378.390000000145 [+0.87%]
Products
Total CPU difference: 12127.32000000009 / 12079.540000000095 [+0.40%]
Windows-64-VC14:
OCCT
Total CPU difference: 18862.703125 / 18898.921875 [-0.19%]
Products
Total CPU difference: 13314.828125 / 13329.21875 [-0.11%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

git

2020-09-20 11:13

administrator   ~0095115

Branch CR27185 has been deleted by inv.

SHA-1: e5695540512a76dbb242c8c29b437cab6a99f240

Related Changesets

occt: master b0b76682

2020-09-15 14:20:35

ika


Committer: bugmaster Details Diff
0027185: Data Exchange - IGES - incorrect reading of DE for undefined entity

Fix reading of pointers to color entity.
Affected Issues
0027185
mod - src/IGESData/IGESData_UndefinedEntity.cxx Diff File
mod - tests/bugs/iges/bug27186 Diff File
mod - tests/de/iges_2/F9 Diff File

Issue History

Date Modified Username Field Change
2016-02-18 18:43 abv New Issue
2016-02-18 18:43 abv Assigned To => gka
2016-02-18 18:59 abv Relationship added related to 0027186
2016-02-18 18:59 abv Relationship added related to 0027111
2016-02-18 18:59 abv Relationship deleted related to 0027111
2016-02-18 19:00 abv Relationship added related to 0026377
2016-10-26 11:09 gka Target Version 7.1.0 => 7.2.0
2017-07-27 09:24 abv Target Version 7.2.0 => 7.4.0
2017-08-18 14:40 mkv Test case number => de iges_2 F9
2017-08-18 14:40 mkv Note Added: 0069579
2019-07-10 22:20 abv Relationship added related to 0027111
2019-09-04 15:54 abv Target Version 7.4.0 => 7.5.0
2020-09-14 12:37 gka Assigned To gka => ika
2020-09-14 12:37 gka Status new => assigned
2020-09-15 17:18 git Note Added: 0094866
2020-09-16 11:56 ika Note Added: 0094902
2020-09-16 11:56 ika Assigned To ika => gka
2020-09-16 11:56 ika Status assigned => resolved
2020-09-16 11:56 ika Steps to Reproduce Updated
2020-09-18 14:30 gka Note Added: 0095029
2020-09-18 14:30 gka Assigned To gka => bugmaster
2020-09-18 14:30 gka Status resolved => reviewed
2020-09-18 18:12 bugmaster Summary IGES - incorrect reading of DE for undefined entity => Data Exchange - IGES - incorrect reading of DE for undefined entity
2020-09-19 17:19 bugmaster Note Added: 0095060
2020-09-19 17:19 bugmaster Status reviewed => tested
2020-09-20 10:55 bugmaster Changeset attached => occt master b0b76682
2020-09-20 10:55 bugmaster Status tested => verified
2020-09-20 10:55 bugmaster Resolution open => fixed
2020-09-20 11:13 git Note Added: 0095115
2020-12-02 16:40 emo Fixed in Version => 7.5.0
2020-12-02 17:11 emo Status verified => closed