Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

psarc files are imported as xbox files when filename length is 42 and exception is thrown #358

Open
kortov opened this issue Oct 14, 2020 · 2 comments

Comments

@kortov
Copy link

kortov commented Oct 14, 2020

I can't include a file here, but when a filename for example is Van-Halen_Aint-Talkin-Bout-Love_v4_p.psarc and I import a package then this exception is thrown.

System.Exception: Invalid Package
   at X360.STFS.STFSPackage..ctor(DJsIO xIOIn, LogRecord LogIn)
   at X360.STFS.STFSPackage..ctor(String xLocation, LogRecord LogIn)
   at RocksmithToolkitLib.DLCPackage.Packer.UnpackXBox360Package(String srcPath, String destDirPath, Platform platform) in C:\Users\Korto\RiderProjects\rocksmith-custom-song-toolkit\RocksmithToolkitLib\DLCPackage\Packer.cs:line 558
   at RocksmithToolkitLib.DLCPackage.Packer.Unpack(String srcPath, String destDirPath, Platform overridePlatform, Boolean decodeAudio, Boolean overwriteSongXml) in C:\Users\Korto\RiderProjects\rocksmith-custom-song-toolkit\RocksmithToolkitLib\DLCPackage\Packer.cs:line 134
   at RocksmithToolkitGUI.DLCPackageCreator.DLCPackageCreator.PackageImport(String srcPath, String destDir) in C:\Users\Korto\RiderProjects\rocksmith-custom-song-toolkit\RocksmithTookitGUI\DLCPackageCreator\DLCPackageCreator.cs:line 2068
   at RocksmithToolkitGUI.DLCPackageCreator.DLCPackageCreator.btnPackageImport_Click(Object sender, EventArgs e) in C:\Users\Korto\RiderProjects\rocksmith-custom-song-toolkit\RocksmithTookitGUI\DLCPackageCreator\DLCPackageCreator.cs:line 2039
   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)

I guess it's due this line

if (fileName.EndsWith("_xbox") || fileName.Length == 42)

@kortov
Copy link
Author

kortov commented Oct 14, 2020

Honestly that package is weird. In Rocksmith it was played wrong (it can't zoom in zoom out). Then I tried to look at it in rstoolkit and I got here. Then I cropped filename, imported it to rstoolkit , generated a new file and now it works. Just cropping filename didn't work in Rocksmith.

@L0FKA
Copy link
Member

L0FKA commented Oct 14, 2020

sure, there should be && instead of || (or additional check if it's not a _p file) since xbox cdlc are mostly guid and no meaningful info other tyhan prefix or actual psarc header in file...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants