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

runtime error when restarting the "Chat Convert" task #79

Closed
fllppi opened this issue Jan 14, 2023 · 5 comments
Closed

runtime error when restarting the "Chat Convert" task #79

fllppi opened this issue Jan 14, 2023 · 5 comments

Comments

@fllppi
Copy link

fllppi commented Jan 14, 2023

hello,
with many of my live stream recordings, the "Chat Convert" task got stuck and there was no output in either the web interface or the container log. After restarting the task, the API container crashes and issues the following error:

panic: runtime error: slice bounds out of range [:41] with length 40

goroutine 381 [running]:
github.com/zibbp/ganymede/internal/utils.ConvertTwitchLiveChatToVodChat({0xc0000345a0, 0x44}, {0xc000395738, 0x4}, {0xc0003efa40, 0x24}, {0xc000394720, 0xb}, 0x2f68995, {0x1c05188, ...})
        /app/internal/utils/chat.go:259 +0x162a
github.com/zibbp/ganymede/internal/archive.(*Service).TaskLiveChatConvert(0xc000117f80, 0xc0005064b0, 0xc0005be8c0, 0xc00049fb80, 0x50?)
        /app/internal/archive/archive.go:916 +0x8fc
created by github.com/zibbp/ganymede/internal/archive.(*Service).TaskChatConvertRestart
        /app/internal/archive/archive.go:871 +0x186

The live chat files are all in the tmp folder mounted in the container, so nothing should be missing

@Zibbp
Copy link
Owner

Zibbp commented Jan 14, 2023

Hi,
When the "Chat Convert" task gets "stuck" is it in the loading state with the loading circle or something else? If possible, can you upload all the relevant chat json files regarding this issue?

Does this happen for many streamers or just one stream? Does it happen every archive or seemly random?

@fllppi
Copy link
Author

fllppi commented Jan 14, 2023

hi,
the circle keeps spinning but doesnt finish after +12h (also no cpu/disk load or anything like that).

I haven't used this tool for that long, but it happened to several streams.
Before I ignored the error and just re-imported the videos, but currently I have 2 with this problem in the queue again.

Here are two of the chat files:
Archiv.zip

@Zibbp
Copy link
Owner

Zibbp commented Jan 15, 2023

It appears the slice bounds error is occurring because the convert function is trying to parse emotes in positions that are not there. For example this message dnfLogo dnfHerz dnfLogo dnfHerz dnfLogo which is 40 characters long believes it has emotes in positions 50-60.

                "locations": [
                    "34-40",
                    "50-56"
                ]

This happens from time to time with chat_downloader. My check for the out of bounds emotes was not adding 1 more to the "position 2" of the emote location. With this change I was able to convert the two supplied chats which were previously having issues. I'm going to do some more testing to ensure everything is OK and push out a release.

@Zibbp
Copy link
Owner

Zibbp commented Jan 15, 2023

@flip-k Version 1.1.8 has been released which includes a fix that should work for your issue. Please update and give this a try to see if it fixes your problem.

@fllppi
Copy link
Author

fllppi commented Jan 15, 2023

just tried it and seems to work, thanks for the fast fix

@fllppi fllppi closed this as completed Jan 15, 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

2 participants