Image download bug - downloads two images, but one overwrites the other.

Issue #6082 resolved
fraganator created an issue

I noticed this when downloading 3D box media for an N64 set. All of the games seem to have two 3D box images available for the North America region. I let LB download both images, then cull the ones I don’t like. Note the image download is performed without the “remove roughly matched images” setting checked.

What I noticed is that a subset of games show there are two 3D box images during download, but when I check on disk there’s only one image. One example game is Quake II. It has two North American 3D box images, it will download the two images, but only one appears on disk.

Digging in to the log files, it shows both files are downloaded, but they are being saved to the same filename. The only difference is the extension is uppercase for one image, and lower case for the other. Windows doesn’t care about case sensitivity, and so will overwrite the first image with the second. From the log file:

2021-05-12 09:42:18 AM Downloading "http://images.launchbox-app.com/c00f864b-d644-404b-86d2-490c3e9778df.png" to "G:\Emulation\LaunchBox\Images\Nintendo 64 (USA)\Box - 3D\North America\Quake II-01.png"
2021-05-12 09:42:23 AM Unbroken.LaunchBox.Windows.Desktop.ViewModels.MainViewModel.window.Deactivated Start
2021-05-12 09:42:23 AM Unbroken.LaunchBox.Windows.Desktop.ViewModels.MainViewModel.window.Deactivated Before Pause Video
2021-05-12 09:42:23 AM Unbroken.LaunchBox.Windows.Desktop.ViewModels.MainViewModel.window.Deactivated Completed
2021-05-12 09:42:29 AM Unbroken.LaunchBox.Windows.Desktop.ViewModels.MainViewModel.window.Activated Start
2021-05-12 09:42:29 AM Unbroken.LaunchBox.Windows.Desktop.ViewModels.MainViewModel.window.Activated Before JoystickTimer Enabled Set
2021-05-12 09:42:29 AM Unbroken.LaunchBox.Windows.Desktop.ViewModels.MainViewModel.window.Activated Before Resume Video
2021-05-12 09:42:29 AM Unbroken.LaunchBox.Windows.Desktop.ViewModels.MainViewModel.window.Activated Before Check Already Focused
2021-05-12 09:42:31 AM Downloading "http://images.launchbox-app.com/f79fbabf-9050-48ba-bba7-1cb060e6a6bb.PNG" to "G:\Emulation\LaunchBox\Images\Nintendo 64 (USA)\Box - 3D\North America\Quake II-01.PNG"

Other affected games include Starcraft 64, Mega Man 64, Micro Machines 64 Turbo, and dozens more. This issue is probably present across all platforms and games where the file extension capitalization differs for the same image type in the same region, so I’ve marked this a major bug.

One fix would be to set the extension to lower case before comparing existing images with IGame.GetNextAvailableImageFilePath (assuming that’s what’s used internally). Perhaps also setting all filename extensions in the LB database to lowercase, both for existing images and for new submissions,.

Comments (4)

  1. Christian

    Thanks for the report, I was able to replicate and get code in to correct. It should be in the 11.12 beta 2 release

  2. Log in to comment