View Issue Details

IDProjectCategoryView StatusLast Update
0024383CommunityOCCT:Data Exchangepublic2013-12-19 13:59
Reporterthomhong Assigned Tobugmaster  
PrioritynormalSeveritycrash 
Status closedResolutionfixed 
PlatformWindowsOSVC++ 2010 
Product Version6.6.0 
Target Version6.7.0Fixed in Version6.7.0 
Summary0024383: Access violation during STEP file import
DescriptionThe constructor for gp_Dir throws in the constructor, resulting in a corrupted heap. The access violation occurs after the transfer is complete and the objects are being freed from memory.

The constructor is called by StepToGeom_MakeLine::Convert(const Handle(StepGeom_Line)& SC, Handle(GeomLine)& CC) at line 49 of the file StepToGeom_MakeLine.cxx.
Steps To ReproduceLoad the file using STEPCAFControl_Reader::Read() then STEPCAFControl_Reader::Transfer(Handle_TDocStd_Document doc).
TagsNo tags attached.
Test case numberbugs step(014) bug24383

Attached Files

  • 224013.7z (931,533 bytes)

Activities

thomhong

2013-11-20 03:19

reporter  

224013.7z (931,533 bytes)

abv

2013-11-20 08:26

manager   ~0026776

Last edited: 2013-11-20 08:27

Note that the file contains corrupted data: some points used in definition of B-Spline curves have coordinates out of reasonable domain. For instance, here is excerpt containing point #76964 (with two 'normal' neighbors):

#76963=CARTESIAN_POINT('',(-4.83182210693315,-13.5595372826271,-99.3028366263764));
#76964=CARTESIAN_POINT('',(-30313711.4733752,-30313720.2010904,-30313805.9443898));
#76965=CARTESIAN_POINT('',(-4.83182395018699,-13.5595368160101,-99.3028362962861));

That point is located 50 km far from the shape whose size is 17 mm... Needless to say that this shape is invalid, and numeric problems can be encountered while working with it.

As for exception, I have not encountered it (working with DRAW, vc10 64-bit mode, Release)

gka

2013-11-21 18:22

developer   ~0026829

Exception "Standard_ConstructionError" is raised in debug mode during translation of face #9869
This face based of surface of revolution refers to vector with null magnitude:
 
#9869 = ADVANCED_FACE('',(#12612),#1048,.T.);
#1048 = SURFACE_OF_REVOLUTION('',#5380,#1128);
#5380 = LINE('',#61843,#7414);
#7414=VECTOR('',#50042,0.);

Protection for this case will be added.

gka

2013-11-21 18:44

developer   ~0026830

Branch CR24383 is ready to be reviewed.

mkv

2013-11-25 14:55

tester   ~0026883

Dear BugMaster,

Branch CR24383 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
SHA-1: 5b615b41274d3e8ab6494d509054e5c0a49fc9dd

Number of compiler warnings:

occt component :
Linux: 320 (320 on master)
Windows: 0 (0 on master)

products component :
Linux: 188 (188 on master)
Windows: 286 (286 on master)

Regressions/Differences:
No regressions/differences

Testing cases:
http://occt-tests/CR24383-master-occt/Debian60-64/bugs/step/bug24383.html
http://occt-tests/CR24383-master-occt/Windows-32-VC9/bugs/step/bug24383.html
bugs step(014) bug24383: OK

Testing on Linux:
Total MEMORY difference: 358545040 / 358567412
Total CPU difference: 44203.56000000015 / 43977.750000000386

Testing on Windows:
Total MEMORY difference: 412572588 / 412755496
Total CPU difference: 33564.796875 / 32189.921875

There are not differences in images found by testdiff.

mkv

2013-11-25 14:57

tester   ~0026884

Dear gka,
could you please validate test case bugs/step(014)/bug24383

gka

2013-11-25 15:30

developer   ~0026887

This test should be checked only in Debug mode.

apn

2013-11-27 11:22

administrator   ~0026944

Last edited: 2013-11-27 11:23

Branch CR24383 (and products from GIT master) was compiled on Linux and Windows platforms (vc9 win32 Debug) and tested.

Regressions/Differences:
No regressions/differences

Testing cases:
bugs step bug24383 - OK
http://jenkins-test-02.nnov.opencascade.com:8080/job/mnt-CR24383-master_occt_tests_linux_start_deb/label=Debian60-64,tests_group=bugs,tests_subgroup=014/4/HTML_Report/?
http://jenkins-test-02.nnov.opencascade.com:8080/job/mnt-CR24383-master_occt_tests_windows_start_deb/label=windows_test,tests_group=bugs,tests_subgroup=014/4/HTML_Report/?

Also branch was compiled with vc10 win64 Debug (as in issue description). Test case is OK.

Related Changesets

occt: master 5cc18856

2013-11-28 07:19:34

gka


Committer: bugmaster Details Diff
0024383: Access violation during STEP file import

Protection for null magnitude of vector written in file was added.

Test cases for issue CR24383
Affected Issues
0024383
mod - src/StepToGeom/StepToGeom_MakeLine.cxx Diff File
add - tests/bugs/step/bug24383 Diff File

Issue History

Date Modified Username Field Change
2013-11-20 03:19 thomhong New Issue
2013-11-20 03:19 thomhong Assigned To => gka
2013-11-20 03:19 thomhong File Added: 224013.7z
2013-11-20 08:26 abv Note Added: 0026776
2013-11-20 08:27 abv Note Edited: 0026776
2013-11-21 18:22 gka Note Added: 0026829
2013-11-21 18:22 gka Status new => assigned
2013-11-21 18:44 gka Note Added: 0026830
2013-11-21 18:44 gka Assigned To gka => pdn
2013-11-21 18:44 gka Status assigned => resolved
2013-11-22 11:15 pdn Status resolved => reviewed
2013-11-22 14:24 mkv Assigned To pdn => mkv
2013-11-25 14:55 mkv Note Added: 0026883
2013-11-25 14:57 mkv Note Added: 0026884
2013-11-25 14:57 mkv Test case number => bugs step(014) bug24383
2013-11-25 14:57 mkv Assigned To mkv => gka
2013-11-25 14:57 mkv Status reviewed => feedback
2013-11-25 15:30 gka Note Added: 0026887
2013-11-25 15:31 gka Assigned To gka => mkv
2013-11-25 15:31 gka Status feedback => acknowledged
2013-11-26 11:54 apn Assigned To mkv => apn
2013-11-27 11:22 apn Note Added: 0026944
2013-11-27 11:23 apn Note Edited: 0026944
2013-11-27 11:24 apn Assigned To apn => bugmaster
2013-11-27 11:24 apn Status acknowledged => reviewed
2013-11-27 11:24 apn Target Version => 6.7.0
2013-11-27 11:24 apn Status reviewed => tested
2013-12-02 10:21 bugmaster Changeset attached => occt master 5cc18856
2013-12-02 10:21 bugmaster Status tested => verified
2013-12-02 10:21 bugmaster Resolution open => fixed
2013-12-19 13:50 bugmaster Status verified => closed
2013-12-19 13:59 bugmaster Fixed in Version => 6.7.0