Godot exporter crashes blender when exporting twice with mesh in edit mode #73174

Closed
opened 2020-01-16 22:30:42 +01:00 by Ryan · 15 comments

System Information
Operating system: Linux-5.4.10-arch1-1-x86_64-with-glibc2.29 64 Bits
Graphics card: GeForce GTX 970/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 440.44

Blender Version
Broken: version: 2.81 (sub 16), branch: makepkg, commit date: 2019-12-04 11:32, hash: f1aa4d18d4
Worked: (optional)

Short description of error
Blender crashed after trying to export a scene using the https://github.com/godotengine/godot-blender-exporter/ plugin.

Exact steps for others to reproduce the error
[Please describe the exact steps needed to reproduce the issue]
[Based on the default startup or an attached .blend file (as simple as possible)]

  1. File > Export > Godot Engine. Pick a location inside a godot project directory and confirm.
  2. You'll get an error about the mesh being in edit mode
  3. File > Export > Godot Engine. Confirm again.
  4. Blender crashes.

World.blend

system-info.txt

World.crash.txt

**System Information** Operating system: Linux-5.4.10-arch1-1-x86_64-with-glibc2.29 64 Bits Graphics card: GeForce GTX 970/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 440.44 **Blender Version** Broken: version: 2.81 (sub 16), branch: makepkg, commit date: 2019-12-04 11:32, hash: `f1aa4d18d4` Worked: (optional) **Short description of error** Blender crashed after trying to export a scene using the https://github.com/godotengine/godot-blender-exporter/ plugin. **Exact steps for others to reproduce the error** [Please describe the exact steps needed to reproduce the issue] [Based on the default startup or an attached .blend file (as simple as possible)] 1. File > Export > Godot Engine. Pick a location **inside a godot project directory** and confirm. 2. You'll get an error about the mesh being in edit mode 3. File > Export > Godot Engine. Confirm again. 4. Blender crashes. [World.blend](https://archive.blender.org/developer/F8282174/World.blend) [system-info.txt](https://archive.blender.org/developer/F8282173/system-info.txt) [World.crash.txt](https://archive.blender.org/developer/F8282172/World.crash.txt)
Author

Added subscriber: @rcorre-3

Added subscriber: @rcorre-3
Member

Added subscriber: @JulienDuroure

Added subscriber: @JulienDuroure
Member

Changed status from 'Needs Triage' to: 'Archived'

Changed status from 'Needs Triage' to: 'Archived'
Julien Duroure self-assigned this 2020-01-17 11:11:33 +01:00
Member

Hello,

This code is not part of Blender, please open a bug report directly on addon issue tracker: https://github.com/godotengine/godot-blender-exporter/

Thanks!

Hello, This code is not part of Blender, please open a bug report directly on addon issue tracker: https://github.com/godotengine/godot-blender-exporter/ Thanks!
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

This looks like some sort of corrupted file.
(Havent figured it out yet, but modeswitching has some issues in there -- so on these objects, you cannot actually enter editmode e.g., entering vertexpaint crashes...).

However, you can just append these objects back into a fresh file and everything seems to be fine (not getting these weird Mesh 'Grid' is in editmode errors).
World_corrected.blend

