[Solved] FC Crashes after opening sketcher FC 0.20(Debug mode)

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: FC Crashes after opening sketcher FC 0.20(Debug mode)

Post by sgrogan »

MikeLemon wrote: Thu Sep 09, 2021 5:42 pm Yes python 3.9 though with QT5 installed I'm pretty sure.
Can you post the Help > About FreeCAD Info?

OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.25678 (Git)
Build type: Debug
Branch: master
Hash: 48c1738a533ac63527cf46018c773f0ebb03adfd
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.0
Locale: English/United States (en_US)

The above works for me without issue.
"fight the good fight"
User avatar
chennes
Veteran
Posts: 3914
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: FC Crashes after opening sketcher FC 0.20(Debug mode)

Post by chennes »

Oh, it's nothing to do with Python -- I think it's likely that error is actually my fault :oops: . I don't know exactly what's happening, but you're hitting a problem with the code that's trying to print out the error message related to overlapping keyboard shortcuts. I don't understand why it's happening, but that's a bit of code that only executes in Debug mode.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
MikeLemon
Posts: 52
Joined: Mon Aug 09, 2021 7:13 pm

Re: FC Crashes after opening sketcher FC 0.20(Debug mode)

Post by MikeLemon »

sgrogan wrote: Thu Sep 09, 2021 5:54 pm
MikeLemon wrote: Thu Sep 09, 2021 5:42 pm Yes python 3.9 though with QT5 installed I'm pretty sure.
Can you post the Help > About FreeCAD Info?

OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.25678 (Git)
Build type: Debug
Branch: master
Hash: 48c1738a533ac63527cf46018c773f0ebb03adfd
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.0
Locale: English/United States (en_US)

The above works for me without issue.
Looks similar only My FC and QT are a little older, Are you suppose to somehow pip update the FC's python package?
Do you update FC with just git clone?

OS: Windows 10 Version 2004
Word size of FreeCAD: 64-bit
Version: 0.20.25672 (Git)
Build type: Debug
Branch: master
Hash: 64775bf91f2ccd162b0994e50db7bd1bba02151b
Python version: 3.8.6+
Qt version: 5.15.1
Coin version: 4.0.1
OCC version: 7.5.0
Locale: English/United States (en_US)

chennes wrote: Thu Sep 09, 2021 7:57 pm Oh, it's nothing to do with Python -- I think it's likely that error is actually my fault :oops: . I don't know exactly what's happening, but you're hitting a problem with the code that's trying to print out the error message related to overlapping keyboard shortcuts. I don't understand why it's happening, but that's a bit of code that only executes in Debug mode.

Yes Correct only from debug, I wish I knew whats up barely built FreeCAD from source once...
User avatar
chennes
Veteran
Posts: 3914
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: FC Crashes after opening sketcher FC 0.20(Debug mode)

Post by chennes »

MikeLemon wrote: Fri Sep 10, 2021 7:31 am Yes Correct only from debug, I wish I knew whats up barely built FreeCAD from source once...
When you have a moment can you comment out lines 963-965 of Command.cpp and try again?

Code: Select all

961 void Command::printConflictingAccelerators() const
962 {
963     auto cmd = Application::Instance->commandManager().checkAcceleratorForConflicts(sAccel, this);
964     if (cmd)
965         Base::Console().Warning("Accelerator conflict between %s (%s) and %s (%s)\n", sName, sAccel, cmd->sName, cmd->sAccel);
966 }
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
MikeLemon
Posts: 52
Joined: Mon Aug 09, 2021 7:13 pm

Re: FC Crashes after opening sketcher FC 0.20(Debug mode)

Post by MikeLemon »

chennes wrote: Fri Sep 10, 2021 1:16 pm
MikeLemon wrote: Fri Sep 10, 2021 7:31 am Yes Correct only from debug, I wish I knew whats up barely built FreeCAD from source once...
When you have a moment can you comment out lines 963-965 of Command.cpp and try again?

Code: Select all

961 void Command::printConflictingAccelerators() const
962 {
963     auto cmd = Application::Instance->commandManager().checkAcceleratorForConflicts(sAccel, this);
964     if (cmd)
965         Base::Console().Warning("Accelerator conflict between %s (%s) and %s (%s)\n", sName, sAccel, cmd->sName, cmd->sAccel);
966 }
If you mean the one in FreeCADGui it was already uncommented.

What are you trying to see?
User avatar
chennes
Veteran
Posts: 3914
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: FC Crashes after opening sketcher FC 0.20(Debug mode)

Post by chennes »

MikeLemon wrote: Fri Sep 10, 2021 1:54 pm If you mean the one in FreeCADGui it was already uncommented.

What are you trying to see?
Right, I want you to comment it out -- I added that code last week, and I suspect it's causing your crash.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
MikeLemon
Posts: 52
Joined: Mon Aug 09, 2021 7:13 pm

Re: FC Crashes after opening sketcher FC 0.20(Debug mode)

Post by MikeLemon »

chennes wrote: Fri Sep 10, 2021 7:12 pm
MikeLemon wrote: Fri Sep 10, 2021 1:54 pm If you mean the one in FreeCADGui it was already uncommented.

What are you trying to see?
Right, I want you to comment it out -- I added that code last week, and I suspect it's causing your crash.
Yup hit the rebuild button after commenting the content of the function out but this still doesn't work with the same error:

Image

BTW congrats on the 1000th post
User avatar
chennes
Veteran
Posts: 3914
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: FC Crashes after opening sketcher FC 0.20(Debug mode)

Post by chennes »

MikeLemon wrote: Sat Sep 11, 2021 2:27 pm Yup hit the rebuild button after commenting the content of the function out but this still doesn't work with the same error:
Well, I guess that's good news for me, then, your crash isn't my fault after all ... not that it's any consolation to you, though! Can you paste in your complete backtrace here?
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
MikeLemon
Posts: 52
Joined: Mon Aug 09, 2021 7:13 pm

Re: FC Crashes after opening sketcher FC 0.20(Debug mode)

Post by MikeLemon »

chennes wrote: Sat Sep 11, 2021 7:34 pm
MikeLemon wrote: Sat Sep 11, 2021 2:27 pm Yup hit the rebuild button after commenting the content of the function out but this still doesn't work with the same error:
Well, I guess that's good news for me, then, your crash isn't my fault after all ... not that it's any consolation to you, though! Can you paste in your complete backtrace here?
OK, what backtrace do you need me to get you?
User avatar
chennes
Veteran
Posts: 3914
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: FC Crashes after opening sketcher FC 0.20(Debug mode)

Post by chennes »

The contents of the "Call Stack" portion of the Visual Studio window right after the program crashes. You should be able to Ctrl-A Ctrl-C and then paste it into a "code" block here.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
Post Reply