Objects prematurely garbage collected on Intel graphics

Hi! I’m the developer for rbSFML, ruby binding of SFML. About a year ago
I had a problem with Intel integrated graphics. I abandoned it because
it made no sense. Now I have several users with exactly that problem so
I can’t just ignore it and a recent call stack didn’t report a problem
in the driver but actually looked like Ruby were collecting the object

The problem I have is that. Wrapped data structure objects are collected
too early in the objects lifetime. With that I mean there are still
references to the object but the pointer is either changed to something
invalid or it’s free’d twice.

The odd thing is that this only happens on Intel IGP and it’s impossible
to replicate on other hardware. This has been tested quite well because
we have several working projects using rbSFML, even a ludum dare entry.

Here is the latest ruby generated backtrace by a user. The memory map
was quite huge but if you want that I can attach it. I couldn’t see
anything relevant on it

*** glibc detected *** /usr/bin/ruby: free(): invalid pointer:
0x098685fc *** ======= Backtrace: =========