I can export do Godot then (getting another - unrelated - error, but these sort of issues should be reported to the Godot people: ah, I see you already did that.... https://github.com/godotengine/godot-blender-exporter/issues/316)

Unfortunately unless there are clear instructions on how to reproduce this "corruption" from scratch we cannot debug this any further.
(First time I see something like this, and I cannot reproduce)

Will have to close this, we have a workaround for now, and make sure to comment here again if you can provide reproduction steps to get a mesh object into this "corrupted" state (we can always reopen the report in that case...)

This looks like some sort of corrupted file. (Havent figured it out yet, but modeswitching has some issues in there -- so on these objects, you cannot actually enter editmode e.g., entering vertexpaint crashes...). However, you can just append these objects back into a fresh file and everything seems to be fine (not getting these weird `Mesh 'Grid' is in editmode` errors). [World_corrected.blend](https://archive.blender.org/developer/F8282873/World_corrected.blend) I can export do Godot then (getting another - unrelated - error, but these sort of issues should be reported to the Godot people: ah, I see you already did that.... https://github.com/godotengine/godot-blender-exporter/issues/316) Unfortunately unless there are clear instructions on how to reproduce this "corruption" from scratch we cannot debug this any further. (First time I see something like this, and I cannot reproduce) Will have to close this, we have a workaround for now, and make sure to comment here again if you can provide reproduction steps to get a mesh object into this "corrupted" state (we can always reopen the report in that case...)
Author

I've managed to find a reliable repro. Let me know if I should continue the discussion here, or on godot-blender-exporter, or both.
I normally report bugs in the exporter only to the exporter (as @JulienDuroure mentioned), but I figured anything that manages to completely crash blender might be of interest to the blender devs.
For the repro:

  1. Create a cube
  2. Create a linked duplicate (alt+d)
  3. Parent the duplicate to the original
  4. Select the duplicate (child)
  5. Enter edit mode
  6. Select the parent from the scene tree (without exiting edit mode). At this point you'll a gray frame for the cube.
  7. Export to godot
  8. Get "Mesh in edit mode" error
  9. Select the child
  10. Exit edit mode
  11. Export again
  12. Crash

Strangely, I've noticed this does not seem to happen if the cube has a mirror modifier on it.

I've managed to find a reliable repro. Let me know if I should continue the discussion here, or on godot-blender-exporter, or both. I normally report bugs in the exporter only to the exporter (as @JulienDuroure mentioned), but I figured anything that manages to completely crash blender might be of interest to the blender devs. For the repro: 1. Create a cube 2. Create a linked duplicate (alt+d) 3. Parent the duplicate to the original 4. Select the duplicate (child) 5. Enter edit mode 6. Select the parent from the scene tree (without exiting edit mode). At this point you'll a gray frame for the cube. 7. Export to godot 8. Get "Mesh in edit mode" error 9. Select the child 10. Exit edit mode 11. Export again 12. Crash Strangely, I've noticed this does not seem to happen if the cube has a mirror modifier on it.
Member

Strangely, I cannot trigger the "Mesh in edit mode" error from the repro steps (even if I have a mesh in editmode).
[using the exporter from today btw...]

The warning is blenders warning when calling bmesh.to_mesh()

Quick glimpse over the exporter shows it is doing
ob_evaluated.to_mesh(), then bmesh from that mesh, bmesh.to_mesh() to triangulate, but all seems OK to me.

Just to make sure, here is my file and the exporter settings:
#73174.blend
image.png

We should be after step 6.
exporting to godot, I dont get the error

Is this working for you?
You could also provide your file here if that helps...

Strangely, I cannot trigger the "Mesh in edit mode" error from the repro steps (even if I have a mesh in editmode). [using the exporter from today btw...] The warning is blenders warning when calling `bmesh.to_mesh()` Quick glimpse over the exporter shows it is doing ob_evaluated.to_mesh(), then bmesh from that mesh, bmesh.to_mesh() to triangulate, but all seems OK to me. Just to make sure, here is my file and the exporter settings: [#73174.blend](https://archive.blender.org/developer/F8283067/T73174.blend) ![image.png](https://archive.blender.org/developer/F8283065/image.png) We should be after step 6. exporting to godot, I dont get the error Is this working for you? You could also provide your file here if that helps...
Author

Sorry, this is a tricky one to repro, and it doesn't seem to be 100%.

If I open World.blend, then repeatedly try to export (up to ~10 times), blender will eventually crash.

Sorry, this is a tricky one to repro, and it doesn't seem to be 100%. If I open [World.blend](https://archive.blender.org/developer/F8283101/World.blend), then repeatedly try to export (up to ~10 times), blender will eventually crash.
Author

There's something about my preferences causing this. If I use blender --factory-startup, I can't repro it. With --factory-startup, I don't see that gray frame after selecting the parent. It seems that blender stays in edit mode with the mesh selected, regardless of whether I select the parent or child.

There's something about my preferences causing this. If I use `blender --factory-startup`, I can't repro it. With `--factory-startup`, I don't see that gray frame after selecting the parent. It seems that blender stays in edit mode with the mesh selected, regardless of whether I select the parent or child.
Member

Some Addon maybe?

Some Addon maybe?
Author

I've disabled all addons but the exporter and can still repro.

I've disabled all addons but the exporter and can still repro.
Author

So I can't create this from scratch with factory settings, but if you open the file from https://developer.blender.org/T73174#851823 with --factory-startup, then enable the godot exporter and repeatedly export, blender will eventually crash.

So I can't create this from scratch with factory settings, but if you open the file from https://developer.blender.org/T73174#851823 with --factory-startup, then enable the godot exporter and repeatedly export, blender will eventually crash.
Author

This is the output:


[INFO]: Exporting scene: Scene
[INFO]: Exporting 2 objects
[INFO]: Exporting Blender object: Cube
find_node_operation: Failed for (TRANSFORM_FINAL, '')
add_relation(Simulation -> Final Transform) - Failed, but op_from (OperationKey(type: TRANSFORM, component name: '', operation code: TRANSFORM_SIMULATION_INIT)) was ok
add_relation(Simulation -> Final Transform) - Could not find op_to (OperationKey(type: TRANSFORM, component name: '', operation code: TRANSFORM_FINAL))
find_node_operation: Failed for (TRANSFORM_FINAL, '')
add_relation(Synchronize to Original) - Could not find op_from (OperationKey(type: TRANSFORM, component name: '', operation code: TRANSFORM_FINAL))
add_relation(Synchronize to Original) - Failed, but op_to (OperationKey(type: SYNCHRONIZATION, component name: '', operation code: SYNCHRONIZE_TO_ORIGINAL)) was ok
Writing: /tmp/World.crash.txt
Segmentation fault (core dumped)
This is the output: ``` [INFO]: Exporting scene: Scene [INFO]: Exporting 2 objects [INFO]: Exporting Blender object: Cube find_node_operation: Failed for (TRANSFORM_FINAL, '') add_relation(Simulation -> Final Transform) - Failed, but op_from (OperationKey(type: TRANSFORM, component name: '', operation code: TRANSFORM_SIMULATION_INIT)) was ok add_relation(Simulation -> Final Transform) - Could not find op_to (OperationKey(type: TRANSFORM, component name: '', operation code: TRANSFORM_FINAL)) find_node_operation: Failed for (TRANSFORM_FINAL, '') add_relation(Synchronize to Original) - Could not find op_from (OperationKey(type: TRANSFORM, component name: '', operation code: TRANSFORM_FINAL)) add_relation(Synchronize to Original) - Failed, but op_to (OperationKey(type: SYNCHRONIZATION, component name: '', operation code: SYNCHRONIZE_TO_ORIGINAL)) was ok Writing: /tmp/World.crash.txt Segmentation fault (core dumped) ```
Author

Hit another one, this reproes pretty regularly tunnel.blend tunnel.crash.txt

Hit another one, this reproes pretty regularly [tunnel.blend](https://archive.blender.org/developer/F8289949/tunnel.blend) [tunnel.crash.txt](https://archive.blender.org/developer/F8289951/tunnel.crash.txt)
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#73174
No description provided.