MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0027432Community[OCCT] OCCT:Foundation Classespublic2016-04-26 10:552016-12-09 16:37
ReporterBenjaminBihler 
Assigned Tobugmaster 
PrioritynormalSeveritycrash 
StatusclosedResolutionfixed 
PlatformWindowsOSVC++ 2015OS Version64 bit
Product Version[OCCT] 7.0.0 
Target Version[OCCT] 7.1.0Fixed in Version[OCCT] 7.1.0 
Summary0027432: Null Handle Access When Creating AIS_Trihedron
DescriptionWhen I create an AIS_Trihedron with the following code

Handle(Geom_Axis2Placement) placement = new Geom_Axis2Placement(
            robotPathPoint->getAxisSystem());

interactiveObject = new AIS_Trihedron(placement);

my application crashes, but only when OCCT is compiled in release mode. If OCCT is compiled in debug mode, no crash happens.

By entering debug text output into the related OCCT files, I have been able to find out that lstlexicon is a null-handle in line 74 of Units_Sentence.cxx and that is the reason for the crash.

The line reads:

    for(index=1; index<=lstlexicon->Length(); index++) {

Actually line 63 reads:

  Units_NoSuchType_Raise_if(lstlexicon.IsNull(),"BAD LEXICON descriptor");

and throwing an exception here would prevent working with a null lstlexicon, but in release builds the macro "No_Exception" seems to be defined here, which prevents the exception. But then I get a crash.
Steps To ReproduceIn a new DRAW session:

set env(CSF_UnitsDefinition) /dev/null
set env(CSF_UnitsLexicon) /dev/null
pload VISUALIZATION
vinit
vtrihedron t

Note that exception does not reproduce in DRAW in Release mode, but can be caught in debugger in Debug mode
TagsNo tags attached.
Test case numberNot needed
Attached Files

- Relationships
related to 0027258closedapn Open CASCADE Configuration - generate built-in replacement for mandatory resource files 

-  Notes
(0053574)
BenjaminBihler (developer)
2016-04-26 10:57

I have forgotten to add: my AIS_Trihedron creation code has worked correctly with OCCT 6.8.0.

I am prepared to give more details, but I guess that I cannot fix the issue, because I am not familiar with why there is a No_Exception macro and how to deal with exceptions, when they may not be thrown.
(0053619)
kgv (developer)
2016-04-26 19:54

Could you please comment why do you report it as a bug?
As far as I understand the context, application does not define required OCCT resources to use this functionality:
http://dev.opencascade.org/doc/overview/html/index.html#OCCT_OVW_SECTION_4_2 [^]
(0053621)
git (administrator)
2016-04-26 21:25

Branch CR27432 has been created by abv.

SHA-1: a7be819e791ce13b0949fdc85bbfa2f232f84510


Detailed log of new commits:

Author: abv
Date: Tue Apr 26 21:24:27 2016 +0300

    0027432: Null Handle Access When Creating AIS_Trihedron
    
    Debug-only "RaiseIf" is replaced by simple "if" to have exceptional situation handled correctly in Release mode.
(0053622)
abv (manager)
2016-04-26 21:25

Benjamin, I have pushed correction to branch CR27432, could you please check whether it helps you?
(0053661)
BenjaminBihler (developer)
2016-04-28 11:19

Sorry for answering so late, I have been out-of-office yesterday.

Kirill, thank you for the hint. You are right - setting CSF_UnitsDefinition and CSF_UnitsLexicon environment variables makes the problem go away.

Andrey, thank you for the fix, it works. In my opinion this is a great improvement, since application crashes due to forgotten environment variables cannot be considered as good design. In fact, your change makes setting the environment variables mentioned above even unnecessary for creating an AIS_Trihedron.

I am glad to see that there is already work going on on the related issue 0027258. Actually the environment variables (shaders and units) have been a major part of my porting work from 6.8.0 to 7.0.0. If I have not missed anything, the environment variables have not been mentioned in the upgrade guides.
(0053850)
git (administrator)
2016-05-05 15:47

Branch CR27432 has been updated by kgv.

SHA-1: ec51045bd5564ca698250e12081114b79951c370


Detailed log of new commits:

Author: kgv
Date: Thu May 5 15:47:52 2016 +0300

    Mention mandatory variable CSF_ShadersDirectory in porting notes for OCCT 6.9.0

(0053917)
abv (manager)
2016-05-09 12:49

Reviewed, please test
(0053943)
git (administrator)
2016-05-10 12:39

Branch CR27432 has been updated forcibly by mkv.

SHA-1: 6edd1dfbab086b74cd8d9641bc294ad577c553fb
(0053993)
mkv (tester)
2016-05-11 16:00

Dear BugMaster,
Branch CR27432 was rebased on current master of occt git-repository.
SHA-1: 6edd1dfbab086b74cd8d9641bc294ad577c553fb
(0053994)
mkv (tester)
2016-05-11 16:00

Dear BugMaster,
Branch CR27432 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
SHA-1: 6edd1dfbab086b74cd8d9641bc294ad577c553fb

Number of compiler warnings:

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

products component :
Linux: 72 (72 on master)
Windows: 4 (4 on master)
MacOS : 1119

Regressions/Differences/Improvements:
No regressions/differences

Testing cases:
http://occt-tests/CR27432-master-OCCT/Debian70-64/bugs/fclasses/bug27432.html [^]
http://occt-tests/CR27432-master-OCCT/Windows-64-VC10/bugs/fclasses/bug27432.html [^]
bugs fclasses bug27432: OK

Testing on Linux:
occt component :
Total MEMORY difference: 87700114 / 87499965 [+0.23%]
Total CPU difference: 19337.210000000123 / 19370.860000000182 [-0.17%]
products component :
Total MEMORY difference: 27857964 / 27839978 [+0.06%]
Total CPU difference: 5352.689999999983 / 5344.489999999986 [+0.15%]

Testing on Windows:
occt component :
Total MEMORY difference: 55528604 / 55549122 [-0.04%]
Total CPU difference: 17921.84728289889 / 18280.618382698816 [-1.96%]
products component :
Total MEMORY difference: 18922444 / 18891436 [+0.16%]
Total CPU difference: 5041.234715399943 / 5013.591338199941 [+0.55%]

There are no differences in images found by testdiff.
(0053995)
git (administrator)
2016-05-11 16:00

Branch CR27432 has been updated by mkv.

SHA-1: 042845f72a77a118fe4bccc3678d42985b0ec5b4


Detailed log of new commits:

Author: mkv
Date: Wed May 11 15:24:17 2016 +0300

    Test cases for issue CR27432

(0053996)
mkv (tester)
2016-05-11 16:01

Dear kgv,
could you please review following test case
bugs fclasses bug27432
(0053997)
abv (manager)
2016-05-11 16:08

As agreed, please remove test as it is not able to show problem in standard test environment
(0053998)
git (administrator)
2016-05-11 16:14

Branch CR27432 has been updated by mkv.

SHA-1: 19905df2c0c97049c9d2a88cd3cf4ead9ad68906


Detailed log of new commits:

Author: mkv
Date: Wed May 11 16:14:41 2016 +0300

    Deleting test cases for issue CR27432

(0053999)
mkv (tester)
2016-05-11 16:15

Dear BugMaster,
Branch CR27432 is TESTED.
(0054178)
git (administrator)
2016-05-20 12:21

Branch CR27432 has been deleted by inv.

SHA-1: 19905df2c0c97049c9d2a88cd3cf4ead9ad68906

- Related Changesets
occt: master 3d370858
Timestamp: 2016-04-26 18:24:27
Author: abv
Committer: bugmaster
Details ] Diff ]
0027432: Null Handle Access When Creating AIS_Trihedron

