Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SurfaceTool (and Mesh) are not included in disable_3d=yes build #28304

Closed
volzhs opened this issue Apr 22, 2019 · 6 comments · Fixed by #29411
Closed

SurfaceTool (and Mesh) are not included in disable_3d=yes build #28304

volzhs opened this issue Apr 22, 2019 · 6 comments · Fixed by #29411

Comments

@volzhs
Copy link
Contributor

volzhs commented Apr 22, 2019

Godot version:

3.1.1.devel cab4921 (compiled editor and templates)

OS/device including version:

Kubuntu 19.04

Issue description:

it runs fine with using SurfaceTool in script.
but exported game crashes on both debug and release export.

$ ./parse_error_surface_tool.x86_64 
OpenGL ES 3.0 Renderer: GeForce GTX 1070 Ti/PCIe/SSE2
SCRIPT ERROR: GDScript::load_byte_code: Parse Error: Identifier 'SurfaceTool' is not declared in the current scope.
   At: res://Node2D.gdc:5.
ERROR: load_byte_code: Method/Function Failed, returning: ERR_PARSE_ERROR
   At: modules/gdscript/gdscript.cpp:785.
ERROR: load: Condition ' err != OK ' is true. returned: RES()
   At: modules/gdscript/gdscript.cpp:2168.
ERROR: _load: Failed loading resource: res://Node2D.gdc
   At: core/io/resource_loader.cpp:285.
ERROR: poll: res://Node2D.tscn:3 - Parse Error: [ext_resource] referenced nonexistent resource at: res://Node2D.gd
   At: scene/resources/resource_format_text.cpp:440.
ERROR: load: Condition ' err != OK ' is true. returned: RES()
   At: core/io/resource_loader.cpp:208.
ERROR: _load: Failed loading resource: res://Node2D.tscn
   At: core/io/resource_loader.cpp:285.
ERROR: start: Failed loading scene: res://Node2D.tscn
   At: main/main.cpp:1739.
handle_crash: Program crashed with signal 11
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
[1] /lib/x86_64-linux-gnu/libc.so.6(+0x43f60) [0x7fa14cb44f60] (??:0)
[2] ./parse_error_surface_tool.x86_64() [0x1047c5f] (??:?)
[3] ./parse_error_surface_tool.x86_64() [0xb33abc] (??:?)
[4] ./parse_error_surface_tool.x86_64() [0x59e402] (??:?)
[5] ./parse_error_surface_tool.x86_64(main+0x84) [0x578f24] (??:?)
[6] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xeb) [0x7fa14cb27b6b] (??:0)
[7] ./parse_error_surface_tool.x86_64() [0x57a39a] (??:?)
-- END OF BACKTRACE --
Aborted (core dumped)

Steps to reproduce:

extends Node2D

func _ready():
	var surface = SurfaceTool.new()
	pass

Minimal reproduction project:

sample project : parse_error_surface_tool.zip

exported : parse_error_surface_tool.x86_64.zip

@volzhs
Copy link
Contributor Author

volzhs commented Apr 22, 2019

cc @vnen @bojidar-bg

@akien-mga
Copy link
Member

akien-mga commented Apr 22, 2019

Did you compile with disable_3d=yes?

@volzhs
Copy link
Contributor Author

volzhs commented Apr 22, 2019

oh. yes...

@volzhs
Copy link
Contributor Author

volzhs commented Apr 22, 2019

without disable_3d=yes, it works.

@akien-mga
Copy link
Member

That's expected, SurfaceTool depends on Mesh which are 3D resources.
They could maybe be kept in disable_3d builds if they're a valid use case for them in 2D though.

@volzhs
Copy link
Contributor Author

volzhs commented Apr 22, 2019

https://godotengine.org/asset-library/asset/296
This asset using SurfaceTool for making 2d things.
is SurfaceTool only for 3d?

@akien-mga akien-mga changed the title Exported game crashes when using SurfaceTool SurfaceTool (and Mesh) are not included in disable_3d=yes build Apr 22, 2019
@akien-mga akien-mga added this to the 3.2 milestone Jun 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants