Game crashed with OpenGL ERROR: out of memory

Bug #1095702 reported by Hans Joachim Desserud on 2013-01-03
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
widelands
Medium
Unassigned

Bug Description

I was playing a multiplayer game with carli2 earlier today, which suddenly crashed with the following error message:
/home/user/widelands/src/graphic/render/gl_surface_texture.cc:186: OpenGL ERROR: out of memory

Not really sure what triggered this or how to reproduce it, or if it could be related to bug 1008861.

Widelands bzr r6476 on Ubuntu 12.10

Hans Joachim Desserud (hjd) wrote :
SirVer (sirver) wrote :

I believe that this is related to my recent changes to text rendering. I was expected something like this to happen and I am already working on a fix - though it is non trivial and might take a while.

The problem is that the text render is doing heavy caching, but the cache is never prunend currently. I did this on purpose, because I wanted to build a more general system that also caches images and reloads them from disk when they have not been rendered for a long time. This is WIP.

Changed in widelands:
status: New → Confirmed
assignee: nobody → SirVer (sirver)
SirVer (sirver) wrote :

oh, btw: just restarting the game from a earlier safegame should allow you to cotinue playing for approximately the same amount of time.

Hans Joachim Desserud (hjd) wrote :

Ah, caching would be nice. A minor warning though: this happend after playing for ~1 hour, which compared to the average Widelands session isn't all that much. But yes, we were able to restore the save game and finish the game.

Nicolai Hähnle (nha) wrote :

Just to add my ~2 cents, as I don't know what direction you're going in right now: I honestly don't think the texture caching is a good idea. On lower end systems, video memory may actually be the scarcest resource for us, because we are already using so much memory for textures and animations of both workers and buildings.

But even those lower end systems are typically _very_ good at putting a lot of textured quads onto the screen fast. I expect that combining
1) a cache of font glyphs that tries to keep all glyphs on the same OpenGL texture,
2) a cache of the layout results, and
3) putting those together into vertex arrays for rendering
would give the best results on those systems, at least when using OpenGL. (With a bit of luck, explicit vertex arrays may not even be necessary.)

Nicolai Hähnle (nha) wrote :

I should add that it in the past, we once ran into similar issues with font rendering. Back then, I fixed that by doing basically what I wrote now ( though I may have been caching individual words instead of glyphs, I don't remember exactly).

SirVer (sirver) wrote :

Should be fixed now. Around r6501.

Changed in widelands:
status: Confirmed → Fix Committed
milestone: none → build18-rc1
assignee: SirVer (sirver) → nobody
SirVer (sirver) wrote :

Released in build-18 rc1.

Changed in widelands:
status: Fix Committed → Fix Released
tags: added: memory
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments