Comment 168 for bug 1512120

Revision history for this message
In , Xfce-d (xfce-d) wrote :

slumbergod is right: The bug has not been tracked down, yet. By now it seems pretty clear that the bug is caused by different threads that operate on the same data(structures). Unfortunately bugs, which are related to multithreading are hard to track down, since they are non-deterministic and different parts of the code, which are executed concurrently, may need to be adapted.

However, it seems that nobody really understands the code, but just fiddles around with it, in hope the bug will magically disappear. If debugging is done this way, it is much more likely that the opposite effect will occur: New bugs are introduced.

Roy for example proposed in comment #71 to add an additional check to the code:
> if (!THUNAR_IS_FILE (file))
> {
> return NULL;
> }

This additional check may reduce the number of crashes, but it does not cure the cause (As Roy discovered in comment #72): If the OS triggers a thread switch between the check and the execution of the following operations, the result of the check may no longer hold.

I guess, that some type of synchronization will be needed to patch the bug. Therefore is it necessary to identify the critical sections and implement mutual exclusion.

PS: Sorry, if this post sounds a bit harsh. I do not want to offend anyone - especially not Roy - but just want to point further efforts into the right direction.