SOLVED VS 2012 complains -c4dplugin.pdb not included

Hi, I am trying to gradually get up to speed again, writing C++ plugins. I want to make my rather comprehensive set of tag plugins work again, I wrote this in 2013.
I made everything compile in VS 2012, and it runs fine in C4D R16 and R17, when I am not debugging.
However, when I try to debug for VS 2012, I consequently get this error when I add my tag to a C4D Object.

  1. Cinema 4D.exe has triggered a breakpoint
  2. c4dplugin.pdb not included
  3. Disassembly shows that it always breaks at instruction int 3

How can I move forward now? This happens consequently , and VIsual Studio enters into a dead-loop, showing the error message all the time. Making it impossible to debug my plugin.
I haven't set any breakpoints, whatsoever.
-Ingvarhas-triggered-breakpoint.jpgc4dplugin-no-symbols-loaded.jpgc4d-break-disassembly.jpg

Hi folks, I want to tell you that everything works fine now. I have no quick fix to post here, because it as a rather big endeavor.
The errors I had stem from migrating the old C4D R13 project upwards. A wrong linker path, a missing include path, then it compiles, but there is an illegal instruction etc. etc.
Several days of hard labor, now it works.
Thank you for your help, I will soon need more of it!

-Ingvar

That second screnshot shows a note on the bottom, you can go to the Options dialog and have it always show the disassembly for missing source files. And yes, Maxon does not hand out their debug files to 3rd party developers, and I wouldn't expect that. To debug that breakpoint, simply take a look into the Call Stack and see what the last function call in your code was, it usually gives you an idea what went wrong.

Cheers,
Frank

Hi and thank you for ypur reponse, Frank!
I wrote: I haven't set any breakpoints, whatsoever.
The question is, how comes Visual Studio thinks there is a breakpoint, where there is not breakpoint. Is something suspicious here cached somewhere? Is there file(s) I should delete, where (old) breakpoints are stored?

-Ingvar

Update:
There might be something wrong in my plugin, which causes this. Memory access error or the like. Which can make VS think that a breakpoint has been set. These things are hard to track down.. any hint where to look would be much appreciated.

-Ingvar

Hi,

This mean that Cinema4D as trigger a breakpoint. As Frank said, we don't provide our debug files to public so you will not see the private code. Looking at the call stack is your best option here to see what function on your tag is the source of the issue.

This breakpoint is not present if you are not debugging because they only break the code execution if a debugger is present.

Does this breakpoint happen when you add one of your tag on the scene? Is it possible to isolate the tag itself and simplify it so we can maybe have a look at what could go wrong?

Cheers,
Manuel

@m_magalhaes said in VS 2012 complains -c4dplugin.pdb not included:

Does this breakpoint happen when you add one of your tag on the scene?

Yes. Exactly then.
I am thankful for all help, and will come back. However, I will try to investigate this matter a little more on my own, before I share the code. I have a simple plugin which works, so I will try to compare them and thereby possible find the cause.
In any case I will publish my findings here.

-Ingvar

Hi everybody, I have investigated, and found out more.
In general, what happens, is that this "breakpoint" actually is a CRITICAL Stop.
The output window says:

p:\c4d_perforce_work\release\16.0\modules\c4dplugin\source\src\richard\genesis\ge_container.h(329): 
CRITICAL: Stop CINEMA 4D.exe has triggered a breakpoint.

There are several causes. It happens when

BaseLink* GetBaseLink(void)

is called, among other things. My plugin is rather big, so to say. Many tags, lots of classes and thousands of lines with source code. I wrote it back in 2013. And it works fine in the old C4D versions, compiled in VS 2010. It is the transition to the newer SKD which is making problems.
I have now, since my last post, made the plugin load, without problems, albeit with much of the functionality disabled (commented out). What I need now, is time to relearn the SDK, and relearn how the C4D plugin system works. And gradually transfer my source code so that it is compatible with newer SDK versions. So I am, step by step, trying to make it work again, by uncommenting code and run tests.
Be prepared for more questions from me 🙂
For my part, this case can be closed as solved.

-Ingvar

@ingvarai said in VS 2012 complains -c4dplugin.pdb not included:

ge_container.h(329)

it seems that you are trying to use GetBaseLink on a type that is not a DA_ALIASLINK or not initialized.

if (Type == DA_ALIASLINK) return DAliasLink;
if (Type != DA_NIL) CriticalStop();
return nullptr;

Cheers,
Manuel

In general, beakpoints in \modules\c4dplugin\source\src\richard\genesis\ge_container.h often get triggered when you use a Get() function to get a value that wasn't initialized with that very same type. E.g. initializing a container value in YourPlugin::Init() with bc->SetInt32(THE_ID, 123) and later getting the value with bc->GetBool(THE_ID) will probably trigger a breakpoint, too.

Sometimes you gotta play detective a bit, to interpret those breakpoints correctly, but in almost 100% of the cases, they indicate a problem in your code. Over time, you get a feeling for what the reason might be.

Cheers,
Frank

Hi folks, I want to tell you that everything works fine now. I have no quick fix to post here, because it as a rather big endeavor.
The errors I had stem from migrating the old C4D R13 project upwards. A wrong linker path, a missing include path, then it compiles, but there is an illegal instruction etc. etc.
Several days of hard labor, now it works.
Thank you for your help, I will soon need more of it!

-Ingvar

Hello @ingvarai,

we will set this topic to 'Solved' when there are no further questions or replies until Monday, November the 22th.

Thank you for your understanding,
Ferdinand