help me with 3dsMax SDK developing!!!

Started by
7 comments, last by tomwindcloud 21 years, 8 months ago
Now i''m developing a plugin of 3dsMax, exporting MS''s x file. With 3dsMax SDK''s export sample, i can debug normally and i can set breakpoints. But when i use MS''s xskinexp source(a export plugin for x file), i can''t debug correctly. Why??? The error message is : "One or more breakpoints cannot be set and have been disabled. Execution will stop at the begginning of the program". When one can''t correctly set breakpoints, this maybe take place. But i have tried other breakpoint, all the result is same. Why?? help me!!!
Advertisement
are you using the debug version of maxsdk, this version is specifically meant for debugging plugins. setting your plugins active configuration to Debug alone will not let you debug ur code...(this is cuz the way max internally calls plugins. you can try posting this query in discreet''s plugin developers forum..)
There is no problem so complicated that it cannot be complicated further.
As what i say above, "with 3dsMax SDK''s export sample, i can debug normally and i can set breakpoints", so i think i do use the debug version of maxsdk. but "posting this query in discreet''s plugin developers forum" is a good idea. thanks
Take a look at the Max SDK documentation at the topic which covers setting up what they call a "Hybrid" configuration. The topic in the MAX SDK docs is "Creating a New Plug-In Project"

Modify the X file exporter so that there is a Hybrid configuration, then you should be able to debug properly (if you''re trying to set breakpoints on the release version then it won''t work - you *must* use the hybrid config)

--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com

Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site

As a matter of fact, i have seen the SDK documentation. I know that i must use "Hybrid" configuration and SDK''s sample use the "Hybrid" configuration. But
1) What is "Hybrid" configuration??
2) How to set "Hybrid" configuration??

thanks
towmindcloud
Ummm, as I suggested - RTFM! - For example:


In the standard Max R3.1 SDK documentation:
Plug-In Software Development Kit ->
Guidance ->
Writing Plug-In Applications ->
Creating a New Plug-In Project ->
Updating the Project Configurations

In the .CHM SDK documentation available from the sparks.discreet.com website:
Advanced Topics->
Creating a New Plug-In Project ->
Updating the Project Configurations



--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com

Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site

thanks all.
I read the documentation again. As the SDK''s "Creating a New Plug-In Project" say, i use the "hybrid" configuration. But i''m unfortunate, i still can''t debug the MS''s xskinexp source. Ha, i must meet a bad ghost.


tomwindcloud
ok...by default the 3dsmax sdk is in release mode. means the sdk which is shipped with 3dsmax is release mode sdk. if you wish to use a debug mode, you need to request for the same with discreet. they will send it to you after some verifications (?) ...
If you haven''t already done this, then you are probably using the release version of the sdk, which means not all the debugging tricks will work. (does anybody think i''m wrong?)

There is another trick you can do (ofcourse it is little time consuming, but i found this one more effective...), open a text file when the plugin is loaded. keep logging all the information you need to track into the file. don''t forget to do a flush (like fflush()) in the output buffer when ever you write something to the file, this ensures that all the data written to the file will be actually written just before 3dsmax crashes bcoz of some bug in your code . close the file when the plugin is unloaded (or else you can open and close your file inside the DoExport function also, ur call!).
this is the technique i use, and my config is in release mode always. i found this method satisfactory, cuz on a win2k system, 3dsmax crash doesn''t actually effect the system. you can start max again for another debugging session without any problem...

hope this helps...
There is no problem so complicated that it cannot be complicated further.
aanand_420:

I think you are thinking of the ADN (Autodesk Developer Network) [aka Discreet Sparks] version of 3DS Max where you get symbols and some source to the core of Max.

With the normal retail version of 3DS Max you don''t have the debug symbols or any source code for the core of Max and it''s base plugins. Therefore when debugging you can''t step into 3DS Max functions. However, with the retail version, since you *DO* have symbols and source code for your own plugin, you can place breakpoints and single step *your own plugin* . That''s the purpose of building your plugin with a "Hybrid" configuration.


tomwindcloud:

There are a few more things to try which came to mind, which IIRC are mentioned in the debugging section of the (admittedly unfriendly) docs.

1. Go to the settings for the Hybrid configuration

2. Under the General tab, set the "Output files:" box to the Plugins folder of 3DS Max (e.g. E:\3dsmax3_1\Plugins)

3. Under the Debug tab, select the General category and set the "Executable for debug session:" box to the path of the 3DS Max exe (e.g. E:\3dsmax3_1\3dsmax.exe)

4. Set the "Working directory:" box in the same pane to the plugins folder as with step 2

5. Select the "Additional DLLs" category.

6. Add a new entry to the list with the path and name of the plugin. (e.g. e:\3dsmax3_1\plugins\xskinexp.dle)

7. Under the Link tab, select "General", and enter the plugin path into the "Output file name:" box. (e.g. E:\3dsmax3_1\Plugins\XSkinExp.dle)

8. Set the active configuration to be Hybrid, Rebuild All, place breakpoints and hit F5 to start debugging.


The above is slightly different to the standard Hybrid config which I think assumes that you will add your Hybrid folder to the 3DS Max plugin search path.


--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com

Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site

This topic is closed to new replies.

Advertisement