Closed Bug 408327 Opened 18 years ago Closed 18 years ago

Camino sometimes crashes when using the Trash button in the Downloads window

Categories

(Camino Graveyard :: General, defect)

PowerPC
macOS
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED FIXED
Camino1.6

People

(Reporter: davedit, Assigned: stuart.morgan+bugzilla)

Details

(Keywords: fixed1.8.1.12, Whiteboard: [camino-1.5.5])

Attachments

(4 files)

User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en; rv:1.8.1.11) Gecko/20071207 Camino/1.6a1 (like Firefox/2.0.0.11) Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en; rv:1.8.1.11) Gecko/20071207 Camino/1.6a1 (like Firefox/2.0.0.11) Occasionally when I use the Trash button in the Downloads window, Camino will crash. Started seeing this on 1.5.3, and have also seen it on 1.5.4 and 1.6a1. I'm currently running OS X 10.5.1. Reproducible: Sometimes 1.5.3 crash log: http://mozilla.pastebin.com/f58a74be6 1.5.4 crash log: http://mozilla.pastebin.com/f2c42c4fe 1.6a1 crash log: http://mozilla.pastebin.com/f4eaed0b
I suspect we have a race condition around releasing the directory path NSString when the download is removed, and having the kqueue trigger and try to use that string.
Assignee: nobody → stuart.morgan
I've definitely seen something like this, but running trunk. Confirming...
Status: UNCONFIRMED → NEW
Ever confirmed: true
Target Milestone: --- → Camino1.6
I just saw this, too, using yesterday's branch build on 10.5.1, but I have a different stack than Dave has. (That's one way to make it easier for me to update to today's build :p)
Odd; these all seem to be view related, but I thought the forums had something from the kqueue code.
Nevermind, wrong thread; those stacks are what I was thinking of. Smokey, your crash may well be a slightly different manifestation of the same early-released string.
Attached patch fix — — Splinter Review
Attached patch review version — — Splinter Review
This is a -w version for review, since a lot of indentation changed. There were actually several thread safety problem here, much to my chagrin, but the basic problem was indeed that we were using a string on the background thread that had just been released on the main thread by unsubscribing that progress viewer (this crash could happen any time the last tracked download in a given folder was deleted). The changes: - Add an array owning the paths that are passed in to kevent as context data, and only remove things from that array on the background thread that actually uses them (this also fixes the only-works-by-accident nature of my previous use of the presence of the values as keys in a dictionary to own them; if NSString copy weren't just retaining, this would always have crashed). - Protect code around concurrent access to the watch info dictionary. I didn't try to make it granular because there's no need for tight performance here, and it makes the logic much easier. - Make sure the ProgressViewControllers won't send themselves performOnMainThread messages just before they are going to dealloc themselves.
Attachment #293463 - Flags: superreview?(mark)
If we do a 1.5.5, we'll want this there too.
Flags: camino1.5.5?
Attachment #293463 - Flags: superreview?(mark) → superreview+
Landed on trunk and MOZILLA_1_8_BRANCH.
Status: NEW → RESOLVED
Closed: 18 years ago
Keywords: fixed1.8.1.12
Resolution: --- → FIXED
Stuart (or someone), can you make sure that I backported hunk 3 of FileChangeWatcher.m (the hunk smack dab in the middle of the exception stuff) correctly? All the other hunks of attachment 293462 [details] [diff] [review] ("fix") applied.
Attachment #299921 - Flags: review?(stuart.morgan)
Comment on attachment 299921 [details] [diff] [review] Probable 1_5 branch patch Yep, looks good
Attachment #299921 - Flags: review?(stuart.morgan) → review+
Attachment 299921 [details] [diff] checked in on the CAMINO_1_5_BRANCH.
Flags: camino1.5.5? → camino1.5.5+
Whiteboard: [camino-1.5.5]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: