No Symbols Loading for libfbxsdk.dll

No Symbols Loading for libfbxsdk.dll

Anonymous
Not applicable
2,987 Views
10 Replies
Message 1 of 11

No Symbols Loading for libfbxsdk.dll

Anonymous
Not applicable

Hi,

 

  I'm having issues where FbxImporter fails with its call to Create. However, I believe the actual problem goes back to FbxManager's call to Create, as, after calling this, I still see many of its fields as NULL. I also see written in many areas the message... "Information not available, no symbols loaded for libfbxsdk.dll".

 

  I'd like to know what is causing this and how to fix it to show any potential problems with the creation of the FbxManager (and if this in fact is causing problems later with using FbxImporter).

 

  Originally I had some trouble getting the project set up and compiling without errors, but all of this had been fixed for it to run. So I'm wondering why it's saying the symbols are not loaded for the dll. Is there an extra step in loading the symbols? If so, how would I do so?

 

Thanks for anyone's help in fixing this.

 

EDIT: On a completely different related subject - I'm also wondering why the first part of my email address is being used as my user name here instead of my name... Is this able to be changed?

0 Likes
2,988 Views
10 Replies
Replies (10)
Message 2 of 11

regalir
Autodesk
Autodesk

Up until the FBX SDK version 2020.0.2, we did not release the pdb files so the Debug libraries have the basic debug information (that is: the call stack) but no symbols. Starting with version 2020.0.2, the PDB files are available for download as a separate installer.

 

 

0 Likes
Message 3 of 11

Anonymous
Not applicable

Disregarding the PDB issues then, I see the failure is happening in FbxImporter::Initialize. The error message from GetStatus().GetErrorString() says "Unexpected file type". However, I am just following the sample code given, which passes '-1' as the file format. What else should this be set to, if this is the actual problem? Is "file type" different from "file format"?

0 Likes
Message 4 of 11

regalir
Autodesk
Autodesk

The error you are getting indicates that the importer is unable to recognize what is the file. Maybe it is a non supported format? Or you are using a Unicode/WideChar path.

 

All the strings in the FBX SDK are assumed (and expected) to be UTF-8 encoded so you need to convert any string that is not UTF-8 before using them. You can use the functions found in the fbxstring.h (shown below) or, if you already have your own, use them. As long as you can generate UTF-8 strings, you should be good to go.

void FbxUTF8ToWC(const char* pInUTF8, wchar_t*& pOutWideChar, size_t* pOutWideCharSize=NULL);
void FbxWCToUTF8(const wchar_t* pInWideChar, char*& pOutUTF8, size_t* pOutUTF8Size=NULL);
void FbxWCToAnsi(const wchar_t* pInWideChar, char*& pOutANSI, size_t* pOutANSISize=NULL);
void FbxAnsiToWC(const char* pInANSI, wchar_t*& pOutWideChar, size_t* pOutWideCharSize=NULL);
void FbxAnsiToUTF8(const char* pInANSI, char*& pOutUTF8, size_t* pOutUTF8Size=NULL);
void FbxUTF8ToAnsi(const char* pInUTF8, char*& pOutANSI, size_t* pOutANSISize=NULL);

 

0 Likes
Message 5 of 11

Anonymous
Not applicable

Thanks Regalir.

I had seen another post on these forums where the suggestion was to change the text to UTF-8. I had tried this using the following method...

 

CStringA utf8 = CW2A(L"box_test.fbx", CP_UTF8);

 

...But it did not fix the problem.

 

As for the methods provided by the FBX SDK, can you give me an example (ie. a few lines of code) using FbxAnsiToUTF8? I can't seem to get it to work properly.

0 Likes
Message 6 of 11

regalir
Autodesk
Autodesk

This should do the trick 😉

	int nArgs;
	LPWSTR *szArglist = CommandLineToArgvW(GetCommandLineW(), &nArgs);

	wchar_t *source_path_WC      = szArglist[1];
	wchar_t *destination_path_WC = szArglist[2];

	// convert to UTF8
	char *source_path_UTF8;
	FbxWCToUTF8( source_path_WC, source_path_UTF8 ); 
	FbxString lSourceFileName(source_path_UTF8);
	FbxAutoFreePtr<char> lsp(source_path_UTF8);

	char *destination_path_UTF8;
	FbxWCToUTF8( destination_path_WC, destination_path_UTF8 );
	FbxString lDestFileName(destination_path_UTF8);
	FbxAutoFreePtr<char> ldp(destination_path_UTF8);

 

0 Likes
Message 7 of 11

Anonymous
Not applicable

Unfortunately I'm having the same issue. I've adapted your code to fit mine in a temporary way for testing. Below is how. Do you see anything not correct?

 

LPWSTR szArglist = L"box_test.fbx";

		wchar_t* source_path_WC = szArglist; // [1] ;
		//wchar_t* destination_path_WC = szArglist[2];

		// convert to UTF8
		char* source_path_UTF8;
		FbxWCToUTF8(source_path_WC, source_path_UTF8);
		FbxString lSourceFileName(source_path_UTF8);
		FbxAutoFreePtr<char> lsp(source_path_UTF8);


		//FbxAnsiToUTF8(_file_name, utf8, size);

		// Create the IO settings object.
		FbxIOSettings* ios = FbxIOSettings::Create(fbx_sdk_manager, IOSROOT);
		fbx_sdk_manager->SetIOSettings(ios);

		// Create an importer using the SDK manager.
		FbxImporter* lImporter = FbxImporter::Create(fbx_sdk_manager, "");

		// Use the first argument as the filename for the importer.
		if (!lImporter->Initialize(lsp, -1, fbx_sdk_manager->GetIOSettings()))
		{
			printf("Call to FbxImporter::Initialize() failed.\n");
			std::string error_message = lImporter->GetStatus().GetErrorString();
			printf("Error returned: %s\n\n", lImporter->GetStatus().GetErrorString());
			exit(-1);
		}

 

I also tried passing "lSourceFileName" to Initialize, in case I wasn't suppose to pass lsp. Again, though, the same error message regardless.

0 Likes
Message 8 of 11

regalir
Autodesk
Autodesk

Your code looks okay. Which bring up the following question: is the 'box_test.fbx' file located in the correct place relative to the executable? If you are running through the debugger, maybe the Working directory and the Output directory do not match so the executable is simply unable to locate the file.  You can try to define szArgList with an absolute path just to make sure that the file can be located.

 

If you validate that the file can, indeed, be properly located by the executable, then the problem may be a bit deeper.

  1. could it be that the file is actually not a true FBX file?  Or can it be corrupted?
  2. Maybe, despite the fact that you managed to compile your program, some flags are incompatible and there is an executable issue? Have you tried to simply compile the ImportScene sample using the provided CMake rules? The "samples/README.txt" shows how you can generate the VisualStudio solution for the ViewScene but all the other samples are following the exact same recipe 😉 If you are on a Unix system, generating the makefile is as easy, just replace the generator with the "Unix Makefiles".

 

0 Likes
Message 9 of 11

Anonymous
Not applicable

Thanks for the suggestions Regalir.

 

Before I had tried supplying an absolute path to my fbx file and it didn't work. I've tried again with the current state of my code and unfortunately it still gives the same error.

If I were to try changing the file name to something else, I get an error that says the file couldn't be opened, so I think it is in fact opening it so as to then give the error "unexpected file type".

 

I've tried opening multiple fbx files and am currently just testing with a simple box created in Maya LT. To me it does not look like it is corrupted or in any way complex so as to give reason for problems like this.

 

As for trying Autodesk's provided samples - I have never used CMake. I looked into it but it seemed like a rabbit hole in trying to get it to work. From my memory I needed to have something installed before installing whatever I needed to run it, and to me it all led to a circular dependency of installs to the point that I became irritated and abandoned the idea of ever using CMake - lol.

CMake does seem to be used in some areas I deal with, so maybe I need to force myself to take the time and figure it out. If possible though, I'd like to do this only as a last resort.

0 Likes
Message 10 of 11

regalir
Autodesk
Autodesk

It has been a long time since I had to install CMake, but I don't remember it being too hard. At most, you need to make sure that the environment variables are properly set so that CMake can find the compilers (I assume you are working with VisualStudio), which should be easy enough if you run CMake from a 'Developer Command Prompt' console.

 

For your reference, here are the "command line" arguments of the ImportScene sample as viewed inside the VisualStudio project for x64 Debug targets:

 

