MSVCDebugTool + When to use Free()
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 06/02/2003 at 07:19, xxxxxxxx wrote:
I'm not sure what the "debug tool" is I'm afraid. Do you have MSVC++ 6? in the Build menu there should be Start Debug?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 06/02/2003 at 07:46, xxxxxxxx wrote:
The SDK documentation contains hints about pointer ownership. For example, under BaseDocument::InsertObject() it says for the parameter op: "Object to insert into the document. The document takes over the ownership of the pointed object.". You only need to Free() pointers that you own.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 06/02/2003 at 08:04, xxxxxxxx wrote:
Hi Klaus,
I'm using VC7 and so I don't know if the following applies to your IDE. To use the debugger I simply select the "DEBUG" configuration (see SDK examples). There I fill the property option "command" with the executable of Cinema4D (e.g. "..\..\..\CINEMA_4D.exe" - my plugin directory is always "...\MAXON\CINEMA_4D_R8\Plugins<Pluginname>"). Then you set a breakpoint and start the debugger via shortcut F5 or -> Debugging -> Start.
I have to admit that I was really amazed how great it worked - didn't expect that.Ciao,
Marcus -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 06/02/2003 at 08:46, xxxxxxxx wrote:
OK, now it stops at my breakpoints. But I'll get no c++ code window! Assembler only. When I start Debug (F5), I'll get the message: "CINEMA_4D.exe contains no debug information" (or similar, I'm using a german VC6). The "Debug Info" option of the project property dialog/Linker is checked.
I'm also wondering, that it stops at my breakpoint (inside Execute() of my expression plugin) before I'll get a view onto cinema. How can Cinema execute my plugin, before I use it?
Marcus: Du meinst "Projekteinstellungen, Tab Debug, "Ausführbares Programm für Debug-Sitzung"? Da habe ich CINEMA_4D.exe eingetragen. Es wird ja auch gestartet. Die anderen drei Felder sind leer.(?).
Sorry for this german include about the german terms of the vc6 gui. -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 06/02/2003 at 09:03, xxxxxxxx wrote:
You have to set debug option in compiler options and in linker options. The settings of the SDK examples (configuration "DEBUG") should work for you.
My debug-related settings (perhaps different from VC6) are:Debuggen:
-> Befehl = "..\..\..\CINEMA_4D_R8"
-> Arbeitsverzeichnis = "..\..\.."
-> Debuggertyp = "Automatisch"C/C++:
-> Allgemein
--> Debuginformationsformat = "&Programmdatenbank; zum Bearbeiten und Fortfahren"
-> Präprozessor
--> Präprozessordefinitionen = "WIN32;__PC;_DEBUG;_WINDOWS"
-> Codeerstellung
--> Laufzeitbibliothek = "Multithreaded-Debug"Linker:
-> Eingabe
--> Zusätzliche Abhängigkeiten = "_api_r8_deb.lib"
-> Debuggen
--> Debuginfo generieren = "Ja"
--> Programmdatenbank-Datei erstellen = "$(OutDir)$(ProjectName).pdbI think the last option activates the generation of a symbol file which the debugger uses for code display.
Ciao,
Marcus -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 06/02/2003 at 09:40, xxxxxxxx wrote:
Thanks. I'm really confused. I deleted all breakpoints, but when i start debugging (F5), I always get the same assembler code break with the message: "User defined breakpoint called from source at 0x77f9eea9." (I have no breakpoints set!).
I switched to the api-v8 project, set the configuration to Debug, build it. Switched back to cinema4dsdk project, did the same. I always get the result described above!
Maybe, I have to try finding bugs without debugger support. -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 06/02/2003 at 10:31, xxxxxxxx wrote:
Where did you place your breakpoint?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 07/02/2003 at 02:41, xxxxxxxx wrote:
In my first attepts I set a breakpoint at the beginning of the ::Execute(PluginTag *tag, BaseDocument *doc,...) function in the cpp window if vc6. Then I deleted all breakpoints, but it stops - don't know where exactly - all the same here:
77F9EEA9 int 3
77F9EEAA ret
77F9EEAB int 3
77F9EEAC ret
77F9EEAD mov eax,dword ptr [esp+4]
77F9EEB1 int 3
77F9EEB2 ret 4
77F9EEB5 mov eax,dword ptr [ebp-14h]
...
Oh, I see: "Context" is NTDLL! 77f9eea9()
Why does the debugger stop in a system dll? -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 07/02/2003 at 03:33, xxxxxxxx wrote:
Perhaps the load process of your plugin is crashing, the debugger sees this and begins to debug. If you want to step to the next breakpoint, simply click on "Starten" (F5) again. You should get an error message some time.
Or perhaps you should check your debugger settings (Extras -> Optionen... -> Debugger).
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 07/02/2003 at 03:56, xxxxxxxx wrote:
I may click on "Starten" as much as I want. It always stops at the same point described above.
The output window (debug tab) lists all dlls that are loaded. The ntdll.dll is the first one, and the break is obviously in the ntdll.dll. So maybe I have to set an entry point (like it is "main()" in a standalone exe). In the project properties dialog under the linker tab I found an input field "Symbol für Einstiegspunkt" (symbol for entry point), but I don't know what kind of data this input accepts. I tried to type in <pluginname>.cdl, but then I got linker errors (symbol can't be resolved or similar). The windows context help says about this field: "Into this field you may input a start address for an executable file or a DLL". Don't know what "start address" means in this context.
These are the main settings in the Options dialog under Debug:
Source code notes (Quellcodeanmerkung) : CHECKED
Code Bytes: UNCHECKED
Symbols: CHECKED
Just in Time-Debugging: CHECKED
OLE RPC-Debugging: CHECKED
Debug Commands call Edit and Continue: CHECKED -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 07/02/2003 at 04:07, xxxxxxxx wrote:
Does your plugin load correctly if you don't use the debugger? To test it just put a GePrint("test") in your PluginStart() function.
Meanwhile I'll try to get the same behaviour as you.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 07/02/2003 at 04:18, xxxxxxxx wrote:
Yes. In the meantime I found the main bug that had let C4D crashed and now the plugin runs if I call it from c4d. But it doesn't do exactly what I want and so a debugger would be very helpful. Since I cannot compile while c4d is running, I have to restart c4d for every new try
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 07/02/2003 at 04:28, xxxxxxxx wrote:
Hmm, sorry I have noe ideas anymore. I couldn't reproduce the behaviour of your debugger. Perhaps the NTDLL.dll has a breakpoint set? Which OS do you use, what is the file size and version of yout NTDLL.dll?
Perhaps you can send me your project and workspace files (without sources) so that I can test them.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 07/02/2003 at 11:19, xxxxxxxx wrote:
IT RUNS!
Maybe it was only the ntdll.dll of windows 2000 that breaks. On win xp everything is ok!
thanks to all for your support. I hope I can help users too in the near future -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 07/02/2003 at 14:49, xxxxxxxx wrote:
Hey great. :))
Just try to install the Service Pack 2 for Windows 2000. This way the ntdll.dll should be updated. My one has a newer version number.
Happy hacking. Ciao,
Marcus -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 10/02/2003 at 03:59, xxxxxxxx wrote:
YES! I've installed Service Pack 3 and now it works also on Win 2000. I transfered the whole directory of my plugin from xp to win 2000 and I only have to adjust the path to cinema_4d.exe!
Thanks again!