Community
Fusion API and Scripts
Got a new add-in to share? Need something specialized to be scripted? Ask questions or share what you’ve discovered with the community.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Where to find add-in crash logs

1 REPLY 1
Reply
Message 1 of 2
ebowman8BK8J
121 Views, 1 Reply

Where to find add-in crash logs

I have a c++ add-in and it crashes before I can capture any break points in the code. Is there some place I can access a crash log to get an idea what's going on? 

 

Thanks!

Eric

1 REPLY 1
Message 2 of 2

Hi,

 

In my experience the C++ crashes are duo to bad memory management.

Fusion360 API calls commonly return objects, which need to be managed according to the objects types and checking they are not null before making any operation.  So, I'd suggest to always verify it is NOT NULL before accessing them, and make sure you are using the correct object type when received from a API call.

 

You can use:

adsk.core.Application.log(message, level, type)
with   type = adsk.core.LogTypes.FileLogType   to log messages to Fusion log file.
 
Using the text command "paths.get" you can know the current log file, looking for the key "AppLogFilePath" on that output:
wtallerdemadera_0-1661885861648.png

 

You can also write messages to some other log file, making sure you flushes it before making any new operation, so you could keep the message in the file before the process crashes.

 

Hope this help.

 

Regards,
Jorge

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report