Jump to content
Cmb

Get the program state via SDK ?

Recommended Posts

Hello,

 

I need to get the state of the execution of VW after loading my plugins. (if it crashed or executed well), when I build in Release.

 

Is there a way to know when the program exits ? Or it 's impossible to catch this event via the SDK ? Because of the COM mechanisms, the entry point is called multiple times and i'm not sure if we can know when it closes.

An idea was to try catch(...) all, but the sdk isn't using exceptions neither my plugins. Without writing own exceptions at plugins level, meybe there is another way to get a trace slighty like a debugger would do, but in Release ? (with .pdb, or crashdumpfile ? But how in the context of the SDK..)

 

Thank you very much for helping,

Share this post


Link to post
Posted (edited)

I think that at least very difficult to react pragmatically to a crash, as a crash is by definition a situation where a program does not know to do else than to abort its execution.

 

Assuming Windows: as for debugging a crash manually afterwards, well that is possible in your plug-ins if you keep them PDB files (of course you have to generate them, even in Release it is possible and you do not need to ship them to the customer. You indeed need the crash dump from the customer too (see his VW user folder). Of course, as it is your PDB file and the one of VW, you will have probably plenty of Vectorworks.exe+offset entries in the trace stack, but mostly it should not hinder you to fix a bug in your code.

 

(I am quite sure there was a good web page somewhere on MSDN how to debug with a dump file and a PDB file, however I cannot find that web site right now, sorry. It is already a few years back when we had to do it, because we could not reproduce a bug by ourselves.)

Edited by Nicolas Goutte

Share this post


Link to post

See here on setting up windows to debug: http://developer.vectorworks.net/index.php/SDK:Debugging_SDK_Plugins Plug-ins essentially run their own independent code, so you can still break and debug any of your own code even if VW is running in a release build.

 

If the issue is with VW or the SDK itself, debugging can be a little harder: you need to backtrace the break and see on what call you get an error. If you can reproduce an error in TesterModule, submit the modified TesterModule files in a bug report to VW.

 

To answer your original question — essentially no - your plug-in running at all is an indication that it loaded successfully.

Share this post


Link to post

Thanks to both of you for your answers.

 

For the moment, I have no success reading minidump files.

I'll try to know more about pdb and symbols to get something.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×
×
  • Create New...