"16Standard_Failure Index" spamming report window.

About the development of the Part Design module/workbench. PLEASE DO NOT POST HELP REQUESTS HERE!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
freman
Veteran
Posts: 2214
Joined: Tue Nov 27, 2018 10:30 pm

"16Standard_Failure Index" spamming report window.

Post by freman »

For several months now I have been seeing the report window spammed with red letter error messages like the following.

Code: Select all

<Part> PartFeature.cpp(191): 16Standard_Failure Index out of bound: Unnamed#Sketch.Edge3
<Part> PartFeature.cpp(191): 16Standard_Failure Index out of bound: Unnamed#Sketch.Edge4
<Part> PartFeature.cpp(191): 16Standard_Failure Index out of bound: Unnamed#Sketch.Edge4
I am not aware of this causing further problems, so maybe it should not be showing up in the report window at all.

It seems that the cause of this needs to be determined and if it is an 'expected' error condition that it is suitably swallowed or fixed so that it does not constantly produce garbage in the report window. This is a problem since it desensitises the user to output which occurs there, which should be significant.

I recently failed to notice some significant output on another issue and realised that I had subconsciously started to tune out what appears in report window since it is often irrelevant junk. It also means I need to constantly clear the report window so that new error messages catch the eye instead of blurring into the background of existing bright red spam.

On the other hand, if this does represent a real problem, it probably needs fixing to prevent it flooding the report window.

The attached file produced the above output when I selected the three circles and added a diameter constraint.

thx.

OS: Fedora 31 (Thirty One) (LXDE/LXDE)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.19145 (Git)
Build type: Release
Branch: master
Hash: c43315728cc643c6a382af0bba5b596407bbaf26
Python version: 3.7.5
Qt version: 5.12.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United Kingdom (en_GB)


working further on this drawing :

Code: Select all

<Part> PartFeature.cpp(191): 16Standard_Failure Index out of bound: Unnamed#Sketch.Edge16
<Part> PartFeature.cpp(191): 16Standard_Failure Unsupported sub-shape type: Unnamed#Sketch.Constraint27
<Part> PartFeature.cpp(191): 16Standard_Failure Unsupported sub-shape type: Unnamed#Sketch.Constraint27
<Part> PartFeature.cpp(191): 16Standard_Failure Unsupported sub-shape type: Unnamed#Sketch.Constraint30
<Part> PartFeature.cpp(191): 16Standard_Failure Index out of bound: Unnamed#Sketch.Edge16
<Part> PartFeature.cpp(191): 16Standard_Failure Index out of bound: Unnamed#Sketch.Edge16
<Part> PartFeature.cpp(191): 16Standard_Failure Index out of bound: Unnamed#Sketch.Edge17
<Part> PartFeature.cpp(191): 16Standard_Failure Index out of bound: Unnamed#Sketch.Vertex27
<Part> PartFeature.cpp(191): 16Standard_Failure Index out of bound: Unnamed#Sketch.Vertex27
<Part> PartFeature.cpp(191): 16Standard_Failure Index out of bound: Unnamed#Sketch.Vertex26
<Part> PartFeature.cpp(191): 16Standard_Failure Index out of bound: Unnamed#Sketch.Edge18
<Part> PartFeature.cpp(191): 16Standard_Failure Index out of bound: Unnamed#Sketch.Edge18
<Part> PartFeature.cpp(191): 16Standard_Failure Index out of bound: Unnamed#Sketch.Vertex28
<Part> PartFeature.cpp(191): 16Standard_Failure Index out of bound: Unnamed#Sketch.Vertex29
<Part> PartFeature.cpp(191): 16Standard_Failure Index out of bound: Unnamed#Sketch.Vertex29
<Part> PartFeature.cpp(191): 16Standard_Failure Index out of bound: Unnamed#Sketch.Vertex30
<Part> PartFeature.cpp(191): 16Standard_Failure Index out of bound: Unnamed#Sketch.Edge19
<Part> PartFeature.cpp(191): 16Standard_Failure Index out of bound: Unnamed#Sketch.Edge19
<Part> PartFeature.cpp(191): 16Standard_Failure Index out of bound: Unnamed#Sketch.Vertex31
<Part> PartFeature.cpp(191): 16Standard_Failure Index out of bound: Unnamed#Sketch.Vertex29
<Part> PartFeature.cpp(191): 16Standard_Failure Index out of bound: Unnamed#Sketch.Vertex29
<Part> PartFeature.cpp(191): 16Standard_Failure Index out of bound: Unnamed#Sketch.Vertex38
<Part> PartFeature.cpp(191): 16Standard_Failure Index out of bound: Unnamed#Sketch.Edge18
<Part> PartFeature.cpp(191): 16Standard_Failure Index out of bound: Unnamed#Sketch.Edge18
<Part> PartFeature.cpp(191): 16Standard_Failure Index out of bound: Unnamed#Sketch.Edge19
<Part> PartFeature.cpp(191): 16Standard_Failure Index out of bound: Unnamed#Sketch.Edge18
<Part> PartFeature.cpp(191): 16Standard_Failure Index out of bound: Unnamed#Sketch.Vertex12
<Part> PartFeature.cpp(191): 16Standard_Failure Index out of bound: Unnamed#Sketch.Vertex12
<Part> PartFeature.cpp(191): 16Standard_Failure Index out of bound: Unnamed#Sketch.Vertex11
<Part> PartFeature.cpp(191): 16Standard_Failure Index out of bound: Unnamed#Sketch.Edge8
<Part> PartFeature.cpp(191): 16Standard_Failure Index out of bound: Unnamed#Sketch.Edge15
<Part> PartFeature.cpp(191): 16Standard_Failure Index out of bound: Unnamed#Sketch.Edge15
<Part> PartFeature.cpp(191): 16Standard_Failure Index out of bound: Unnamed#Sketch.Edge17
<Part> PartFeature.cpp(191): 16Standard_Failure Index out of bound: Unnamed#Sketch.Edge15
<Part> PartFeature.cpp(191): 16Standard_Failure Index out of bound: Unnamed#Sketch.Edge15
<Part> PartFeature.cpp(191): 16Standard_Failure Index out of bound: Unnamed#Sketch.Edge17
<Part> PartFeature.cpp(191): 16Standard_Failure Index out of bound: Unnamed#Sketch.Edge14
<Part> PartFeature.cpp(191): 16Standard_Failure Index out of bound: Unnamed#Sketch.Edge14
<Part> PartFeature.cpp(191): 16Standard_Failure Index out of bound: Unnamed#Sketch.Edge17
... like I said: spamming the report window.
Attachments
std-feature-index.FCStd
(4.03 KiB) Downloaded 48 times
User avatar
sliptonic
Veteran
Posts: 3460
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: "16Standard_Failure Index" spamming report window.

