Install on relaunch

Bug #534625 reported by Paul Marks
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Sparkle
Confirmed
Critical
Unassigned

Bug Description

I'm running Sparkle 1.5b6 and I've seen a few crashes in my app, often under -[NSTask launch], because the target executable is missing.

From the logs, it's clear that my application has been moved by Sparkle, even though I return YES from -updater:shouldPostponeRelaunchForUpdate:untilInvoking: when I may still be launching NSTasks. So the move must happen before I'm asked if relaunching/installation should be deferred.

The order looks something like this:

* Start NSOperation that launches a few NSTasks.
* Find update; user agrees to install & relaunch.
* New version is installed while NSOperation is still running.
* Things go wonky because resources are temporarily unavailable during the installation.
* Application is then asked if it should postpone relaunching.

However, the damage is already done. A this point, the singleton -[NSBundle mainBundle] path is incorrect, so all the resources are whatever shipped with the updated version.

Revision history for this message
Andy Matuschak (andymatuschak) wrote :

Very true, Sparkle should not do that.

My initial reaction to this was "this will be fixed by the umbrella 'install on relaunch' task," but when I went to dupe this to that, it seems there isn't actually a bug for that yet, despite all the talk and code.

So this will be that.

There's code for this in http://github.com/uliwitness/Sparkle which I haven't finished merging yet. The diff was something like 5000 lines. :(

summary: - Should not install update before calling
- -updater:shouldPostponeRelaunchForUpdate:untilInvoking:
+ Install on relaunch
Changed in sparkle:
status: New → Confirmed
importance: Undecided → Critical
milestone: none → 1.5
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.