Failed to load mesh with assert


#1

Hi,

I’m trying to use the ‘orientation.mesh’ you provided (with the three axis and colors). When trying to use it in Nap, I get the following run-time assert at startup and the app crashes,

"[info] loading mesh: orientation.mesh
Assertion failed: (hasAvailable(length)), function read, file /Users/macbook/documents/Repositories/nap/utility/src/utility/memorystream.h, line 60.
(lldb) "

The resource is defined as follows inside the app structure json,

{
    "Type": "nap::MeshFromFile",
    "mID": "OrientationMesh",
    "Path": "orientation.mesh",
    "Usage": "Static"
},

Any ideas?


#2

Did you convert the fbx file I gave you or a derivative version of that?


#3

I downloaded it again and put it in the data folder, removing the cooked .mesh file, regenerating the project. Adding it to the json and running the app is enough to experience the crash on startup.

json extract,

{
    "Type": "nap::MeshFromFile",
    "mID": "OrientationMesh2",
    "Path": "orientation.mesh",
    "Usage": "Static"
},

#4

(it does produce the .mesh file though…)


#5

Weird, it can convert it but won’t read it. I’ll look into it later. Can you send me the fbx file? You should be able to add it as an attachment (zip file)


#6

Discourse doesn’t like it,

“Sorry, the file you are trying to upload is not authorized (authorized extensions: jpg, jpeg, png, gif, zip).”

Will send a zip file. :slight_smile:


#7

Archief.zip (36.7 KB)


#8

I ran a test with the example FBX model and was able to use it from the 0.2.3 packaged NAP framework.
However in our 0.2.3 source code based NAP project I get the exact same error message and not able to even load the mesh.

I did a diff on the generated mesh files and other than a generated mesh ID they were the same so it must be something with the loading.
I will run some tests with 0.3.0 once I get the chance and report back.

Any tips what else could I check to make 0.2.3 work in case we cannot jump on 0.3.0 immediately?


#9

Probably good to ask @marcel what he did to get it to work. Since we did not compile the package it’s hard for us to trace the root cause. It’s also worth considering exporting the fbx again from a 3D application such as Maya. Maya 2014 fbx compatibility mode (ASCII ) is what I normally use and never had any issues with. But there are other tools available

Maybe of interest: