Importing Games crashes Launchbox

Issue #6013 resolved
John Vallender created an issue

Dragging games into Launchbox, selecting ‘Windows’, leaving the game ‘in place’, gets to ‘Saving games’, then crashes with the below error.

Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')

App: LaunchBox
Version: 11.10
Type: System.ArgumentOutOfRangeException
Site: Void ThrowArgumentOutOfRange_IndexException()
Source: System.Private.CoreLib

at Unbroken.LaunchBox.Windows.Desktop.MenuActions.ImportRomFilesMenuAction.PrintAutowireParam(IReadOnlyCollection1 last, Object attr, Boolean isdir) at ModelIdentifier.ForgotIdentifiableServer(IReadOnlyCollection1 last, String attr, Boolean isdir, ModelIdentifier )
at Unbroken.LaunchBox.Windows.Desktop.MenuActions.ImportRomFilesMenuAction.ReflectAutowireParam(IReadOnlyCollection1 var1, Boolean isvisitor) at ProcessIdentifier.ForgotIdentifiableServer(IReadOnlyCollection1 var1, Boolean isvisitor, ProcessIdentifier )
at Unbroken.LaunchBox.Windows.Desktop.MenuActions.ImportRomFilesMenuAction.Finish(RomImportTask task)
at ValueAccount.ForgotIdentifiableServer(RomImportTask task, ValueAccount )
at Unbroken.LaunchBox.Windows.Desktop.MenuActions.ImportFromDragMenuAction.<>c__DisplayClass3_0.ListAutowireToken()
at Unbroken.LaunchBox.Windows.Threading.<>c__DisplayClass0_0.OrderHttpAuthentication(Object )
at Unbroken.LaunchBox.Windows.Threading.<>c__DisplayClass0_0.ForgotInvalidMap()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

Recent Log:

14:08:13 Exception

Comments (8)

  1. Christian

    What options were selected in the custom options pages? Having a hard time replicating, could use as much information as you can give.

  2. John Vallender reporter

    Hi Christian,

    Here’s what I selected. I’m importing basic information on games I’ve got downloaded as zip files, so I’ve got a catalogue in Launchbox of games I’ve not got installed as well. So this is adding a game I don’t have installed…

    Options chosen:

    None of the Above
    Picked ‘Windows

    'Use the files in their current location’

    Tick on 'Search for game information'....
    Tick on 'Box - Front' (just one tick)
    Tick on 'Remove roughly-matched duplicate images'
    (Parsing EmuMovies)
    Tick on 'Box - Back' and 'Box - Front'
    No ticks on 'Force importing...' or 'Look for...'

    Ready to Import page - shows the game
    Press finish.

    "Refreshing local metadata from....", and cycling green line
    ...
    Importing [game].zip... [solid green line]

    [Sits for a while....30 seconds or so, no screen changes]

    Saving games.... [crash]

  3. Christian

    Is this happening every time you try to import any file for that platform? Also would it be possible for you upload your Windows.xml file from \\LaunchBox\Data\Platforms\?

  4. John Vallender reporter

    Rather than expect you to parse my collection, which is hardly fair, i thought i’d do the donkey work. I’ve narrowed it down to two copies of Colin Mcrae Racing 2.0. Obviously I should merge these two records together, but it’s interesting that I can successfully import additional games into the library from Steam and it accepts it, but dragging a game in from the hard drive I guess tries to reconstruct the XML and crashes with that error. Merging the two records makes the problem go away. I’m not sure why I’ve got duplicates, the data is largely from ID 2551 in the game catalogue with a couple of ‘CD’ and ‘Boxed’ tags where I added data on import.

    Anyway, here’s the xml which can be used to replicate the problem. Obviously I can fix this now by merging, however it was a little trawl to get to find the offending records!

    <?xml version="1.0" standalone="yes"?>
    <LaunchBox>
    <Game>
    <GogAppId />
    <OriginAppId />
    <OriginInstallPath />
    <VideoPath />
    <ThemeVideoPath />
    <Installed>false</Installed>
    <ApplicationPath />
    <CommandLine />
    <Completed>false</Completed>
    <ConfigurationCommandLine />
    <ConfigurationPath />
    <DateAdded>2021-02-11T13:12:51.2996434+00:00</DateAdded>
    <DateModified>2021-02-12T09:44:29.1504047+00:00</DateModified>
    <Developer>Codemasters</Developer>
    <DosBoxConfigurationPath />
    <Emulator />
    <Favorite>false</Favorite>
    <ID>72170571-54ac-4661-a8ef-6c6c77a667f1</ID>
    <ManualPath />
    <MusicPath />
    <Notes>Colin McRae Rally 2 is the long awaited follow up to the original racing hit - Colin McRae Rally. Just as the original CMR raised the bar for rally racing games so to does CMR2. CMR2 offers several modes of play including arcade and simulation. Play in arcade mode dueling it out against the others around a course or stick to the more traditional championship mode with three different skill levels.</Notes>
    <Platform>Windows</Platform>
    <Publisher>Codemasters</Publisher>
    <Rating>E - Everyone</Rating>
    <ReleaseDate>2001-02-06T08:00:00+00:00</ReleaseDate>
    <RootFolder />
    <ScummVMAspectCorrection>true</ScummVMAspectCorrection>
    <ScummVMFullscreen>true</ScummVMFullscreen>
    <ScummVMGameDataFolderPath />
    <ScummVMGameType />
    <SortTitle />
    <Source>CD</Source>
    <StarRatingFloat>0</StarRatingFloat>
    <StarRating>0</StarRating>
    <CommunityStarRating>0</CommunityStarRating>
    <CommunityStarRatingTotalVotes>0</CommunityStarRatingTotalVotes>
    <Status />
    <DatabaseID>2551</DatabaseID>
    <WikipediaURL />
    <Title>Colin McRae Rally 2.0</Title>
    <UseDosBox>false</UseDosBox>
    <UseScummVM>false</UseScummVM>
    <Version />
    <Series />
    <PlayMode>Multiplayer</PlayMode>
    <Region />
    <PlayCount>0</PlayCount>
    <Portable>false</Portable>
    <Hide>false</Hide>
    <Broken>false</Broken>
    <Genre>Racing</Genre>
    <MissingVideo>true</MissingVideo>
    <MissingBoxFrontImage>false</MissingBoxFrontImage>
    <MissingScreenshotImage>true</MissingScreenshotImage>
    <MissingClearLogoImage>false</MissingClearLogoImage>
    <MissingBackgroundImage>false</MissingBackgroundImage>
    <MissingBox3dImage>false</MissingBox3dImage>
    <MissingCartImage>true</MissingCartImage>
    <MissingCart3dImage>true</MissingCart3dImage>
    <MissingManual>true</MissingManual>
    <MissingBannerImage>false</MissingBannerImage>
    <MissingMusic>false</MissingMusic>
    <UseStartupScreen>false</UseStartupScreen>
    <HideAllNonExclusiveFullscreenWindows>false</HideAllNonExclusiveFullscreenWindows>
    <StartupLoadDelay>0</StartupLoadDelay>
    <HideMouseCursorInGame>false</HideMouseCursorInGame>
    <DisableShutdownScreen>false</DisableShutdownScreen>
    <AggressiveWindowHiding>false</AggressiveWindowHiding>
    <OverrideDefaultStartupScreenSettings>false</OverrideDefaultStartupScreenSettings>
    <UsePauseScreen>false</UsePauseScreen>
    <PauseAutoHotkeyScript />
    <ResumeAutoHotkeyScript />
    <OverrideDefaultPauseScreenSettings>false</OverrideDefaultPauseScreenSettings>
    <SuspendProcessOnPause>false</SuspendProcessOnPause>
    <ForcefulPauseScreenActivation>false</ForcefulPauseScreenActivation>
    <LoadStateAutoHotkeyScript />
    <SaveStateAutoHotkeyScript />
    <ResetAutoHotkeyScript />
    <SwapDiscsAutoHotkeyScript />
    <CustomDosBoxVersionPath />
    <ReleaseType />
    <MaxPlayers>2</MaxPlayers>
    <VideoUrl />
    </Game>
    <Game>
    <GogAppId />
    <OriginAppId />
    <OriginInstallPath />
    <VideoPath />
    <ThemeVideoPath />
    <Installed>false</Installed>
    <ApplicationPath />
    <CommandLine />
    <Completed>false</Completed>
    <ConfigurationCommandLine />
    <ConfigurationPath />
    <DateAdded>2020-11-15T12:35:27.4105267+00:00</DateAdded>
    <DateModified>2020-11-15T12:35:27.411898+00:00</DateModified>
    <Developer>Codemasters</Developer>
    <DosBoxConfigurationPath />
    <Emulator />
    <Favorite>false</Favorite>
    <ID>86baca35-5016-42bb-84a6-6b28c6edd995</ID>
    <ManualPath />
    <MusicPath />
    <Notes>Colin McRae Rally 2 is the long awaited follow up to the original racing hit - Colin McRae Rally. Just as the original CMR raised the bar for rally racing games so to does CMR2. CMR2 offers several modes of play including arcade and simulation. Play in arcade mode dueling it out against the others around a course or stick to the more traditional championship mode with three different skill levels.</Notes>
    <Platform>Windows</Platform>
    <Publisher>Codemasters</Publisher>
    <Rating>E - Everyone</Rating>
    <ReleaseDate>2001-02-06T08:00:00+00:00</ReleaseDate>
    <RootFolder />
    <ScummVMAspectCorrection>true</ScummVMAspectCorrection>
    <ScummVMFullscreen>true</ScummVMFullscreen>
    <ScummVMGameDataFolderPath />
    <ScummVMGameType />
    <SortTitle />
    <Source />
    <StarRatingFloat>0</StarRatingFloat>
    <StarRating>0</StarRating>
    <CommunityStarRating>4.071429</CommunityStarRating>
    <CommunityStarRatingTotalVotes>7</CommunityStarRatingTotalVotes>
    <Status />
    <DatabaseID>2551</DatabaseID>
    <WikipediaURL />
    <Title>Colin McRae Rally 2.0</Title>
    <UseDosBox>false</UseDosBox>
    <UseScummVM>false</UseScummVM>
    <Version>Boxed</Version>
    <Series />
    <PlayMode>Multiplayer</PlayMode>
    <Region>Europe</Region>
    <PlayCount>0</PlayCount>
    <Portable>false</Portable>
    <Hide>false</Hide>
    <Broken>false</Broken>
    <Genre>Racing</Genre>
    <MissingVideo>true</MissingVideo>
    <MissingBoxFrontImage>false</MissingBoxFrontImage>
    <MissingScreenshotImage>true</MissingScreenshotImage>
    <MissingClearLogoImage>false</MissingClearLogoImage>
    <MissingBackgroundImage>false</MissingBackgroundImage>
    <MissingBox3dImage>false</MissingBox3dImage>
    <MissingCartImage>true</MissingCartImage>
    <MissingCart3dImage>true</MissingCart3dImage>
    <MissingManual>true</MissingManual>
    <MissingBannerImage>false</MissingBannerImage>
    <MissingMusic>false</MissingMusic>
    <UseStartupScreen>false</UseStartupScreen>
    <HideAllNonExclusiveFullscreenWindows>false</HideAllNonExclusiveFullscreenWindows>
    <StartupLoadDelay>0</StartupLoadDelay>
    <HideMouseCursorInGame>false</HideMouseCursorInGame>
    <DisableShutdownScreen>false</DisableShutdownScreen>
    <AggressiveWindowHiding>false</AggressiveWindowHiding>
    <OverrideDefaultStartupScreenSettings>false</OverrideDefaultStartupScreenSettings>
    <UsePauseScreen>false</UsePauseScreen>
    <PauseAutoHotkeyScript />
    <ResumeAutoHotkeyScript />
    <OverrideDefaultPauseScreenSettings>false</OverrideDefaultPauseScreenSettings>
    <SuspendProcessOnPause>false</SuspendProcessOnPause>
    <ForcefulPauseScreenActivation>false</ForcefulPauseScreenActivation>
    <LoadStateAutoHotkeyScript />
    <SaveStateAutoHotkeyScript />
    <ResetAutoHotkeyScript />
    <SwapDiscsAutoHotkeyScript />
    <CustomDosBoxVersionPath />
    <ReleaseType />
    <MaxPlayers>2</MaxPlayers>
    <VideoUrl />
    </Game>
    </LaunchBox>

  5. Christian

    Believe we have a fix in place in the latest beta release of 11.11 (just out today). Would it be possible for you to grab it and see if you still have the issue in that beta. Even with the XML you provided I am having a hard time replicating. Would be nice to confirm we have it nipped in the butt.

  6. John Vallender reporter

    Subscribed to the beta, swapped out my xml, added a game, imported successfully. Bud succesfully nipped, thank you!

  7. Log in to comment