View Issue Details

IDProjectCategoryView StatusLast Update
0031132CommunityOCCT:Visualizationpublic2023-08-07 15:51
ReporterVico Liang Assigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionunable to reproduce 
Product Version7.4.0 
Target Version7.8.0 
Summary0031132: Visualization - Deactivate should not trigger Standard_ProgramError
DescriptionStack trace as below, Standard_ProgramError exception should not occur.

void AIS_InteractiveContext::Deactivate (const Handle(AIS_InteractiveObject)& theObj)
SelectMgr_ViewerSelector::Deactivate (const Handle(SelectMgr_Selection)& theSelection)
void SelectMgr_ToleranceMap::Decrement (const Standard_Integer& theTolerance)

Standard_ProgramError_Raise_if (*aFreq == 0, "SelectMgr_ToleranceMap::Decrement() - internal error");

Above codes will trigger Standard_ProgramError in some cases. Not always.

The file "deactivate throw.brep" has two wires, use Boolean fuse to unite these two wires to one. and then try to display and deactivate it. The first time should throw.
TagsNo tags attached.
Test case number

Relationships

related to 0030452 closedbugmaster Open CASCADE Visualization - SelectMgr_ViewerSelector::Deactivate() raises exception when called twice 

Activities

kgv

2019-11-05 18:35

developer   ~0088737

This is an assertion for invalid situation.
Reproducer is needed for analysis.

kgv

2019-11-05 18:54

developer   ~0088738

Please also specify OCCT version.

Vico Liang

2019-11-05 19:56

developer   ~0088739

Uploaded files and picture to help reproduce the issue. The version is testing on OCCT7.4.0 after enable exception build.

kgv

2019-11-06 14:36

developer   ~0088751

Steps to reproduce are incomplete - nothing happens with provided scenario.
pload MODELING VISUALIZATION
restore {deactivate throw.brep} b
explode b
bfuse r b_1 b_2
vclear
vinit View1
vdisplay r
vfit
vselmode r 0 0

Vico Liang

2019-11-09 05:30

developer   ~0088821

Dear kgv,
I found that this problem just occurs when there is dirty selection in context. The AIS_Object's shape is updated, but its selection is still in AIS_Context. We need to remove the old selection from AIS_Context before calling Deactivate. This might not be a bug of OCCT. it's a program issue should be avoided from coding. You can close this.
Thanks.

kgv

2019-11-11 11:20

developer   ~0088887

Good to hear, that you have found the problem at application side.

But we can keep the bug open, if you can prepare a reproducer and there are some doubts that this can be an OCCT bug.

Vico Liang

2020-03-14 07:58

developer   ~0090933

This issue happens, the stacktrace as below:

  #06 pc 0000000001473854 (SelectMgr_ToleranceMap::Decrement(int const&)+312)
  0000007 pc 00000000013c1054 (SelectMgr_ViewerSelector::Deactivate(opencascade::handle<SelectMgr_Selection> const&)+208)
  0000008 pc 00000000014711a8 (SelectMgr_SelectionManager::Remove(opencascade::handle<SelectMgr_SelectableObject> const&)+328)
  0000009 pc 00000000013fc294 (AIS_InteractiveContext::ClearGlobal(opencascade::handle<AIS_InteractiveObject> const&, bool)+644)
  #10 pc 00000000013fbf68 (AIS_InteractiveContext::Remove(opencascade::handle<AIS_InteractiveObject> const&, bool)+136)
  0000011 pc 0000000000abc0f0 (AIS_InteractiveContext::Remove2(opencascade::handle<AIS_InteractiveObject> const&)+20)
  #12 pc 0000000000af2550 (TPrsStd_AISPresentation::AISErase(bool)+76)
  0000013 pc 0000000000af27d0 (TPrsStd_AISPresentation::BeforeUndo(opencascade::handle<TDF_AttributeDelta> const&, bool)+200)

kgv

2020-03-17 18:05

developer   ~0090990

Do you have a reproducible code / script for the stack trace?

Vico Liang

2020-03-18 12:18

developer   ~0091014

the stack trace is from google app store console, I don't have code to reproduce the issue. i even can't reproduce it on my owne side. It occured rather freqently on user phone. I guess there may some issue on occt side.

dpasukhi

2023-08-02 02:12

administrator   ~0113837

Dear @bugmaster
please close the issue

Issue History

Date Modified Username Field Change
2019-11-05 18:32 Vico Liang New Issue
2019-11-05 18:32 Vico Liang Assigned To => kgv
2019-11-05 18:35 kgv Note Added: 0088737
2019-11-05 18:53 kgv Relationship added related to 0030452
2019-11-05 18:54 kgv Note Added: 0088738
2019-11-05 19:39 Vico Liang Product Version => 7.4.0
2019-11-05 19:51 Vico Liang File Added: deactivate throw.brep
2019-11-05 19:51 Vico Liang File Added: deactivate throw.jpg
2019-11-05 19:54 Vico Liang Description Updated
2019-11-05 19:56 Vico Liang Note Added: 0088739
2019-11-06 14:36 kgv Note Added: 0088751
2019-11-09 05:30 Vico Liang Note Added: 0088821
2019-11-11 11:20 kgv Note Added: 0088887
2019-11-11 11:21 kgv Assigned To kgv => Vico Liang
2019-11-11 11:21 kgv Status new => feedback
2019-11-11 11:21 kgv Resolution open => unable to reproduce
2020-03-14 07:58 Vico Liang Note Added: 0090933
2020-03-14 07:59 Vico Liang Assigned To Vico Liang => kgv
2020-03-14 07:59 Vico Liang Status feedback => assigned
2020-03-14 08:37 Vico Liang File Deleted: deactivate throw.jpg
2020-03-14 08:37 Vico Liang File Deleted: deactivate throw.brep
2020-03-17 18:05 kgv Note Added: 0090990
2020-03-17 18:05 kgv Assigned To kgv => Vico Liang
2020-03-17 18:05 kgv Status assigned => feedback
2020-03-18 12:18 Vico Liang Note Added: 0091014
2020-03-18 12:19 Vico Liang Assigned To Vico Liang => kgv
2020-09-21 17:42 kgv Target Version 7.5.0 => 7.6.0
2021-03-02 15:58 kgv Summary Visualization - Deactivate should not trigger Standard_ProgramError. => Visualization - Deactivate should not trigger Standard_ProgramError
2021-09-09 22:26 kgv Target Version 7.6.0 => 7.7.0
2022-10-05 14:44 szy Target Version 7.7.0 => 7.8.0
2022-10-19 15:47 smoskvin Assigned To kgv => vpozdyayev
2023-08-02 02:12 dpasukhi Assigned To vpozdyayev => bugmaster
2023-08-02 02:12 dpasukhi Note Added: 0113837
2023-08-07 15:51 vglukhik Status feedback => closed