Cmb Posted June 24, 2019 Share Posted June 24, 2019 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, Quote Link to comment
Nicolas Goutte Posted June 24, 2019 Share Posted June 24, 2019 (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 June 25, 2019 by Nicolas Goutte Quote Link to comment
JBenghiat Posted June 24, 2019 Share Posted June 24, 2019 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. Quote Link to comment
Cmb Posted June 25, 2019 Author Share Posted June 25, 2019 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. Quote Link to comment
Recommended Posts
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.