godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
89.15k stars 20.21k forks source link

Unset PackedScene export property causes a silent crash #33190

Open mwerezak opened 4 years ago

mwerezak commented 4 years ago

Godot version: v3.1.1.stable.mono.official

OS/device including version: Ubuntu 18.04.3 LTS

Issue description: If your C# class has an [Export] property of type PackedScene, and you forget to set the scene in the editor, your game will crash on start with no error messages or any indication of what went wrong other than a cryptic mono_crash.*.json file in your project directory.

This can be very confusing if you've made a bunch of changes at once and didn't realize that a scene export was unset.

Steps to reproduce:

  1. Create a C# class that has an [Export] property of type PackedScene.
  2. Attach the class to a node.
  3. Leave the property unset in the editor.
  4. Build and run your project.
aaronfranke commented 3 years ago

@mwerezak Please re-test with Godot 3.2.3 and/or the master branch. Also, check if you have the latest Mono and .NET Core.

If this issue does still exist for you, then you will need to include a minimal reproduction project.