Anonymous | Login | 2021-01-26 05:51 MSK | ![]() |
My View | View Issues | Change Log | Roadmap |
View Issue Details [ Jump to Notes ] [ Related Changesets ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0023889 | Community | [OCCT] OCCT:Visualization | public | 2013-04-09 17:30 | 2013-12-19 13:55 | ||||
Reporter | Pawel | ||||||||
Assigned To | vro | ||||||||
Priority | normal | Severity | minor | ||||||
Status | closed | Resolution | fixed | ||||||
Platform | Windows | OS | VC++ 2008 | OS Version | 64 bit | ||||
Product Version | [OCCT] 6.6.0 | ||||||||
Target Version | [OCCT] 6.7.0 | Fixed in Version | [OCCT] 6.7.0 | ||||||
Summary | 0023889: Assignment of function parameter has no effect outside the function. | ||||||||
Description | In Voxel_ROctBoolDS.cxx, in line 91: data = 0; The method: static void SetZeroSplitData(Voxel_SplitData* data) would have to take - Voxel_SplitData** data - as parameter in order to nullify the pointer. I'm not sure if this is necessary/intended. | ||||||||
Tags | No tags attached. | ||||||||
Test case number | Not needed | ||||||||
Attached Files | |||||||||
![]() |
|
(0024063) vro (developer) 2013-04-10 08:59 |
Many thanks for the found bug! Indeed, the code is not quite correct. In spite of the method deletes the underlying data, assignment of the data to 0 has no effect outside of the method, as you noticed. So, in order to make as less changes as possible I added an ampersand: static void SetZeroSplitData(Voxel_SplitData*& data) Do you agree, Pawel? Let me know please if you see a better idea. Any remarks are welcome! :-) |
(0024064) vro (developer) 2013-04-10 09:00 |
As usual, I forgot to say that the changes are in CR23889. |
(0024072) Pawel (developer) 2013-04-10 12:32 |
Dear vro, the patch looks good. cppcheck does not complain any more. Thanks for correcting! Unfortunately, I don't have any code using Voxel_ROctBoolDS at the moment. Currently, I have tested Voxel_BoolDS with Voxel_BooleanOperation and I can observe some problems (the results are not OK, visually) but haven't investigated that further. However, I might post some new bugs concerning this issue;) |
(0024073) Pawel (developer) 2013-04-10 12:33 |
No remarks, please test. |
(0024074) vro (developer) 2013-04-10 12:47 |
Hello Pawel, Any your remarks are welcome! Send them via this thread please as a feedback or somehow else as you prefer. By the way, all Voxel functionality is called by means of a set of draw-commands starting with "voxel*". In particular, the Voxel_ROctBoolDS class is called from voxelroctboolds draw-command (see ViewerTest::VoxelCommands.cxx if you are interested in). Have a good day, Vro. |
(0024107) Pawel (developer) 2013-04-12 13:04 |
A crash occurs in SetZeroSplitData when ~Voxel_ROctBoolDS() is called. There is something wrong here. I'll try to investigate. |
(0024118) Pawel (developer) 2013-04-12 15:05 |
I guess the afore mentioned crash is caused by something else so I propose to test. |
(0024134) apn (administrator) 2013-04-15 14:47 |
There are compile errors on Linux platform (on WNT everything is ok): ../../../src/Voxel/Voxel_ROctBoolDS.cxx: In member function 'void Voxel_ROctBoolDS::SetZero()': ../../../src/Voxel/Voxel_ROctBoolDS.cxx:103: error: invalid initialization of non-const reference of type 'Voxel_SplitData*&' from a temporary of type 'Voxel_SplitData*' ../../../src/Voxel/Voxel_ROctBoolDS.cxx:81: error: in passing argument 1 of 'void SetZeroSplitData(Voxel_SplitData*&)' |
(0024341) vro (developer) 2013-05-08 14:53 |
Dear Apn, Could you please try to recompile the Voxel package again on Linux? I redesigned it so that it should compile on any platform, I think so. The branch is CR23889 (same). Thanks in advance, Vro |
(0024676) apn (administrator) 2013-06-06 18:05 |
There is compile error on Linux platform again. ../../../../src/Voxel/Voxel_ROctBoolDS.cxx: In member function ‘void Voxel_ROctBoolDS::SetZero()’: ../../../../src/Voxel/Voxel_ROctBoolDS.cxx:103: error: lvalue required as left operand of assignment |
(0024731) apn (administrator) 2013-06-11 16:23 |
Compile error was fixed in branch CR23889 |
(0024742) apn (administrator) 2013-06-13 11:55 edited on: 2013-06-13 11:55 |
Dear BugMaster, Branch CR23889 (and products from GIT master) was compiled on Linux and Windows platforms and tested with rebase. SHA-1: 29e7cf28a254532b91caccdfe680747a8ffbb944 Number of compiler warnings: occt component : Linux: 2 (2 on master) Windows: 7 (7 on master) products component : Linux: 0 (0 on master) Windows: 63 (63 on master) Regressions: No regressions Improvements: No improvements Testing cases: Not needed Testing on Linux: Total MEMORY difference: 366393304 / 366250700 Total CPU difference: 39438.02000000052 / 43687.11000000146 Testing on Windows: Total MEMORY difference: 421861908 / 423428180 Total CPU difference: 37359.6875 / 31296.5 There are not serious differences in images found by testdiff. |
![]() |
|||
occt: master 799e4491
Timestamp: 2013-06-13 11:38:17 Author: vro [ Details ] [ Diff ] |
0023889: Assignment of function parameter has no effect outside the function. Voxel_ROctBoolDS::SetZeroSplitData() is modified to accept an address of a pointer to deleting data. Removal of a compilation error on Linux. Compile error on Linux platform was fixed |
||
mod - src/Voxel/Voxel_ROctBoolDS.cxx | [ Diff ] [ File ] | ||
![]() |
|||
Date Modified | Username | Field | Change |
2013-04-09 17:30 | Pawel | New Issue | |
2013-04-09 17:30 | Pawel | Assigned To | => bugmaster |
2013-04-09 17:38 | abv | Assigned To | bugmaster => vro |
2013-04-09 17:38 | abv | Status | new => assigned |
2013-04-10 08:59 | vro | Note Added: 0024063 | |
2013-04-10 08:59 | vro | Assigned To | vro => Pawel |
2013-04-10 08:59 | vro | Status | assigned => resolved |
2013-04-10 09:00 | vro | Note Added: 0024064 | |
2013-04-10 12:32 | Pawel | Note Added: 0024072 | |
2013-04-10 12:32 | Pawel | Assigned To | Pawel => bugmaster |
2013-04-10 12:33 | Pawel | Note Added: 0024073 | |
2013-04-10 12:47 | vro | Note Added: 0024074 | |
2013-04-10 13:25 | abv | Status | resolved => reviewed |
2013-04-12 13:04 | Pawel | Note Added: 0024107 | |
2013-04-12 13:04 | Pawel | Assigned To | bugmaster => Pawel |
2013-04-12 13:04 | Pawel | Status | reviewed => assigned |
2013-04-12 15:03 | Pawel | Status | assigned => resolved |
2013-04-12 15:05 | Pawel | Note Added: 0024118 | |
2013-04-12 15:05 | Pawel | Assigned To | Pawel => bugmaster |
2013-04-12 15:05 | Pawel | Status | resolved => reviewed |
2013-04-12 15:30 | Pawel | Relationship added | related to 0023899 |
2013-04-12 15:42 | apn | Assigned To | bugmaster => apn |
2013-04-15 14:47 | apn | Note Added: 0024134 | |
2013-04-15 14:49 | apn | Test case number | => Not needed |
2013-04-15 14:49 | apn | Assigned To | apn => vro |
2013-04-15 14:49 | apn | Status | reviewed => assigned |
2013-05-08 14:53 | vro | Note Added: 0024341 | |
2013-06-06 11:01 | vro | Assigned To | vro => apn |
2013-06-06 18:05 | apn | Note Added: 0024676 | |
2013-06-06 18:06 | apn | Assigned To | apn => vro |
2013-06-11 16:23 | apn | Note Added: 0024731 | |
2013-06-11 16:23 | apn | Status | assigned => resolved |
2013-06-13 10:49 | vro | Status | resolved => reviewed |
2013-06-13 11:55 | apn | Note Added: 0024742 | |
2013-06-13 11:55 | apn | Note Edited: 0024742 | View Revisions |
2013-06-13 11:56 | apn | Assigned To | vro => bugmaster |
2013-06-13 11:56 | apn | Status | reviewed => tested |
2013-06-14 12:18 | vro | Changeset attached | => occt master 799e4491 |
2013-06-14 12:18 | vro | Assigned To | bugmaster => vro |
2013-06-14 12:18 | vro | Status | tested => verified |
2013-06-14 12:18 | vro | Resolution | open => fixed |
2013-12-19 13:53 | bugmaster | Status | verified => closed |
2013-12-19 13:55 | bugmaster | Fixed in Version | => 6.7.0 |
Copyright © 2000 - 2021 MantisBT Team |