|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0002228||NetSurf||[All Projects] General||public||2014-11-23 20:01||2016-04-12 10:50|
|Target Version||3.6||Fixed in Version|
|Summary||0002228: Possible race condition with scheduler|
|Description||When NetSurf deletes a scheduled event, there is the possibility that it is already "in transit" to be triggered before the delete takes effect.|
This will occur in the following circumstance:
* The triggered event is sent to the main NetSurf loop using an external (eg. OS) timer, which includes details of the callback.
* The event is deleted before NetSurf returns to the main loop to pick up messages from the timer.
* The callback is then called but the pointer passed may no longer be valid = crash.
|Steps To Reproduce||I can reproduce this on recent AmigaOS builds as the callback is now passed back to NetSurf rather than NetSurf picking the events off the list itself. I've only seen problems with nsgif_animate.|
|Additional Information||I'm not sure much can be done about this except to mitigate any problems (or insist events are always picked off a shared list). I've attached a possible fix for nsgif_animate but it may not be a full solution if the content object itself has been freed too.|
This also ties into bug#2227, as if nsgif_animate stops running long before the object is destroyed this issue would not have arisen.
|Tags||No tags attached.|
|Fixed in CI build #|
|Reported in CI build #||2383|
|URL of problem page|
Chris Young (developer)
There's a better fix in branch chris/stop-gif-anim which ensures if nsgif_animate gets called when it shouldn't, it won't continue to repeat (the animation callback now stops when there are no more users).
Branch will need checking/merging.
|2014-11-23 20:01||Chris Young||New Issue|
|2014-11-23 20:01||Chris Young||File Added: gif.diff|
|2014-11-23 20:01||Chris Young||Additional Information Updated||View Revisions|
|2014-12-01 14:15||Vincent Sanders||Status||new => acknowledged|
|2014-12-01 14:15||Vincent Sanders||Description Updated||View Revisions|
|2014-12-01 14:15||Vincent Sanders||Additional Information Updated||View Revisions|
|2014-12-09 15:21||Chris Young||Relationship added||related to 0002227|
|2014-12-09 15:24||Chris Young||Severity||minor => crash|
|2014-12-09 15:24||Chris Young||Target Version||=> 3.3|
|2014-12-12 17:17||Chris Young||Note Added: 0000557|
|2015-02-28 16:03||Vincent Sanders||Target Version||3.3 => 3.4|
|2016-02-16 13:46||Vincent Sanders||Target Version||3.4 => 3.5|
|2016-04-12 10:50||Vincent Sanders||Target Version||3.5 => 3.6|