Fix crashing on starting and quitting
ClosedPublic

Authored by sandsmark on Apr 7 2020, 3:18 PM.

Details

Summary

To avoid having to lock and unlock the mutex everywhere (and ensure it is unlocked before calling other things that might lock it, etc.), do it as locally as possible.

BUG: 419585

Test Plan

Doesn't crash all the time anymore, and doesn't randomly hang like when I tried to lock and unlock it "manually" everywhere.

Diff Detail

Repository
R318 Dolphin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
sandsmark created this revision.Apr 7 2020, 3:18 PM
Restricted Application added a subscriber: kfm-devel. · View Herald TranscriptApr 7 2020, 3:18 PM
sandsmark requested review of this revision.Apr 7 2020, 3:18 PM
ngraham edited the summary of this revision. (Show Details)Apr 7 2020, 3:45 PM
elvisangelaccio accepted this revision.Apr 7 2020, 5:21 PM

Can't reproduce the crash, but this looks reasonable to me.

Please push to release/20.04.

This revision is now accepted and ready to land.Apr 7 2020, 5:21 PM

@sandsmark Ping? Are you going to push this?

Sorry, holidays.

But yeah, it seems to only crash with a newer dolphin and icu, and seems to be very threading-dependent and hard to reproduce. But locking this should be the right thing to do anyways.

This revision was automatically updated to reflect the committed changes.

Feel free to just push on behalf of me in the future, though, work and holidays often get in the way of quickly following up on stuff..