MantisBT - Community
View Issue Details
0024383Community[OCCT] OCCT:Data Exchangepublic2013-11-20 03:192013-12-19 13:59
thomhong 
bugmaster 
normalcrash 
closedfixed 
WindowsVC++ 201064 bit
[OCCT] 6.6.0 
[OCCT] 6.7.0[OCCT] 6.7.0 
bugs step(014) bug24383
0024383: Access violation during STEP file import
The 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.
Load the file using STEPCAFControl_Reader::Read() then STEPCAFControl_Reader::Transfer(Handle_TDocStd_Document doc).
No tags attached.
7z 224013.7z (931,533) 2013-11-20 03:19
https://tracker.dev.opencascade.org/
Issue History
2013-11-20 03:19thomhongNew Issue
2013-11-20 03:19thomhongAssigned To => gka
2013-11-20 03:19thomhongFile Added: 224013.7z
2013-11-20 08:26abvNote Added: 0026776
2013-11-20 08:27abvNote Edited: 0026776bug_revision_view_page.php?bugnote_id=26776#r6292
2013-11-21 18:22gkaNote Added: 0026829
2013-11-21 18:22gkaStatusnew => assigned
2013-11-21 18:44gkaNote Added: 0026830
2013-11-21 18:44gkaAssigned Togka => pdn
2013-11-21 18:44gkaStatusassigned => resolved
2013-11-22 11:15pdnStatusresolved => reviewed
2013-11-22 14:24mkvAssigned Topdn => mkv
2013-11-25 14:55mkvNote Added: 0026883
2013-11-25 14:57mkvNote Added: 0026884
2013-11-25 14:57mkvTest case number => bugs step(014) bug24383
2013-11-25 14:57mkvAssigned Tomkv => gka
2013-11-25 14:57mkvStatusreviewed => feedback
2013-11-25 15:30gkaNote Added: 0026887
2013-11-25 15:31gkaAssigned Togka => mkv
2013-11-25 15:31gkaStatusfeedback => acknowledged
2013-11-26 11:54apnAssigned Tomkv => apn
2013-11-27 11:22apnNote Added: 0026944
2013-11-27 11:23apnNote Edited: 0026944bug_revision_view_page.php?bugnote_id=26944#r6382
2013-11-27 11:24apnAssigned Toapn => bugmaster
2013-11-27 11:24apnStatusacknowledged => reviewed
2013-11-27 11:24apnTarget Version => 6.7.0
2013-11-27 11:24apnStatusreviewed => tested
2013-12-02 10:21bugmasterChangeset attached => occt master 5cc18856
2013-12-02 10:21bugmasterStatustested => verified
2013-12-02 10:21bugmasterResolutionopen => fixed
2013-12-19 13:50bugmasterStatusverified => closed
2013-12-19 13:59bugmasterFixed in Version => 6.7.0

Notes
(0026776)
abv   
2013-11-20 08:26   
(edited on: 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)

(0026829)
gka   
2013-11-21 18:22   
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.
(0026830)
gka   
2013-11-21 18:44   
Branch CR24383 is ready to be reviewed.
(0026883)
mkv   
2013-11-25 14:55   
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.
(0026884)
mkv   
2013-11-25 14:57   
Dear gka,
could you please validate test case bugs/step(014)/bug24383
(0026887)
gka   
2013-11-25 15:30   
This test should be checked only in Debug mode.
(0026944)
apn   
2013-11-27 11:22   
(edited on: 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.