Add-in which ran a couple days ago now crashes

manharXEA2X
Contributor

Add-in which ran a couple days ago now crashes

manharXEA2X
Contributor
Contributor

Hi all,

I wrote a script to automate creation of some geometry using Custom Events to speed things up. The code worked fine up until last week, but off late, it's been giving me ghost geometry, and some loops cause the whole thing to crash. The report I'm getting is:

Date/Time: 2022-01-28 12:15:15 +11:00
Application: Fusion360.exe
Error: Access violation - code c0000005 (first/second chance not available)
Crashed Module Name: NsGeometry10.dll
Exception Address: 0x00007ffacced7ced
Exception Code: c0000005
Exception Flags: 0

 

Does anyone know how to deal with this error? There has been news that Fusion has updated to a newer Python version which might cause errors with previous codes. Does this have anything to do with the error I'm getting? Any help would be appreciated! Do let me know if I should post any other information to help find the solution.

TIA!

0 Likes
Reply
Accepted solutions (1)
1,268 Views
3 Replies
Replies (3)

kandennti
Mentor
Mentor

Hi @manharXEA2X .

 

The version of Python used by the Fusion360API has not yet been upgraded. (Version 3.7.6)

I was told about it here.

https://forums.autodesk.com/t5/fusion-360-api-and-scripts/january-2022-notices-what-s-new-and-improv... 


Perhaps the cause is in another part of the system.

0 Likes

manharXEA2X
Contributor
Contributor

Yeah, the Fusion 360 Python interpreter is still on v 3.7.6, but they implemented the Add-in interface update, so I thought they might have changed some functionality to work on the new Python version, causing some crashes on v 3.7.6. I'm saying this because Fusion created another Python folder in the "Local" directory yesterday (6783e...).

0 Likes

manharXEA2X
Contributor
Contributor
Accepted solution

Okay, so I found the bug. It seemed to be the "adsk.doEvents()" command which was messing things up for me. Technically, it was supposed to pause the commands in my workflow to execute them in the Fusion 360 workspace, but that was not happening. Instead, it seemed to be re-running the loop in my Event Handler class method. I removed that line because  it wasn't really helping me out anyway, but I'd still like to know the reason for it doing that. Could anyone explain why?

0 Likes