2024-11-24 19:38 UTC

View Revisions: Issue #2228

Summary 0002228: Possible race condition with scheduler
Revision 2014-11-23 20:01 by Chris Young
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 2227, as if nsgif_animate stops running long before the object is destroyed this issue would not have arisen.
Revision 2014-11-23 20:01 by Chris Young
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.
Revision 2014-11-23 20:01 by Chris Young
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.
Revision 2014-12-01 14:15 by Vincent Sanders
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.
Revision 2014-12-01 14:15 by Vincent Sanders
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.