cnr-isti-vclab / meshlab

The open source mesh processing system
http://www.meshlab.net
GNU General Public License v3.0
4.8k stars 827 forks source link

Crash importing a particular OBJ file #116

Closed kring closed 7 years ago

kring commented 7 years ago
  1. Download the Dabrovic Sponza mesh from http://graphics.cs.williams.edu/data/meshes.xml. Direct download link: http://graphics.cs.williams.edu/data/meshes/dabrovic-sponza.zip
  2. Extract it somewhere on your system.
  3. Launch MeshLab and choose File -> Import Mesh.
  4. Select the extracted sponza.obj.
  5. MeshLab loads the mesh for a few seconds and then crashes.

image

This is MeshLab 2016.12 64-bit on an up-to-date Windows 10 system.

This mesh loads just fine in Meshlab v1.3.3 on the same system.

kring commented 7 years ago

Here's the call stack according to Visual Studio (though I doubt it's much use without symbols): image

Visual Studio also reports that the error is: Unhandled exception at 0x00007FF661758663 in meshlab.exe: 0xC0000005: Access violation reading location 0x0000026A36D1C01C.

kring commented 7 years ago

Another mesh on that same page (the Conference Room) loads successfully. But then if I go to Filters -> Remeshing, Simplification and Reconstruction -> Simplification: Quadric Edge Collapse Decimation, leave default settings and click Apply, the Simplifying progress bar gets all the way to 100% and then MeshLab crashes with a very similar callstack to the one above.

mcallieri commented 7 years ago

I believe it is the same issue of #91 that is due to an inconsistent texture mapping (some triangles have texture, some other does not). We are trying to fix it. However, these are NOT really 3d models, they are multi-object scenes, which are somehow borderline, considering the MeshLab architecture of (1 file -> 1 object) :). Finally, as the geometry has texture mapping, you should use the Quadric Edge Collapse Decimation (with texture) variant. It still crashes now, because of the inconsistency we need to fix, but this variant try to preserve mapping. If you do not need mapping, just export the layer without saving the UV mapping, and re-load the new mesh, without it.

kring commented 7 years ago

Thanks @mcallieri!

For what it's worth, I've been unable to use the "with texture" variant of Quadric Edge Collapse Decimation with models like this in the past for exactly the reason you mentioned: the mesh has textures for some triangles but not others, and so the "with texture" filter refuses to run. On the other hand, the non-texture Quadric Edge Collapse Decimation appears to work fine (at least in v1.3.3) and does at least a passable job of preserving texture mapping. It could be I just don't know what I'm missing!

jpryne commented 7 years ago

I'm crashing immediately upon clicking "Import mesh" without so much as selecting a file.

mcallieri commented 7 years ago

@jpryne let me guess... you have a DELL laptop. If so, there is an incompatibility of QT with a DELL backup software... http://en.community.dell.com/support-forums/software-os/f/3526/t/19634253 This is the only case in which we have encountered a crash as soon as you try to import/export a mesh.

jpryne commented 7 years ago

Almost. I have a Dell desktop. Is there a workaround?

On Mon, Mar 27, 2017 at 2:13 AM, Marco Callieri notifications@github.com wrote:

@jpryne https://github.com/jpryne let me guess... you have a DELL laptop. If so, there is an incompatibility of QT with a DELL backup software... http://en.community.dell.com/support-forums/software-os/f/ 3526/t/19634253 This is the only case in which we have encountered a crash as soon as you try to import/export a mesh.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/cnr-isti-vclab/meshlab/issues/116#issuecomment-289397325, or mute the thread https://github.com/notifications/unsubscribe-auth/ABbZ3Fdk2hW1dyZw08IncAiyw2LKcjGeks5rp32hgaJpZM4Mk5hR .

jpryne commented 7 years ago

Ah, apologies, I found the workaround in the thread you kindly provided. Best wishes-

On Mon, Mar 27, 2017 at 7:54 AM, Jack Pryne jack@pryne.com wrote:

Almost. I have a Dell desktop. Is there a workaround?

On Mon, Mar 27, 2017 at 2:13 AM, Marco Callieri notifications@github.com wrote:

@jpryne https://github.com/jpryne let me guess... you have a DELL laptop. If so, there is an incompatibility of QT with a DELL backup software... http://en.community.dell.com/support-forums/software-os/f/35 26/t/19634253 This is the only case in which we have encountered a crash as soon as you try to import/export a mesh.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/cnr-isti-vclab/meshlab/issues/116#issuecomment-289397325, or mute the thread https://github.com/notifications/unsubscribe-auth/ABbZ3Fdk2hW1dyZw08IncAiyw2LKcjGeks5rp32hgaJpZM4Mk5hR .

mcallieri commented 7 years ago

I hope is the same issue for you. It is an amazing bug, looks like black magic, and it is impossible to debug. Luckily, searching for some keywords, I found a forum where people were describing this exact issue (not about MeshLab, but another tool).

jpryne commented 7 years ago

I went into Visual Studio to debug, but it was way over my head, lol.

I uninstalled DBAR, and am up and running in Meshlab. Thanks very much for your help! Grazie molto!

On Mon, Mar 27, 2017 at 8:02 AM, Marco Callieri notifications@github.com wrote:

I hope is the same issue for you. It is an amazing bug, looks like black magic, and it is impossible to debug. Luckily, searching for some keywords, I found a forum where people were describing this exact issue (not about MeshLab, but another tool).

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/cnr-isti-vclab/meshlab/issues/116#issuecomment-289481176, or mute the thread https://github.com/notifications/unsubscribe-auth/ABbZ3DrUpwOqqkZGfl2DL8r6GfFDyFHCks5rp89sgaJpZM4Mk5hR .