static library (/MD)

"C/C++"

/GS /W4 /Zc:wchar_t /I"C:\temp\sdk\2020.2.2\include" /I"C:\temp\sdk\2020.2.2\samples\Common" /Zi /Gm- /Od /Ob0 /Fd"ImportScene.dir\Debug\vc141.pdb" /Zc:inline /fp:precise /D "WIN32" /D "_WINDOWS" /D "CMAKE_INTDIR=\"Debug\"" /D "_MBCS" /errorReport:prompt /WX- /Zc:forScope /RTC1 /GR /Gd /MDd /Fa"ImportScene.dir\Debug\" /EHsc /nologo /Fo"ImportScene.dir\Debug\" /Fp"ImportScene.dir\Debug\ImportScene.pch" /diagnostics:classic 

"Linker"

/OUT:"C:\temp\sdk\2020.2.2\bin\vs2017-md\Debug\ImportScene.exe" /MANIFEST /NXCOMPAT /PDB:"C:/temp/sdk/2020.2.2/bin/vs2017-md/Debug/ImportScene.pdb" /DYNAMICBASE "C:\temp\sdk\2020.2.2\lib\vs2017\x64\Debug\libfbxsdk-md.lib" "C:\temp\sdk\2020.2.2\lib\vs2017\x64\Debug\libxml2-md.lib" "C:\temp\sdk\2020.2.2\lib\vs2017\x64\Debug\zlib-md.lib" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "comdlg32.lib" "advapi32.lib" /IMPLIB:"C:/temp/sdk/2020.2.2/bin/vs2017-md/Debug/ImportScene.lib" /DEBUG /MACHINE:X64 /INCREMENTAL /PGD:"C:\temp\sdk\2020.2.2\bin\vs2017-md\Debug\ImportScene.pgd" /SUBSYSTEM:CONSOLE /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /ManifestFile:"ImportScene.dir\Debug\ImportScene.exe.intermediate.manifest" /ERRORREPORT:PROMPT /NOLOGO /TLBID:1 

 

Dynamic library

"C/C++"

/GS /W4 /Zc:wchar_t /I"C:\temp\sdk\2020.2.2\include" /I"C:\temp\sdk\2020.2.2\samples\Common" /Zi /Gm- /Od /Ob0 /Fd"ImportScene.dir\Debug\vc141.pdb" /Zc:inline /fp:precise /D "WIN32" /D "_WINDOWS" /D "FBXSDK_SHARED" /D "CMAKE_INTDIR=\"Debug\"" /D "_MBCS" /errorReport:prompt /WX- /Zc:forScope /RTC1 /GR /Gd /MDd /Fa"ImportScene.dir\Debug\" /EHsc /nologo /Fo"ImportScene.dir\Debug\" /Fp"ImportScene.dir\Debug\ImportScene.pch" /diagnostics:classic 

"Linker"

/OUT:"C:\temp\sdk\2020.2.2\bin\vs2017\Debug\ImportScene.exe" /MANIFEST /NXCOMPAT /PDB:"C:/temp/sdk/2020.2.2/bin/vs2017/Debug/ImportScene.pdb" /DYNAMICBASE "C:\temp\sdk\2020.2.2\lib\vs2017\x64\Debug\libfbxsdk.lib" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "comdlg32.lib" "advapi32.lib" /IMPLIB:"C:/temp/sdk/2020.2.2/bin/vs2017/Debug/ImportScene.lib" /DEBUG /MACHINE:X64 /INCREMENTAL /PGD:"C:\temp\sdk\2020.2.2\bin\vs2017\Debug\ImportScene.pgd" /SUBSYSTEM:CONSOLE /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /ManifestFile:"ImportScene.dir\Debug\ImportScene.exe.intermediate.manifest" /ERRORREPORT:PROMPT /NOLOGO /TLBID:1 

 

0 Likes
Message 11 of 11

Anonymous
Not applicable

Thanks for those details. I think I have enough information now for whatever steps I take next.

 

I also have just found out that there's an FBX export option to have the format as either Binary or ASCII. If I choose ASCII I can just parse the file myself.

 

So thanks very much for your help Regalir. I appreciate it. If I have any further questions I'll post here or maybe consider creating a new thread with a more apt title.

0 Likes