hi,
i'm try to import a .fbx file from a windows 8.1 store app.
when i call FbxImport->Initialize the app fails (see error below)
any help would be appreciated
thx in advance
windows 8.1 x64
fbx sdk 2015.1 and visual studio 2013
C:\BF\FBX_PRJ_Win\Win\2015.1\src\fbxsdk\fileio\fbximporter.cxx(497) : [pid0] ASSERTION FAILED: Unexpected file type!
Debug Assertion Failed!
Program: ...pApp\x64\Debug\DirectxOpenFileCpp\AppX\DirectxOpenFileCpp.exe
File: C:\BF\FBX_PRJ_Win\Win\2015.1\src\fbxsdk\core\arch\fbxdebug.cxx
Line: 37
Expression: Unexpected file type!
char* filename = "C:\\Users\\gianluca\\Pictures\\humanoid.fbx";
// create a SdkManager
FbxManager* lSdkManager = FbxManager::Create();
// create an IOSettings object
FbxIOSettings* ios = FbxIOSettings::Create(lSdkManager, IOSROOT);
// create an empty scene
FbxScene* lScene = FbxScene::Create(lSdkManager, "");
// create an importer.
FbxImporter* lImporter = FbxImporter::Create(lSdkManager, "");
constchar* format = "FBX (*.fbx)";
int mReaderID = lSdkManager->GetIOPluginRegistry()->FindReaderIDByDescription(format);
// this returns true, mReaderID is zero
bool success= lSdkManager->GetIOPluginRegistry()->DetectReaderFileFormat(filename, mReaderID);
// Initialize fails
success = lImporter->Initialize(filename, mReaderID, lSdkManager->GetIOSettings());
I have the exact same issue too!
#include "pch.h" #include "SceneFBX.h" #include <fbxsdk.h> #include <fbxsdk/fileio/fbxiosettings.h> //#include "Common\DirectXHelper.h" using namespace DirectX; using namespace Windows::Foundation; SceneFBX::SceneFBX(): failed(NULL) { failed = LoadFBX(); } bool SceneFBX::LoadFBX() { FbxManager* g_pFbxSdkManager = nullptr; if (g_pFbxSdkManager == nullptr){
g_pFbxSdkManager = FbxManager::Create(); if (!g_pFbxSdkManager) {printf("ERROR %s : %d failed creating FBX Manager!\n", __FILE__, __LINE__); } FbxIOSettings* pIOsettings = FbxIOSettings::Create(g_pFbxSdkManager, IOSROOT); g_pFbxSdkManager->SetIOSettings(pIOsettings); } FbxImporter* lImporter = FbxImporter::Create(g_pFbxSdkManager, ""); const char* lFilename = "FILE.fbx"; bool lImportStatus = lImporter->Initialize(lFilename, -1, g_pFbxSdkManager->GetIOSettings()); if (!lImportStatus) {printf("Call to FbxImporter::Initialize() failed.\n"); printf("Error returned: %s\n\n", lImporter->GetStatus().GetErrorString());exit(-1); } FbxScene* lScene = FbxScene::Create(g_pFbxSdkManager, "myScene"); lImporter->Import(lScene); lImporter->Destroy(); return true; }
I USING A WIN_8.1 NATIVE D3D APP TO LOAD AN FBX SCENE AND I GET AN UNHANDLED EXCEPTION OUTSIDE MY CODE RELATING TO NTDLL.DLL,
ITS TRIGGER BY A CALL TO LdrShutdownThread
HERE IS THE OUTPUT FROM DEBUGGER:
'App7.exe' (Win32): Loaded 'C:\Users\Breandán\Documents\Visual Studio 2013\Projects\App7\Debug\App7\AppX\App7.exe'. Symbols loaded. 'App7.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntdll.dll'. Symbols loaded. 'App7.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel32.dll'. Symbols loaded. 'App7.exe' (Win32): Loaded 'C:\Windows\SysWOW64\KernelBase.dll'. Symbols loaded. 'App7.exe' (Win32): Loaded 'C:\Windows\SysWOW64\d2d1.dll'. Symbols loaded. 'App7.exe' (Win32): Loaded 'C:\Windows\SysWOW64\d3d11.dll'. Symbols loaded. 'App7.exe' (Win32): Loaded 'C:\Windows\SysWOW64\dxgi.dll'. Symbols loaded. 'App7.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ole32.dll'. Symbols loaded. 'App7.exe' (Win32): Loaded 'C:\Windows\SysWOW64\DWrite.dll'. Symbols loaded. First-chance exception at 0x77EEE052 (ntdll.dll) in App7.exe: 0xC0000135: Unable to Locate DLL. Unhandled exception at 0x77EEE052 (ntdll.dll) in App7.exe: 0xC0000135: Unable to Locate DLL.
Good morning,
I am running into the same issue ces.tino reported and I was wondering if a solution was ever found.
I am working with a Win8.1 Store app as well, using the 2016.0 Store Fbx SDK for VS2013. I started running through the "Your First FBX SDK Program" tutorial ( http://help.autodesk.com/view/FBX/2016/ENU/?guid=__files_GUID_29C09995_47A9_4B49_9535_2F6BDC5C4107_h... ) and right away ran into this. I thought at first it could just be the FBX files I had, but checking through all of the ones in the samples I had the same result: "Unexpected file type!"
DetectReaderFileFormat gives me 0 for the format, as did FindReaderIDByDescription.
GetFileVersion from the FbxImporter returns all zeros.
Thanks for any help!
We tracked this down locally to trying to have the SDK load a file from disk that had been selected with the Metro file picker. The picker allows access to locations the app is not allowed to load from, except with the WinRT APIs, probably due to that carrying permission from the user along from the file picker.
My solution has been to use the WinRT API to load the file into memory and then implement a simple FbxStream subclass that wraps the loaded buffer and allows reading from it.
Can't find what you're looking for? Ask the community or share your knowledge.