Gamua / Starling-Framework

The Cross Platform Game Engine
http://www.starling-framework.org
Other
2.84k stars 819 forks source link

Error #3780 in Painter.configureBackBuffer() #910

Closed tconkling closed 7 years ago

tconkling commented 7 years ago

In the latest build of my game, a Windows tester is seeing this error occasionally:

Error: Error #3780
        at starling.rendering::Painter/configureBackBuffer()
        at starling.core::Starling/updateViewPort()
        at starling.core::Starling/onContextRestored()

When this happens, the only way he can recover is by entering the Windows Task Manager and force-exiting the game.

According to the web, error 3780 means "Requested width of backbuffer is not in allowed range 32 to 16384".

Strangely, this is happening when the tester is loading a game from the main menu - this involves binding some textures to the GPU, but shouldn't ever involve a context loss/restore, at least as far as I can tell.

This has happened to the same tester twice today. It's never happened to me or anyone else, and nothing dramatic has changed in the game, so I'm inclined to blame it on crappy GPU drivers - but I wanted to run this by everyone here in the chance somebody has insight into what's going on?

FWIW, the tester is running the game in fullscreen mode.

tconkling commented 7 years ago

Quick followup: another Starling user posted about this here: http://forum.starling-framework.org/topic/error-3780-requested-width-of-backbuffer-is-not-in-allowed-range-32-to-16384

This user was speculating that the error had to do with background rendering. My tester tells me that he also switches back and forth between the game and windows quite a bit, so that's some tiny bit of anecdotal evidence that my issue is maybe-possibly-who-knows related :)

I do most of my development and testing on a Mac, but I tried to reproduce this on my Windows 10 machine and have been unable to.

PrimaryFeather commented 7 years ago

I'm now making sure that the viewPort size is never below 32x32 pixels. Whatever the reason for the system to report a smaller size than that sometimes, I think we've got a good chance that this fixes it.

Please let me know if that's the case! :smile:

tconkling commented 7 years ago

Thanks, I'll integrate this and let you know if it recurs!

teotigraphix commented 7 years ago

I did get this error today with @joshtynjala 's feathers 3.1.1 and it turned out that I was setting the contentScaleFactor to zero accidentally, which then in the bootstrap calculation made the viewPort width/height 0.

Just thought I would post an FYI, probably not related BUT could happen.