2025-07-20 01:23 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0005799Spring engineGeneralpublic2017-10-06 23:59
Reporterhokomoko 
Assigned Tohokomoko 
PrioritynormalSeveritycrashReproducibilityalways
StatusresolvedResolutionfixed 
Product Version104.0 +git 
Target VersionFixed in Version 
Summary0005799: assert on LoadingMT=1
Descriptionassert(GetCurrentBoundFBO() == fboId) pops.
With DebugGL=1 I get errors as such:
[f=-000001] Warning: [OPENGL_DEBUG] id=1282 source=API type=ERROR severity=HIGH msg="GL_INVALID_OPERATION error generated. Object is owned by another context and may not be bound here."

I've bisected it to somewhere between ad8a1fec33b29d53201581d665989a75d279030c and c0c442bd374c8baa1ef35bec207e5f6eb18a96ca
Steps To Reproduce1) Set LoadingMT=1
2) Set DebugGL=1
3) Run any map/game
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files

-Relationships
+Relationships

-Notes

~0018476

Kloot (developer)

hmm, this was already lurking beneath the surface for a while.

problem is straightforward, a clean fix not so much but I'll see what I can do.

~0018477

hokomoko (developer)

What is the problem?

My current suspicion is that the offscreen context is indeed not the one used later for the game.
Can we just switch them?
Show the loadscreen on the temporary context and use the main one for the offscreen?

~0018478

Kloot (developer)

Last edited: 2017-10-06 21:03

View 2 revisions

TLDR in modern GL FBO's are not shareable between contexts anymore unlike the EXT* versions. LoadingMT=1 now causes any FBO's created in the offscreen context to be solely owned by it, hence "object is owned by another context and may not be bound here".

The loadscreen needs to be on the main context (not much use if it is invisible to players) so swapping won't work, but preconstructing all FBO's should.

~0018479

hokomoko (developer)

Last edited: 2017-10-06 21:18

View 2 revisions

Wait before you do that, I've managed to attach the temporary context to the window so the load screen draws on it.

At the moment I'm fighting with the API to make the worker thread use the main context.

~0018480

hokomoko (developer)

can you please test this on linux?

https://github.com/spring/spring/tree/hiddenSDLWindow

Note that fonts are currently fubar there because they're loaded in the main context.

~0018481

Kloot (developer)

that does the trick too (no crashes, no GL asserts) and I like the cleanup of OS-specific code it brings.
+Notes

-Issue History
Date Modified Username Field Change
2017-10-06 19:17 hokomoko New Issue
2017-10-06 20:18 Kloot Note Added: 0018476
2017-10-06 20:18 Kloot Assigned To => Kloot
2017-10-06 20:18 Kloot Status new => assigned
2017-10-06 20:21 hokomoko Note Added: 0018477
2017-10-06 20:59 Kloot Note Added: 0018478
2017-10-06 21:03 Kloot Note Edited: 0018478 View Revisions
2017-10-06 21:17 hokomoko Note Added: 0018479
2017-10-06 21:18 hokomoko Note Edited: 0018479 View Revisions
2017-10-06 22:53 hokomoko Note Added: 0018480
2017-10-06 23:27 Kloot Note Added: 0018481
2017-10-06 23:58 hokomoko Changeset attached => spring develop 409dc374
2017-10-06 23:59 hokomoko Assigned To Kloot => hokomoko
2017-10-06 23:59 hokomoko Status assigned => resolved
2017-10-06 23:59 hokomoko Resolution open => fixed
+Issue History