Debug-only "RaiseIf" is replaced by simple "if" to have exceptional situation handled correctly in Release mode.

Mention mandatory variable CSF_ShadersDirectory in porting notes for OCCT 6.9.0

Test cases for issue CR27432

Deleting test cases for issue CR27432
mod - dox/dev_guides/upgrade/upgrade.md Diff ] File ]
mod - src/Units/Units_Sentence.cxx Diff ] File ]

- Issue History
Date Modified Username Field Change
2016-04-26 10:55 BenjaminBihler New Issue
2016-04-26 10:55 BenjaminBihler Assigned To => kgv
2016-04-26 10:57 BenjaminBihler Note Added: 0053574
2016-04-26 16:57 BenjaminBihler Product Version => 7.0.0
2016-04-26 19:51 kgv Relationship added related to 0027258
2016-04-26 19:54 kgv Note Added: 0053619
2016-04-26 19:54 kgv Assigned To kgv => BenjaminBihler
2016-04-26 19:54 kgv Status new => feedback
2016-04-26 21:25 git Note Added: 0053621
2016-04-26 21:25 abv Note Added: 0053622
2016-04-27 06:52 abv Steps to Reproduce Updated View Revisions
2016-04-27 10:26 kgv Category OCCT:Visualization => OCCT:Foundation Classes
2016-04-28 11:19 BenjaminBihler Note Added: 0053661
2016-04-29 09:41 BenjaminBihler Assigned To BenjaminBihler => abv
2016-04-29 09:42 BenjaminBihler Status feedback => resolved
2016-05-05 15:47 git Note Added: 0053850
2016-05-09 12:49 abv Note Added: 0053917
2016-05-09 12:49 abv Assigned To abv => bugmaster
2016-05-09 12:49 abv Status resolved => reviewed
2016-05-10 12:39 git Note Added: 0053943
2016-05-10 12:44 mkv Assigned To bugmaster => mkv
2016-05-11 16:00 mkv Note Added: 0053993
2016-05-11 16:00 mkv Note Added: 0053994
2016-05-11 16:00 git Note Added: 0053995
2016-05-11 16:01 mkv Note Added: 0053996
2016-05-11 16:01 mkv Test case number => bugs fclasses bug27432
2016-05-11 16:02 mkv Assigned To mkv => kgv
2016-05-11 16:02 mkv Status reviewed => feedback
2016-05-11 16:08 abv Note Added: 0053997
2016-05-11 16:09 kgv Assigned To kgv => mkv
2016-05-11 16:14 git Note Added: 0053998
2016-05-11 16:15 mkv Note Added: 0053999
2016-05-11 16:15 mkv Assigned To mkv => bugmaster
2016-05-11 16:15 mkv Status feedback => tested
2016-05-11 16:16 mkv Test case number bugs fclasses bug27432 => Not needed
2016-05-13 12:41 bugmaster Changeset attached => occt master 3d370858
2016-05-13 12:41 bugmaster Status tested => verified
2016-05-13 12:41 bugmaster Resolution open => fixed
2016-05-20 12:21 git Note Added: 0054178
2016-12-09 16:33 user533 Status verified => closed
2016-12-09 16:37 user533 Fixed in Version => 7.1.0


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker