Re: Bug#504340: djvulibre-plugin/testing and #504340
thanks for following the Debian bug and weighing in here!
Leon Bottou wrote:
> On Thursday 18 December 2008 18:16:54 Thomas Viehmann wrote:
>> Thomas Viehmann
>> if (map_lookup(&instance, id, &inst) < 0)
>> return NPERR_INVALID_INSTANCE_ERROR;
>> - cur_window = inst->window;
>> + cur_window = (inst) ? inst->window : 0;
> The problem here is that inst should not be zero if map_lookup returns correctly.
> Like the previous patch, a seemingly unrelated change seems to solve the problem.
> The bug appears or disappears depending on the compiler options
> or depending on the insertion of printf in the right places.
> Your patch cannot hurt, but I do not think it is the end of the story either...
OK, thanks for insisting on a proper fix.
What it seems to boil down to is that the handling of static variables
(such as the instance Map) is, let's say, not ideal - it has no locking
and apparently the SetWindow is called at some inopportune moment.
The Debian release zars said off-list that they prefer a proper fix as
well, so that is the new plan. I'll probably investigate removing the
instance map first (and look at what the other static globals are and
what to do with them.
I hope to be back with more on the issue in a while.
Thomas Viehmann, http://thomas.viehmann.net/