Announcements
Autodesk Community will be read-only between April 26 and April 27 as we complete essential maintenance. We will remove this banner once completed. Thanks for your understanding

Where to find add-in crash logs

ebowman8BK8J
Observer

Where to find add-in crash logs

ebowman8BK8J
Observer
Observer

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

0 Likes
Reply
291 Views
1 Reply
Reply (1)

Jorge_Jaramillo
Collaborator
Collaborator

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

1 Like