fholger / RocksmithToTab

Exports Rocksmith 2014 songs to Guitar Pro tabs
http://www.rocksmithtotab.de
BSD 2-Clause "Simplified" License
207 stars 36 forks source link

Fixes #48 - Exception raised when parsing rs1compatibilitydlc_p.psarc #49

Closed spontiroli closed 11 months ago

spontiroli commented 1 year ago

Opening archive rs1compatibilitydlc_p.psarc and parsing (108/143) song pumpedupkicks throws an unhandled exception:

Unhandled Exception: Newtonsoft.Json.JsonSerializationException: Error converting value {null} to type 'System.Int32'. Path 'Entries.C7A72C01B0BF25D683906F6BF171040A.Attributes.LeaderboardChallengeRating', line 592, position 41. ---> System.InvalidCastException: Null object cannot be converted to a value type. at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType) --- End of inner exception stack trace ---

Added an option to ignore null values when invoking JSON library:

new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore }

Thank you for the awesome tool! :-)

drmDev commented 1 year ago

@fholger it would be great to have this fix merged in. This exception is holding back many CDLC tracks being converted to tabs. Is there something you need to validate before merging this in?

GreatNewHope commented 1 year ago

Hi @spontiroli Thank you for your bugfix. The last commit in fholger/RocksmithToTab was 8 years ago. It is safe to say that this PR is not going to get merged. Could you maybe give us some info on how to build the executable to have a functioning version? I tried to dotnet build and msbuild but it errored (I am no proffesional on C# programming). Thank you for contributing. You are awesome too

spontiroli commented 1 year ago

Hey @drmDev and @GreatNewHope! Thank you for taking a look into this PR. The fix is a single line of code, and I already added it in my fork of this project (you can check my GitHub profile and then the rocksmith2tab project). As far as building it... I used Visual Studio (latest). I remember there were some outdated dependencies since it has been some time since the last official release here.

Would an executable release from my side be useful? Or would you prefer to make a build yourself? In the latter case, I can review the steps again and share a small guide that might help.

If there's enough interest, I would love to continue/help/collaborate with this project in my spare time.

GreatNewHope commented 1 year ago

Usually, when a project stops getting PR updates, forks like yours become the new version (i.e., RocksmithToTab2). Every one is getting this error right now so the proper solution would probably be to offer the built executable and every file needed for running (both CLI and gui) in the "Releases" section of your fork.

Adding a section in the Readme.md that explained how to build it would be really nice, as it would help other people make bugfixes.

spontiroli commented 12 months ago

Thanks for the input @GreatNewHope!

Since this project has been idle for quite a while and I want to do some refactoring, I'll create a new repo, maintain the licensing, and mention the effort and work of @fholger. Since there won't be any PR merges doing a fork wouldn't be the best IMHO.

First on the agenda is adding a binary release with this bugfix and then we'll see :-)

LegitGreenBoi commented 9 months ago

@spontiroli are you still planning on releasing that binary? It would be great to have a version of this program without the crashing issue.

spontiroli commented 9 months ago

hey, yes, it's still planned, it's been several busy weeks but I'll create a release (or at the very least a guide on how to diy one)

On Tue, Dec 5, 2023, 08:15 LegitGreenBoi @.***> wrote:

@spontiroli https://github.com/spontiroli are you still planning on releasing that binary? It would be great to have a version of this program without the crashing issue.

— Reply to this email directly, view it on GitHub https://github.com/fholger/RocksmithToTab/pull/49#issuecomment-1840134932, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABA3X5YXP6JBBPIZQHJ3I3YH3CXRAVCNFSM6AAAAAAZO3EZNGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBQGEZTIOJTGI . You are receiving this because you were mentioned.Message ID: @.***>

GreatNewHope commented 3 months ago

Hi, guys! I managed to build the executables for the @spontiroli fixes. It works incredibly well. Thanks! And thanks to ChatGPT that helped me build the project. What I did was to load the project in Visual Studio and just run the "Release" build method for the x86 architecture. I had to disable the blocks on internet downloaded files with Unblock-File -Path ".\CallProgram.resx" and Unblock-File -Path ".\MainWindow.resx".

If you trust me, here are the executables, but you do not need to trust me. Download Visual Studio and run what I said above. Thank you, @spontiroli Rocksmith2Tab-spontiroli_fix.zip

spontiroli commented 3 months ago

Thank you, GreatNewHope! I just uploaded a release to my rocksmith2tab repository as well, which you can find here.

If there's enough interest, I can continue with other features or bug fixes. Since so much time has passed, I thought it had been forgotten.

LegitGreenBoi commented 3 months ago

Thank you, GreatNewHope! I just uploaded a release to my rocksmith2tab repository as well, which you can find here.

If there's enough interest, I can continue with other features or bug fixes. Since so much time has passed, I thought it had been forgotten.

Nice! I'll have to test it out sometime soon, I'll let you know how it goes.