Bug 38086 - Mesa 7.11-devel implementation error: Unexpected program target in destroy_program_variants_cb()
Mesa 7.11-devel implementation error: Unexpected program target in destroy_pr...
Status: RESOLVED FIXED
Product: Mesa
Classification: Unclassified
Component: Mesa core
git
Other All
: medium normal
Assigned To: mesa-dev
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-06-08 14:02 UTC by Alexandre Demers
Modified: 2013-02-22 23:54 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandre Demers 2011-06-08 14:02:24 UTC
Using Wine to play Diablo 2, I see many lines of the following error:

Mesa 7.11-devel implementation error: Unexpected program target in destroy_program_variants_cb()
Please report at bugs.freedesktop.org

However, it doesn't prevent anything in the game.
Comment 1 Brian Paul 2011-06-08 14:16:37 UTC
I've just committed a change to print a slightly more helpful error message.  Can you rebuild your driver and retest?
Comment 2 Alexandre Demers 2011-06-08 14:37:13 UTC
With the latest code, here is the result:

Mesa 7.11-devel implementation error: Unexpected program target 0x0 in destroy_program_variants_cb()
Please report at bugs.freedesktop.org
Comment 3 Brian Paul 2011-06-08 15:14:27 UTC
Hmmm, can you go in with gdb and poke around a bit?  Get the call stack, print *program, etc?

It would be easy to silence this warning, but I'd like to know the root cause first.
Comment 4 Alexandre Demers 2011-06-08 23:43:25 UTC
It seems related to a wrapper I use to let Diablo 2 use Glide over OpenGL. All other configuration (Direct 2D and Direct 3D) are OK and don't produce this error. http://www.svenswrapper.de/english/index.html

So the problem can come from there. I'll try to have a look at it, there are options I can configure.
Comment 5 Laurent carlier 2013-02-19 11:47:39 UTC
Can reproduce this bug also with mesa-9.2-devel (git) but also 9.0.x with counter strike: Source (steam-linux)