Post by sliptonic »

I'm also seeing this all the time now. Mostly when using reference geometry. Attaching a very simple file.

Just open the sketch and select the left vertex of the reference line
Attachments
standar_failure.FCStd
(9.36 KiB) Downloaded 37 times
User avatar
freman
Veteran
Posts: 2214
Joined: Tue Nov 27, 2018 10:30 pm

Re: "16Standard_Failure Index" spamming report window.

Post by freman »

Thanks for the confirmation. I was just giving a mate a crash course in FC to get him going, having recommended he use this excellent piece of open source software. He asked where he would see error messages is he made a mistake. It was embarrassing to have to explain that all this red letter spam in the report views is a bug but normally he needs to keep an eye on the important messages found there.

I was using a few reference lines too and I think you have isolated an important condition with this nice simple example.

BTW, I love the psychotic stare in your new avatar, that should stop anyone arguing back when you post.

It may frighten small children though. ;)
User avatar
sliptonic
Veteran
Posts: 3460
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: "16Standard_Failure Index" spamming report window.

Post by sliptonic »

freman wrote: Mon Mar 09, 2020 4:08 pm BTW, I love the psychotic stare in your new avatar, that should stop anyone arguing back when you post.

It may frighten small children though. ;)
Where do you think I perfected it?! As of this morning, it still works on teenagers.
User avatar
sliptonic
Veteran
Posts: 3460
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: "16Standard_Failure Index" spamming report window.

Post by sliptonic »

I've played a little more with this bug. I still don't understand it but it only occurs if the Path workbench has been loaded. Can you verify?
chrisb
Veteran
Posts: 54293
Joined: Tue Mar 17, 2015 9:14 am

Re: "16Standard_Failure Index" spamming report window.

Post by chrisb »

I cannot tell where or when, but I'm pretty sure to have seen this without Path being loaded. I will keep an eye on it.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
freman
Veteran
Posts: 2214
Joined: Tue Nov 27, 2018 10:30 pm

Re: "16Standard_Failure Index" spamming report window.

Post by freman »

I just swapped autoload to PartDesign, reopened your test file, double clicked to edit stetch. Indeed, no error.

I then open Path WB, then swap back to Part Design, open the sketch and get the error.

Just for sake of completeness, report view showed this on intially opening FC:
Wizard shaft module cannot be loaded

OS: Fedora 31 (Thirty One) (LXDE/LXDE)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.19591 (Git)
Build type: Release
Branch: 3D
Hash: 27771fc6ee93170b6ecb978ff4da438a5b9cfe97
Python version: 3.7.6
Qt version: 5.13.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United Kingdom (en_GB)
User avatar
freman
Veteran
Posts: 2214
Joined: Tue Nov 27, 2018 10:30 pm

Re: "16Standard_Failure Index" spamming report window.

Post by freman »

Try to constrain your RH vertex of solid line to X axis also gets an error:

<Part> PartFeature.cpp(191): 16Standard_Failure Unsupported sub-shape type: standar_failure#Sketch.H_Axis

Does not seem related to the construction line.
wmayer
Founder
Posts: 20319
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: "16Standard_Failure Index" spamming report window.

Post by wmayer »

sliptonic wrote: Mon Mar 09, 2020 11:23 pm I've played a little more with this bug. I still don't understand it but it only occurs if the Path workbench has been loaded. Can you verify?
Yes. The error message is triggered by the Path command Path_SelectLoop, i.e. by its IsActive() method. What it basically does on every selection change is:

Code: Select all

sel = FreeCADGui.Selection.getSelectionEx()[0]
sel.SubObjects
The requested sub-element name is Vertex3 which is part of a construction line and thus doesn't exist in the actual shape.

The call of "sel.SubObjects" invokes the function Part::Feature::getSubObject() that always prints an error message if a sub-element cannot be accessed.
The way how this function is implemented there is no way to handle an exception by a calling instance and this is bad programming practice because the function cannot decide on what context it is used. Instead if an exception occurs it should be forwarded to the calling instance.
wmayer
Founder
Posts: 20319
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: "16Standard_Failure Index" spamming report window.

Post by wmayer »

A quick fix for now: git commit a58ecba67

The error message has been degraded to a log message now. So, you shouldn't be bothered any more with a flood of meaningless error messages.
Post Reply