Jump to content

Avatar

Songcache Modification Tool


  • Please log in to reply
27 replies to this topic

#21 FujiSkunk

FujiSkunk
  • 1,008 posts
  • Location
    Planet Houston

Posted February 6, 2020 - 04:10 AM

I'm running into a problem when trying to parse a cache file I think may be corrupt.
 
Yeah, I know, I fed it broken bits and I'm shocked and surprised that it broke?  Actually not really, but hear me out.
 
I'm chasing an odd bug with some of the latest entries in my fork of the Rock Band Harmonies Project.  I've narrowed the bug down to two upgrades.  If I include the upgrade for Song A only, all is well.  If I include the upgrades for Song A and Song B, Song B is fine, but the game crashes when trying to play Song A.  I was hoping the cache tool might shed some light on exactly what is in the cache file that might be causing the game to choke.  Unfortunately, when I feed either cache file to the script, I get an "out of memory" error.  More specifically, I see this in the program's main window:
 
Found 628 non-empty packages
Found 573 non-empty store packages
Expecting 1487 songs. Ready? Fight!
Loaded all 1487 songs.
Loading footer...
And I see this in the .NET error window:
 
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
   at CacheTools.Cache.ReadFromFile(String filename, Boolean isWiiFile)
   at CacheTools.Form1.buttonLoad_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4110.0 built by: NET48REL1LAST_B
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
CacheTools
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Users/Skunk/Documents/RB3/RB3%20Cache%20Tools/CacheTools.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4110.0 built by: NET48REL1LAST_B
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4110.0 built by: NET48REL1LAST_B
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3761.0 built by: NET48REL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3761.0 built by: NET48REL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4110.0 built by: NET48REL1LAST_B
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3761.0 built by: NET48REL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
 
I can provide the cache files themselves if that would help.  That's assuming you're willing to chase something that people with good cache files will likely never see.  If not, that's totally fine.

#22 MFX

MFX
  • 408 posts

Posted February 7, 2020 - 03:05 AM


I can provide the cache files themselves if that would help.  That's assuming you're willing to chase something that people with good cache files will likely never see.  If not, that's totally fine.

 

 

Sure, I'll take some of that action. Get me a link to the caches in question and I'll give it a whirl.



#23 FujiSkunk

FujiSkunk
  • 1,008 posts
  • Location
    Planet Houston

Posted February 7, 2020 - 09:22 PM

Thank you!  Here are the cache files:

 

Cache with one RBHP upgrade, for Lady Gaga's "Bad Romance"

 

Cache wtih two RBHP upgrades, for "Bad Romance" and Katrina and the Waves' "Walking on Sunshine"



#24 MFX

MFX
  • 408 posts

Posted February 9, 2020 - 03:42 PM

Updated to v0.8 today.

 

@FujiSkunk provided an additional working cache that helped uncover the actual problem: The Bob Marley RB3 pack (the one that contains "Kaya") also includes a license file for additional wardrobe swag (namely "male_premium_hendrix_woodstock"). Thus far, this is the ONLY package we've found that has such extra license information, and the original spec I coded from was mistaken on what was contained in this chunk.

 

So that's sorted out. Quickie fix, and I also reenabled the config to catch the exception and dump it to the text results area instead of halting the program altogether.

 

Thanks again to Fuji!



#25 MFX

MFX
  • 408 posts

Posted February 9, 2020 - 03:44 PM

Now one might wonder: if there's a license for "male_premium_hendrix_woodstock" in that pack, could we also fake other license entries in the cache to add other wardrobe unlocks?



#26 MFX

MFX
  • 408 posts

Posted February 24, 2020 - 09:46 PM

UPDATE: 20200224 v0.9 alpha

- Added "import", "export", "macro" commands (Thanks to hentaiphd for idea and collab)
- Added "verbose load" mode: hold down Shift key before cache loads to see lots of info (SLOW-ASS ON BIG CACHES!)

 

Two new scripts are included to fix TU4 export licenses ("Dani California" and "Black Hole Sun") and EU DLC ("Hier Kommt Alex" and "Rock 'n' Roll Star").

 

Drop me a line if you test these out: as of this time, their correctness is entirely theoretical!

 

 



#27 Caserol23

Caserol23
  • 214 posts
  • Location
    Catmon, Malabon Philippines

Posted February 25, 2020 - 03:48 PM

hey, just like pksage's song cache on his website :o

Sent from my Galaxy5 using Customs Creators Collective mobile app

GyyPEOS.gif


#28 MFX

MFX
  • 408 posts

Posted February 26, 2020 - 11:53 PM

hey, just like pksage's song cache on his website :o

I don't think I quite know what you're referring to: maybe the RB3 Cache Exporter tool? This is quite different than that.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users