gdb backtrace:
Breakpoint 2, destroy_program_variants (st=0x8171910, program=0xf52863c0 <_mesa_DummyProgram>) at ../../src/mesa/state_tracker/st_program.c:1212
1212          _mesa_problem(NULL, "Unexpected program target 0x%x in "
(gdb) bt full
#0  destroy_program_variants (st=0x8171910, program=0xf52863c0 <_mesa_DummyProgram>) at ../../src/mesa/state_tracker/st_program.c:1212
No locals.
#1  0xf405cb16 in destroy_program_variants_cb (key=2, data=0xf52863c0 <_mesa_DummyProgram>, userData=0x8171910)
    at ../../src/mesa/state_tracker/st_program.c:1266
        st = 0x8171910
        program = 0xf52863c0 <_mesa_DummyProgram>
#2  0xf3f3b343 in _mesa_HashWalk (table=0x80b5240, callback=0xf405caf2 <destroy_program_variants_cb>, userData=0x8171910) at ../../src/mesa/main/hash.c:329
        table2 = 0x80b5240
        entry = 0xbf3fe30
        __PRETTY_FUNCTION__ = "_mesa_HashWalk"
#3  0xf405cb51 in st_destroy_program_variants (st=0x8171910) at ../../src/mesa/state_tracker/st_program.c:1279
No locals.
#4  0xf403761c in st_destroy_context (st=0x8171910) at ../../src/mesa/state_tracker/st_context.c:301
        pipe = 0x80a6f90
        cso = 0x8176e48
        ctx = 0x818f788
        i = 4
#5  0xf4054e92 in st_context_destroy (stctxi=0x8171910) at ../../src/mesa/state_tracker/st_manager.c:598
        st = 0x8171910
#6  0xf42a08e3 in dri_destroy_context (cPriv=0x80b6110) at dri_context.c:187
        ctx = 0x80a6f00
#7  0xf3e9ef3e in driDestroyContext (pcp=0x80b6110) at ../../../../src/mesa/drivers/dri/common/dri_util.c:329
No locals.
#8  0xf7c520c6 in ?? () from /usr/lib32/libGL.so.1
No symbol table info available.
#9  0xf7c26b98 in glXDestroyContext () from /usr/lib32/libGL.so.1
No symbol table info available.
#10 0xf73ab759 in X11_GL_DeleteContext (_this=0x805e380, context=0x80b6028) at src/video/x11/SDL_x11opengl.c:747
        display = 0x805edb0
#11 0xf7387d00 in SDL_GL_DeleteContext (context=0x80b6028) at src/video/SDL_video.c:2785
No locals.
#12 0xf7a0b38f in ?? () from bin/launcher.so
No symbol table info available.
#13 0xf741418b in ?? () from /home/lordh/.local/share/Steam/SteamApps/lordheavy/Counter-Strike Source/bin/libtogl.so
No symbol table info available.
#14 0xf74143a6 in ?? () from /home/lordh/.local/share/Steam/SteamApps/lordheavy/Counter-Strike Source/bin/libtogl.so
No symbol table info available.
#15 0xf7403596 in IDirect3DDevice9::~IDirect3DDevice9() () from /home/lordh/.local/share/Steam/SteamApps/lordheavy/Counter-Strike Source/bin/libtogl.so
No symbol table info available.
---Type <return> to continue, or q <return> to quit---
#16 0xf74036f2 in IDirect3DDevice9::~IDirect3DDevice9() () from /home/lordh/.local/share/Steam/SteamApps/lordheavy/Counter-Strike Source/bin/libtogl.so
No symbol table info available.
#17 0xec66482f in ?? () from /home/lordh/.local/share/Steam/SteamApps/lordheavy/Counter-Strike Source/bin/shaderapidx9.so
No symbol table info available.
#18 0xec6631fe in ?? () from /home/lordh/.local/share/Steam/SteamApps/lordheavy/Counter-Strike Source/bin/shaderapidx9.so
No symbol table info available.
#19 0xf1cf7731 in ?? () from /home/lordh/.local/share/Steam/SteamApps/lordheavy/Counter-Strike Source/bin/materialsystem.so
No symbol table info available.
#20 0xf7a07f8c in ?? () from bin/launcher.so
No symbol table info available.
#21 0xf7a0801b in ?? () from bin/launcher.so
No symbol table info available.
#22 0xf7a08010 in ?? () from bin/launcher.so
No symbol table info available.
#23 0xf79f04cd in LauncherMain () from bin/launcher.so
No symbol table info available.
#24 0x08048474 in main ()

(gdb) print *program
$1 = {Id = 0, String = 0x0, RefCount = 0, Target = 0, Format = 0, Instructions = 0x0, InputsRead = 0, OutputsWritten = 0, SystemValuesRead = 0, 
  InputFlags = {0 <repeats 32 times>}, OutputFlags = {0 <repeats 64 times>}, TexturesUsed = {0 <repeats 32 times>}, SamplersUsed = 0, ShadowSamplers = 0, 
  Parameters = 0x0, LocalParams = {{0, 0, 0, 0} <repeats 4096 times>}, SamplerUnits = '\000' <repeats 15 times>, IndirectRegisterFiles = 0, 
  NumInstructions = 0, NumTemporaries = 0, NumParameters = 0, NumAttributes = 0, NumAddressRegs = 0, NumAluInstructions = 0, NumTexInstructions = 0, 
  NumTexIndirections = 0, NumNativeInstructions = 0, NumNativeTemporaries = 0, NumNativeParameters = 0, NumNativeAttributes = 0, NumNativeAddressRegs = 0, 
  NumNativeAluInstructions = 0, NumNativeTexInstructions = 0, NumNativeTexIndirections = 0}
Comment 6 Brian Paul 2013-02-19 14:28:23 UTC
Can you make a trace of this issue with apitrace?  https://github.com/apitrace/apitrace
Comment 7 Laurent carlier 2013-02-19 17:06:04 UTC
(In reply to comment #6)
> Can you make a trace of this issue with apitrace? 
> https://github.com/apitrace/apitrace

You can find it here:
http://pkgbuild.com/~lcarlier/traces/hl2_linux.trace.tar.gz
Comment 8 Brian Paul 2013-02-22 23:54:22 UTC
Fixed with commit 8bb291b0f59e8e13bc252cb35672eb468e53881a