R12+VS2005+FBX2010=Error C4263?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 07/02/2011 at 10:32, xxxxxxxx wrote:
Howdy,
Originally posted by xxxxxxxx
Oh just to mention, I used your project that you provided.
If you start from scratch and strip out all the code from a copy of the sdk project as I did, do you get the same errors?
Adios,
Cactus Dan -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 07/02/2011 at 10:38, xxxxxxxx wrote:
yes, even with a clean c4d sdk, as soon as I include the
#include "fbxsdk.h"I get the warnings and errors (of course I added the according lib and include paths to the settings beforehand)
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 07/02/2011 at 11:00, xxxxxxxx wrote:
Originally posted by xxxxxxxx
Howdy,
The question is what is it in the R12 sdk project that is different from the R9, R10 and R11 sdk projects, because those compile fine with the fbx library on Windows?
Is the built in fbx exporter compiled like a plugin, too? If I go to "resource/modules/fbx2010/" I see 2 files:
fbx2010.cdl
fbx2010.cdl64
Adios,
Cactus DanAs I said earlier in the thread: We don't encounter these warnings - and yes, we do use the same API (and compile plugins) like you do when creating those cdl/cld64 files.
There is no special api or sdk for Maxon developer - we're eating the same "dog food" If Matthias doesn't find a workaround for you in the next days, I'll have a look at it (but I'm currently too busy with other stuff...).
Best regards,
Wilfried
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 07/02/2011 at 11:32, xxxxxxxx wrote:
Howdy,
Thanks for the info, Wilfried.
Can the fact that I'm using std::vector to create lists of structures cause any issues.
A warning I was getting was this:
c:\program files\microsoft visual studio 8\vc\include\vector(1141) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
... which seems to be pointing to the vector include, so I turned on C++ exceptions in the Code Generation setting to get rid of that warning. Is that safe to do? That same setting change was made in my R9, R10 and R11 projects.
Adios,
Cactus Dan -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 08/02/2011 at 01:02, xxxxxxxx wrote:
Unfortunatly I am rather clueless regarding this issue. I can only confirm the problem. I made some comparisons between the 11.5x and 12.x SDK and found some small differences, for instance the default warning level was 3 in 11.5x where it is 4 in R12.x. In any case changing these settings made no difference. I am afraid we have to rely on Wilfried's help here.
Interesting is if you change the warning level to 4 in 11.5x how many warnings you will get by compiling the SDK examples, mostly for the API library though
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 08/02/2011 at 07:30, xxxxxxxx wrote:
Howdy,
Yeah, I noticed that difference in the warning level, too. In the R12 project I tried decreasing the warning level, but those warnings still showed. The project does compile without problems using the:
#pragma warning(disable : 4263 4264)
... but I also have a crashing in the R12 version of my plugin, and I don't know if that's contributing to it or not (because of my lack of experience) So, if I seem panicky about these warnings, that's the reason.
The bug report shows the crash happening inside a function in the fbx library, but I haven't been able to determine what is triggering the crash, because it won't crash when running the debugger.
If I can resolve the crash issue, then I probably won't be as worried about the warnings and using the pragma to turn them off.
Adios,
Cactus Dan -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 12/02/2011 at 12:04, xxxxxxxx wrote:
Howdy,
Well, I may have resolved the crash issue. I'm still testing, though.
It seemed like it would never crash the first time I imported a file, but it would crash the second or third time or sometimes even wait until the fifth time importing a file before it would crash.
I went through all of my code and found quite a few memory leaks, where I created memory for a char string in a separate function, and then wasn't freeing that memory in the calling function.
I fixed those and a couple of others, and now the importing of the files seems stable.
Is it possible that the memory leaks could've been the source of the crashes?
Adios,
Cactus Dan -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/02/2011 at 07:33, xxxxxxxx wrote:
Originally posted by xxxxxxxx
Howdy,
Yeah, I noticed that difference in the warning level, too. In the R12 project I tried decreasing the warning level, but those warnings still showed. The project does compile without problems using the:#pragma warning(disable : 4263 4264)
... but I also have a crashing in the R12 version of my plugin, and I don't know if that's contributing to it or not (because of my lack of experience) So, if I seem panicky about these warnings, that's the reason.
The bug report shows the crash happening inside a function in the fbx library, but I haven't been able to determine what is triggering the crash, because it won't crash when running the debugger.
If I can resolve the crash issue, then I probably won't be as worried about the warnings and using the pragma to turn them off.
Adios,
Cactus DanAnd here 's the answer to your questions.
Is this a bug in your source or Cinema's SDK?
- No.
Why does this happen when compiling with the r12 SDK, but not in older SDKs or with Autodesk's sample projects?
- r12 sets additional error checks and warnings in the file "DebugWin32.vsprops" which you find in the _api_lib-Folder. This file is inherited by projects based on the api/SDK samples. If you look in the VS properties for the project, you'll find a entry called "command line" in the compiler settings. Under this entry you find all command line options that are passed to the compiler.
The options that matter here are "/w44263" and "/we4264" which enable the checks (and treat it as an error). In the "command line" entry there is a text box, where you can enter additional options. If you enter these options (without the " !!) in Autodesk's own sample projects, you get (tada) the same error message you reveived in your plugin example.
How to fix it?
- As we can't fix AD's source, you can either disable these warnings in the project settings or the source like you did, or you can do that in an external include file which contains something like:
#ifdef __PC
#pragma warning (push)
#pragma warning (disable: 4263)
#pragma warning (disable: 4264)
#include <Autodesk's stuff >
#pragma warning (pop)
#endifThis way you still can utilize the enhanced warning and error checking level in your code.
Best regards,
Wilfried
P.S.: I have to give props to Win7's fantastic desktop search function, which seems to be unable to find something simple like the above in a text file on the hd...
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/02/2011 at 08:46, xxxxxxxx wrote:
Howdy,
Thanks for the info, Wilfried.
So, something like this?:
// fbx sdk includes #ifdef __PC #if API_VERSION > 11999 #pragma warning (push) #pragma warning(disable : 4263 4264) #include "fbxsdk.h" #pragma warning (pop) #else #include "fbxsdk.h" #endif #else #include "fbxsdk.h" #endif
Adios,
Cactus Dan -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/02/2011 at 08:53, xxxxxxxx wrote:
Originally posted by xxxxxxxx
Howdy,
Thanks for the info, Wilfried.
So, something like this?:[/DIV][DIV]// fbx sdk includes[/DIV][DIV]#ifdef __PC[/DIV][DIV] #if API_VERSION > 11999[/DIV][DIV] #pragma warning (push)[/DIV][DIV] #pragma warning(disable : 4263 4264)[/DIV][DIV] #include "fbxsdk.h"[/DIV][DIV] #pragma warning (pop)[/DIV][DIV] #else[/DIV][DIV] #include "fbxsdk.h"[/DIV][DIV] #endif[/DIV][DIV]#else[/DIV][DIV] #include "fbxsdk.h"[/DIV][DIV]#endif[/DIV][DIV]
Adios,
Cactus DanYou don't have to distinguish between r12 and older version, as its disabled by (compiler) default in older versions and it doesn't "hurt" if you disable it there too (with the pragmas).
Best regards,
Wilfried
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/02/2011 at 09:47, xxxxxxxx wrote:
Howdy,
OK, thanks Wilfried.
Well, I'm still having a crash issue when trying to import an fbx file on PC. The crash happens more often in R12 but it does also happen in R10 and R11.
I've recreated the crash in a test plugin that simply loads an fbx file into memory and destroys it, then displays an alert dialog saying that the file was loaded and destroyed.
Here is the simplified project folder with a test .fbx file and the c4d bug report included:
http://www.cactus3d.com/FBXSDK2010_Test_R12.zipThe crash seems to happen more often after booting the computer, running Cinema 4D and then calling the command. It doesn't crash the first time I call the command, but either the second or third time calling the command. If it makes it past the third time without crashing, I can then call the command 10+ times without crashing. The crash in the test plugin is happening in the same place as it is with my FBX import/export plugin. The bug report shows that the crash happens inside the fbx sdk library:
FBXSDK2010_Test_R12.cdl: 0F25A5D3 fbxsdk_20102::KFbxPropertyPage::FastFind FBXSDK2010_Test_R12.cdl: 0F25A6A3 fbxsdk_20102::KFbxPropertyPage::Find FBXSDK2010_Test_R12.cdl: 0F25B59B fbxsdk_20102::KFbxPropertyHandle::Find FBXSDK2010_Test_R12.cdl: 0F211D57 fbxsdk_20102::KFbxProperty::FindHierarchical FBXSDK2010_Test_R12.cdl: 0F26F784 fbxsdk_20102::KFbxIOSettings::GetProperty FBXSDK2010_Test_R12.cdl: 0F26F882 fbxsdk_20102::KFbxIOSettings::SetBoolProp FBXSDK2010_Test_R12.cdl: 0F3A5E5D fbxsdk_20102::KFbxReaderFbx6::ReadOptionsInExtensionSection FBXSDK2010_Test_R12.cdl: 0F3AA1CB fbxsdk_20102::KFbxReaderFbx6::GetReadOptions FBXSDK2010_Test_R12.cdl: 0F399D3E fbxsdk_20102::KFbxReaderFbx7::GetReadOptions FBXSDK2010_Test_R12.cdl: 0F20F90D fbxsdk_20102::KFbxImporter::GetImportOptions FBXSDK2010_Test_R12.cdl: 0F20FEDB fbxsdk_20102::KFbxImporter::GetTakeCount FBXSDK2010_Test_R12.cdl: 0F201215 TestCommand::LoadScene FBXSDK2010_Test_R12.cdl: 0F2013F8 TestCommand::Execute
... so I'm having a tough time trying to figure out what's triggering the crash. Since it has so far never crashed the first time calling the command, I thought maybe I'm doing something wrong in my code, like overwriting some memory or something, but I can't see anything wrong with even the simplified test plugin project.
Can anyone verify that it's crashing on your PC computer, too?
What's so frustrating about this is that the Mac versions of my plugin are working flawlessly. And at this point in the development, I simply want to get it ported over to PC.
Adios,
Cactus Dan -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/02/2011 at 10:46, xxxxxxxx wrote:
Originally posted by xxxxxxxx
Howdy,[...]... so I'm having a tough time trying to figure out what's triggering the crash. Since it has so far never crashed the first time calling the command, I thought maybe I'm doing something wrong in my code, like overwriting some memory or something, but I can't see anything wrong with even the simplified test plugin project.
Can anyone verify that it's crashing on your PC computer, too?
What's so frustrating about this is that the Mac versions of my plugin are working flawlessly. And at this point in the development, I simply want to get it ported over to PC.
Adios,
Cactus DanMake sure you call the Destroy() method of the fbx importer and exporter class (take care of the cancel case in the take class) and do it as soon as possible. Otherwise expect crashes (for further reasons why their SDK crashes -> ask AD...).
Best regards,
Wilfried
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/02/2011 at 11:22, xxxxxxxx wrote:
Howdy,
OK, thanks.
Autodesk's developer support could use some improvement.
Adios,
Cactus Dan -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 14/02/2011 at 02:15, xxxxxxxx wrote:
Thanks for looking into this, Wilfried.
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 16/02/2011 at 10:56, xxxxxxxx wrote:
Howdy,
Well, I think I may have found the solution to my crash problem, by simply backing off one version of the FBX SDK, going from 2010.2 to 2010.0.2. Using the earlier version of the FBX SDK on PC seems to make the plugin more stable, and I only had to change a couple of lines of code to accommodate the earlier version on PC. The Mac versions will still use 2010.2. I'm still testing it, so I won't know for sure if that solves the crash problem, but it's looking positive so far.
Thanks, everyone, for your help on this issue. Even though in the end I switched FBX SDK versions, at least trying to solve the issues with 2010.2 made me go back and optimize my own code.
Adios,
Cactus Dan