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

App crashes (possibly because artist name is too long?) #7

Closed
kotonei opened this issue Sep 5, 2023 · 3 comments
Closed

App crashes (possibly because artist name is too long?) #7

kotonei opened this issue Sep 5, 2023 · 3 comments

Comments

@kotonei
Copy link

kotonei commented Sep 5, 2023

I'm getting this error. Not sure why, but the artist name is significantly long - 58 Japanese characters, so it could be that?

Artist name is ガヴリール(CV:富田美憂)、ヴィーネ(CV:大西沙織)、サターニャ(CV:大空直美)、ラフィエル(CV:花澤香菜), song name is ハレルヤ☆エッサイム (instrumental), album name is ハレルヤ☆エッサイム

However, it works fine with a different song with artist name as サターニャ(CV:大空直美)、ラフィエル(CV:花澤香菜)

State

   at DiscordRPC.BaseRichPresence.set_State(String value)
   at PlexampRPC.MainWindow.SetPresence(PresenceData presence) in D:\Development\repos\PlexampRPC\Windows\MainWindow.xaml.cs:line 176
   at PlexampRPC.MainWindow.StartPolling() in D:\Development\repos\PlexampRPC\Windows\MainWindow.xaml.cs:line 118
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
@kotonei
Copy link
Author

kotonei commented Sep 6, 2023

I think I found the issue, Discord rich presence only accepts a max of 128 bytes for strings and the artist name I mentioned is 134 bytes (in UTF-8 encoding).

Would it be possible to add a check for if strings are >128 bytes, and if so, truncate them?

@includenull
Copy link

includenull commented Sep 18, 2023

I also had the same issue today.

State

   at DiscordRPC.BaseRichPresence.set_State(String value)
   at PlexampRPC.MainWindow.SetPresence(PresenceData presence) in D:\Development\repos\PlexampRPC\Windows\MainWindow.xaml.cs:line 197
   at PlexampRPC.MainWindow.StartPolling() in D:\Development\repos\PlexampRPC\Windows\MainWindow.xaml.cs:line 118
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

@Dyvinia
Copy link
Owner

Dyvinia commented Sep 21, 2023

Should be fixed now

@Dyvinia Dyvinia closed this as completed Sep 21, 2023
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

3 participants