godot icon indicating copy to clipboard operation
godot copied to clipboard

[3.0] Game crashes if stretch mode is set to "viewport"

Open Zylann opened this issue 9 years ago • 8 comments

Tested on Godot 3.0 master af282b56feb8d84049f911dd1d91d82bd2211727 Windows 10 64 bits

When I set the display stretch mode to "viewport", the game crashes as soon as I start it. Setting the stretch mode to "2d" doesn't produce a crash but nothing is visible (2D or 3D), only the clear color. Only no stretch mode works.

Zylann avatar Mar 24 '17 22:03 Zylann

here it crashes on both "viewport" and "2d" (linux)

nunodonato avatar Mar 24 '17 22:03 nunodonato

Same, Viewport and 2D, Linux 64 too.

eon-s avatar Mar 25 '17 20:03 eon-s

This is one of the errors I'm getting GL ERROR: Source: OpenGL Type: Error ID: 39 Severity: High Message: GL_INVALID_VALUE in glViewport(0, 0, 1360, -2147483648)

it seems the height being used is a messed up negative number. Could be part of the problem?

nunodonato avatar Apr 08 '17 14:04 nunodonato

well after trying to dig this a little bit more, I think the previous error is not the real cause of the problem. but this one GL ERROR: Source: OpenGL Type: Error ID: 39 Severity: High Message: GL_INVALID_OPERATION in glReadBuffer(invalid buffer GL_COLOR_ATTACHMENT0)

unfortunately, I'm not knowledgeable enough with OpenGL to know what to do from here on... :/

nunodonato avatar Apr 09 '17 10:04 nunodonato

I'm getting a error when trying to use the 2D stretch mode.

ERROR: _gl_debug_print: GL ERROR: Source: OpenGL Type: Error ID: 1281 Severity: High Message: GL_INVALID_VALUE error generated. Width and height must not be negative. At: drivers/gles3/rasterizer_gles3.cpp:123

NullNeska avatar Apr 10 '17 10:04 NullNeska

well now that reduz is out on vacations for a month I'm not sure who has the skills and will be able to take a look at this... perhaps @SaracenOne ? :)

nunodonato avatar Apr 10 '17 15:04 nunodonato

sorry my english... I found the desired_res give a (0,0) value (when i print vars values).

https://github.com/godotengine/godot/blob/master/scene/main/scene_main_loop.cpp#L1136

I'm sorry I do not know how to reference code lines to comments

Shockblast avatar Apr 10 '17 15:04 Shockblast

this is fixed in PR #8410 @Shockblast awesome, I thought the fix would be harder than that ;) hopefully it gets merged soon!

nunodonato avatar Apr 16 '17 19:04 nunodonato