MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0027185Open CASCADE[OCCT] OCCT:Data Exchangepublic2016-02-18 18:432017-08-18 14:40
Reporterabv 
Assigned Togka 
PrioritynormalSeverityminor 
StatusnewResolutionopen 
PlatformOSOS Version
Product Version 
Target Version[OCCT] 7.4.0*Fixed in Version 
Summary0027185: 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
TagsNo tags attached.
Test case numberde iges_2 F9
Attached Files

- Relationships
related to 0026377closedabv Passing Handle objects as arguments to functions as non-const reference to base type is dangerous 
related to 0027186newgka IGES - reconsider creation of Undefined entity in case of failure 

-  Notes
(0069579)
mkv (tester)
2017-08-18 14:40

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

- 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


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker