Exception during draw: Sketch::checkGeoId. GeoId index out range.

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
leoheck
Posts: 617
Joined: Tue Mar 13, 2018 5:56 pm

Exception during draw: Sketch::checkGeoId. GeoId index out range.

Postby leoheck » Wed Dec 16, 2020 12:34 am

I have one Part Design Body that was good and now it is not being displayed. I haven't touched it for a while and I am trying to investigate what is causing this.

I am seeing this, maybe it is related. What does this exception mean?

Code: Select all

21:24:27  Exception during draw: Sketch::checkGeoId. GeoId index out range.

Code: Select all

OS: Ubuntu 20.04.1 LTS (ubuntu:GNOME/ubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Branch: unknown
Hash: b920bbf73a594881a807f7d7cf056fbc1e99f53a
Python version: 3.8.5
Qt version: 5.12.8
Coin version: 4.0.0
OCC version: 7.3.0
Locale: English/United States (en_US)
wmayer
Site Admin
Posts: 17321
Joined: Thu Feb 19, 2009 10:32 am

Re: Exception during draw: Sketch::checkGeoId. GeoId index out range.

Postby wmayer » Wed Dec 16, 2020 9:45 am

Abdullah has changed quite a lot in Sketcher recently and it might be a regression.
abdullah wrote: ping
abdullah
Posts: 4080
Joined: Sun May 04, 2014 3:16 pm

Re: Exception during draw: Sketch::checkGeoId. GeoId index out range.

Postby abdullah » Wed Dec 16, 2020 1:02 pm

leoheck wrote: Wed Dec 16, 2020 12:34 am I have one Part Design Body that was good and now it is not being displayed. I haven't touched it for a while and I am trying to investigate what is causing this.

I am seeing this, maybe it is related. What does this exception mean?

Code: Select all

21:24:27  Exception during draw: Sketch::checkGeoId. GeoId index out range.

Code: Select all

OS: Ubuntu 20.04.1 LTS (ubuntu:GNOME/ubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Branch: unknown
Hash: b920bbf73a594881a807f7d7cf056fbc1e99f53a
Python version: 3.8.5
Qt version: 5.12.8
Coin version: 4.0.0
OCC version: 7.3.0
Locale: English/United States (en_US)
May I get the offending sketch?

It is impossible to know what can be without it....
jmages
Posts: 4
Joined: Tue Dec 08, 2020 8:31 pm

Re: Exception during draw: Sketch::checkGeoId. GeoId index out range.

Postby jmages » Wed Dec 16, 2020 1:22 pm

I have the same error message once in a while when working with sketcher. But it is not reproducible. By repeating the last action the message does not appear again.

Code: Select all

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.23258 (Git)
Build type: Release
Branch: master
Hash: 78c6cc1362c39e3f1f778c52ae2a1c82badeec20
Python version: 3.8.6
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: German/Germany (de_DE)
abdullah
Posts: 4080
Joined: Sun May 04, 2014 3:16 pm

Re: Exception during draw: Sketch::checkGeoId. GeoId index out range.

Postby abdullah » Wed Dec 16, 2020 2:59 pm

leoheck wrote: Wed Dec 16, 2020 12:34 am I have one Part Design Body that was good and now it is not being displayed. I haven't touched it for a while and I am trying to investigate what is causing this.

I am seeing this, maybe it is related. What does this exception mean?

Code: Select all

21:24:27  Exception during draw: Sketch::checkGeoId. GeoId index out range.
This exception is thrown at ViewProviderSketch::draw, towards the middle-end of the very long function (line 5603). This draw() function is rather complex. It does something somewhere directly or indirectly calling the solver interface (sketch.cpp). This is the one generating the exception. My best guess is that the solver is not synchronised with SketchObject geometry. What causes it to be out of synchr is rather the bug (the root cause) and what needs to be investigated.

It is probably one line looking like:

Code: Select all

getSketchObject()->getSolvedSketch()
probably:

Code: Select all

getSketchObject()->getSolvedSketch().getPoint(
which internally calls the checkId() function.
jmages wrote: Wed Dec 16, 2020 1:22 pm I have the same error message once in a while when working with sketcher. But it is not reproducible. By repeating the last action the message does not appear again.
My hypothesis is that it gets back in sync. That exception is there to prevent the crashing, but to show something is not ok and should be fixed. Then it is important to be able to reproduce...
chrisb
Posts: 35366
Joined: Tue Mar 17, 2015 9:14 am

Re: Exception during draw: Sketch::checkGeoId. GeoId index out range.

Postby chrisb » Wed Dec 16, 2020 5:23 pm

abdullah wrote: Wed Dec 16, 2020 1:02 pm ...

Code: Select all

21:24:27  Exception during draw: Sketch::checkGeoId. GeoId index out range.
May I get the offending sketch?
I get it if I edit the sketch "Handle1" in the file "Hose Handle.FCStd" attached to this post.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
abdullah
Posts: 4080
Joined: Sun May 04, 2014 3:16 pm

Re: Exception during draw: Sketch::checkGeoId. GeoId index out range.

Postby abdullah » Wed Dec 16, 2020 6:38 pm

chrisb wrote: Wed Dec 16, 2020 5:23 pm
abdullah wrote: Wed Dec 16, 2020 1:02 pm ...

Code: Select all

21:24:27  Exception during draw: Sketch::checkGeoId. GeoId index out range.
May I get the offending sketch?
I get it if I edit the sketch "Handle1" in the file "Hose Handle.FCStd" attached to this post.
Thank you. This was very useful:
git commit 6c6f5e7fbffe5bd2c389839cfe1c2b08ffa5f194
leoheck
Posts: 617
Joined: Tue Mar 13, 2018 5:56 pm

Re: Exception during draw: Sketch::checkGeoId. GeoId index out range.

Postby leoheck » Thu Dec 17, 2020 9:04 am

abdullah wrote: Wed Dec 16, 2020 1:02 pm May I get the offending sketch?

It is impossible to know what can be without it...
Abdullah, sure, how do I know which is the offending Sketch?
Crisb was faster than me. Do you still need this Sketch?




OS: Ubuntu 20.04.1 LTS (ubuntu:GNOME/ubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Branch: unknown
Hash: 51189caba41a97fe5cf6b65c5828341b23aefff3
Python version: 3.8.5
Qt version: 5.12.8
Coin version: 4.0.0
OCC version: 7.3.0
Locale: English/United States (en_US)
abdullah
Posts: 4080
Joined: Sun May 04, 2014 3:16 pm

Re: Exception during draw: Sketch::checkGeoId. GeoId index out range.

Postby abdullah » Thu Dec 17, 2020 10:23 am

leoheck wrote: Thu Dec 17, 2020 9:04 am
abdullah wrote: Wed Dec 16, 2020 1:02 pm May I get the offending sketch?
Abdullah, sure, how do I know which is the offending Sketch?
Crisb was faster than me. Do you still need this Sketch?
That exception should only happen when you have one Sketch in Edit mode.

In order to streamline the bug fixes, it is better if you could test if the fix is working for your sketch. If it is not, then definitely I would like to have the sketch to see what is happening in that other case.
leoheck
Posts: 617
Joined: Tue Mar 13, 2018 5:56 pm

Re: Exception during draw: Sketch::checkGeoId. GeoId index out range.

Postby leoheck » Thu Dec 17, 2020 10:31 am

Sure! The issue is that I don't know which Sketch is that one since I don't always look at the report view. But at least you gave one way to look for it. Opening each sketch until seeing that message.