Project

General

Profile

Actions

Emulator Issues #12968

closed

Attempting to update Dolphin on macOS results in a "failed to apply the update" error

Added by OatmealDome almost 2 years ago. Updated almost 2 years ago.

Status:
Fixed
Priority:
High
Assignee:
% Done:

0%

Operating system:
OS X
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:
5.0-16793

Description

Game Name?

N/A

Game ID? (right click the game in the game list, Properties, Info tab)

N/A

MD5 Hash? (right click the game in the game list, Properties, Verify tab, Verify Integrity button)

N/A

What's the problem? Describe what went wrong.

Updating Dolphin on macOS will result in a "failed to apply the update" error.

What steps will reproduce the problem?

  1. Attempt to update Dolphin.

Is the issue present in the latest development version? For future reference, please also write down the version number of the latest development version.

Yes, 5.0-16786.

Is the issue present in the latest stable version?

N/A

If the issue isn't present in the latest stable version, which is the first broken version? (You can find the first broken version by bisecting. Windows users can use the tool https://forums.dolphin-emu.org/Thread-green-notice-development-thread-unofficial-dolphin-bisection-tool-for-finding-broken-builds and anyone who is building Dolphin on their own can use git bisect.)

N/A

If your issue is a graphical issue, please attach screenshots and record a three frame fifolog of the issue if possible. Screenshots showing what it is supposed to look like from either console or older builds of Dolphin will help too. For more information on how to use the fifoplayer, please check here: https://wiki.dolphin-emu.org/index.php?title=FifoPlayer

N/A

What are your PC specifications? (CPU, GPU, Operating System, more)

Mac Mini (2020)
Apple M1
macOS Monterey 12.3

Is there anything else that can help developers narrow down the issue? (e.g. logs, screenshots,
configuration files, savefiles, savestates)

The following appears in the log:

Updating file Dolphin.app/Contents/Resources/Sys/Load/GraphicMods/All Games Bloom Removal/all.txt from content e3b0c44298fc1c149afbf4c8996fb924...
Could not copy e3b0c44298fc1c149afbf4c8996fb924 to /var/folders/xr/z37jg6y523d0t40cdk9cycfw0000gn/T//DolphinWii.rMQpxP/temporary_file.
Failed to apply the update.


Files

Updater.log (21.7 KB) Updater.log OatmealDome, 07/05/2022 06:56 AM
Actions #1

Updated by OatmealDome almost 2 years ago

  • Status changed from New to Accepted
  • Operating system OS X added
  • Operating system deleted (N/A)
Actions #2

Updated by OatmealDome almost 2 years ago

Forgot to attach the full log.

Actions #3

Updated by OatmealDome almost 2 years ago

  • Priority changed from Normal to High

On the macOS updater, we use File::Copy() in a workaround for an OS quirk. The following is the current implementation of File::Copy():

std::ifstream source{source_path, std::ios::binary};
std::ofstream destination{destination_path, std::ios::binary};
destination << source.rdbuf();
return source.good() && destination.good();

A recent graphics mod PR introduced several empty files into the Sys folder. When File::Copy() is called on one of these files, it fails. This is because the << operator will set the failbit on the destination stream if no bytes are written [1], which is the case for empty files. Since the goodbit is no longer set, the copy is believed to have failed.

[1] https://en.cppreference.com/w/cpp/io/basic_ostream/operator_ltlt (10)

Actions #4

Updated by OatmealDome almost 2 years ago

  • Status changed from Accepted to Fix pending
  • Assignee set to OatmealDome
Actions #5

Updated by OatmealDome almost 2 years ago

  • Status changed from Fix pending to Fixed
  • Fixed in set to 5.0-16793
Actions

Also available in: Atom PDF