EdyJ / blender-to-unity-fbx-exporter

FBX exporter addon for Blender compatible with Unity's coordinate and scaling system.
MIT License
947 stars 98 forks source link

Blender 2.83 quits after exporting. #4

Closed boeremak closed 3 years ago

boeremak commented 4 years ago

Hi,

I am trying your exporter, but it crashes with my model. At the end I get an segmentation fault.

`FBX export prepare: Wrapping Objects... Done (0.015395 sec)

FBX export prepare: Wrapping Data (lamps, cameras, empties)... Done (0.000637 sec)

FBX export prepare: Wrapping Meshes... Done (0.002220 sec)

FBX export prepare: Wrapping ShapeKeys... Done (0.000052 sec)

FBX export prepare: Wrapping Armatures... Done (0.000227 sec)

FBX export prepare: Wrapping World... Done (0.000081 sec)

FBX export prepare: Wrapping Materials... Done (0.001132 sec)

FBX export prepare: Wrapping Textures... Done (0.000772 sec)

FBX export prepare: Wrapping Animations... Done (0.000346 sec)

FBX export prepare: Generating templates... Done (0.000075 sec)

FBX export prepare: Generating Connections... Done (0.005486 sec)

FBX export fetch empties (31)... Done (0.000445 sec)

FBX export fetch lamps (0)... Done (0.000020 sec)

FBX export fetch cameras (0)... Done (0.000037 sec)

FBX export fetch meshes (201)... Done (0.759288 sec)

FBX export fetch objects (326)... Done (0.059263 sec)

FBX export fetch remaining... Done (0.001688 sec)

FBX export fetch animations... Done (0.000027 sec)

export finished in 0.9175 sec. Writing: /tmp/Lider.crash.txt Segmentation fault (core dumped) `

This is on Blender 2.83.

The writing of the file seems to work, but after that Blender just quits.

EdyJ commented 4 years ago

Please provide a simple repro file that causes the problem, otherwise I couldn't do anything about it (and the case would be closed as "can't reproduce").

EdyJ commented 4 years ago

The user has provided a repro file privately. The issue can't be reproduced in Blender 2.81. I'll check the issue again when I update Blender to the latest version.

EliasMasche commented 4 years ago

Any update on the progress, Downloaded a model for importing into Unity, When the export is finished just blender crash/close itself without any error. fbx model is correctly loaded into Unity. And the addon is auto disabled Blender 2.83.0 as 2.83.3 in both tested, both close after exported model.

TomBina commented 3 years ago

@EdyJ any updates on this?

EdyJ commented 3 years ago

Sorry no, I'm still on 2.81. Will test it when I upgrade.

EdyJ commented 3 years ago

I've reproduced the issue. It happens with the provided file but not with others, so the file may contain some specific feature or side-case that triggers the crash with the plugin.

I can't tell if/when this will be addressed because the provided file is quite large and contains many objects arranged in different ways. Currently I don't have time I could spend on isolating the issue. If you could provide the simplest possible file that causes the error, that would hugely help me to pinpoint the cause.

SariaFace commented 3 years ago

I've managed to isolate one specific cause of this issue. It involves exporting any linked duplicate (alt+D) objects which have a modifier. It seems like any modifier will trigger this, and when it is added before or after duplication. Reproduction steps: Start with default cube scene Select cube Link-Duplicate cube (Alt+D) Add any modifier to either duplicate Export as Unity FBX either as Active Collection or as Selected Objects if both duplicates are selected. Crash should occur

Tested on 2.83 and 2.90 with similar results.

EdyJ commented 3 years ago

I've fixed the issue. It had to do with how the exporter handled undo. This is mostly undocumented, but I've managed to figure out a way that where undo works properly. Next commit will fix it.