View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0027432 | Community | OCCT:Foundation Classes | public | 2016-04-26 10:55 | 2016-12-09 16:37 |
Reporter | BenjaminBihler | Assigned To | bugmaster | ||
Priority | normal | Severity | crash | ||
Status | closed | Resolution | fixed | ||
Platform | Windows | OS | VC++ 2015 | ||
Product Version | 7.0.0 | ||||
Target Version | 7.1.0 | Fixed in Version | 7.1.0 | ||
Summary | 0027432: Null Handle Access When Creating AIS_Trihedron | ||||
Description | When 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 Reproduce | In 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 | ||||
Tags | No tags attached. | ||||
Test case number | Not needed | ||||
|
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. |
|
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 |
|
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. |
|
Benjamin, I have pushed correction to branch CR27432, could you please check whether it helps you? |
|
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. |
|
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 |
|
Reviewed, please test |
|
Branch CR27432 has been updated forcibly by mkv. SHA-1: 6edd1dfbab086b74cd8d9641bc294ad577c553fb |
|
Dear BugMaster, Branch CR27432 was rebased on current master of occt git-repository. SHA-1: 6edd1dfbab086b74cd8d9641bc294ad577c553fb |
|
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. |
|
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 |
|
Dear kgv, could you please review following test case bugs fclasses bug27432 |
|
As agreed, please remove test as it is not able to show problem in standard test environment |
|
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 |
|
Dear BugMaster, Branch CR27432 is TESTED. |
|
Branch CR27432 has been deleted by inv. SHA-1: 19905df2c0c97049c9d2a88cd3cf4ead9ad68906 |
occt: master 3d370858 2016-04-26 18:24:27
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 |
Affected Issues 0027432 |
|
mod - dox/dev_guides/upgrade/upgrade.md | Diff File | ||
mod - src/Units/Units_Sentence.cxx | Diff File |
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 |
|
Note Added: 0053622 | |
2016-04-27 06:52 |
|
Steps to Reproduce Updated | |
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 |
|
Note Added: 0053917 | |
2016-05-09 12:49 |
|
Assigned To | abv => bugmaster |
2016-05-09 12:49 |
|
Status | resolved => reviewed |
2016-05-10 12:39 | git | Note Added: 0053943 | |
2016-05-10 12:44 |
|
Assigned To | bugmaster => mkv |
2016-05-11 16:00 |
|
Note Added: 0053993 | |
2016-05-11 16:00 |
|
Note Added: 0053994 | |
2016-05-11 16:00 | git | Note Added: 0053995 | |
2016-05-11 16:01 |
|
Note Added: 0053996 | |
2016-05-11 16:01 |
|
Test case number | => bugs fclasses bug27432 |
2016-05-11 16:02 |
|
Assigned To | mkv => kgv |
2016-05-11 16:02 |
|
Status | reviewed => feedback |
2016-05-11 16:08 |
|
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 |
|
Note Added: 0053999 | |
2016-05-11 16:15 |
|
Assigned To | mkv => bugmaster |
2016-05-11 16:15 |
|
Status | feedback => tested |
2016-05-11 16:16 |
|
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 |
|
Status | verified => closed |
2016-12-09 16:37 |
|
Fixed in Version | => 7.1.0 |