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

panic: runtime error: index out of range [1] with length 0 #9

Open
nikarc opened this issue Aug 11, 2024 · 4 comments
Open

panic: runtime error: index out of range [1] with length 0 #9

nikarc opened this issue Aug 11, 2024 · 4 comments

Comments

@nikarc
Copy link

nikarc commented Aug 11, 2024

Hey. I just started getting this error after a system update.

$ twad                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
panic: runtime error: index out of range [1] with length 0

goroutine 20 [running]:
github.com/zmnpl/twad/ports/savesStats.reSubMatchMap(0xc00096e0a0, {0xc0003b2140?, 0x0?})
        github.com/zmnpl/twad/ports/savesStats/helper.go:110 +0x10c
github.com/zmnpl/twad/ports/savesStats.GetBoomStats({0xc0003b20c0?, 0xc0003b0000?})
        github.com/zmnpl/twad/ports/savesStats/boom.go:23 +0x105
github.com/zmnpl/twad/games.(*Game).GetStats(0xc00014a818, {0x0, 0x0})
        github.com/zmnpl/twad/games/game.go:378 +0xf2
github.com/zmnpl/twad/games.(*Game).ReadLatestStats(0xc00014a818)
        github.com/zmnpl/twad/games/game.go:389 +0x32
created by github.com/zmnpl/twad/games.loadGames in goroutine 1
        github.com/zmnpl/twad/games/gameList.go:127 +0x90
$ uname -r                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
6.10.3-arch1-2
$ pacman -Qi twad-git
Name            : twad-git
Version         : 0.22.1.3-1
Description     : Manage DOOM engines and mods with the terminal wad launcher
Architecture    : any
URL             : https://github.com/zmnpl/twad
Licenses        : MIT
Groups          : None
Provides        : None
Depends On      : None
Optional Deps   : None
Required By     : None
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 8.90 MiB
Packager        : Unknown Packager
Build Date      : Sun 11 Aug 2024 05:57:32 AM EDT
Install Date    : Sun 11 Aug 2024 05:57:38 AM EDT
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : None
@error-27
Copy link

error-27 commented Aug 11, 2024

I'm getting this same issue (Linux Mint 22, bug has been around for at least a few months now). I noticed it only happened to me after I ran dsda-doom for the first time though.

@zmnpl
Copy link
Owner

zmnpl commented Sep 25, 2024

Hi both, sorry for the delay here. Summer time is vacation time. I'll look into this and see what I can do.
Edit: Would you mind giving some more info?
I could use:

  • When exactly does it happen when using twad?
  • Specific game configuration?
  • Port?
  • Iwad?
  • Other parameters / settings?

Maybe a screenshot of the twad ui with the specific situation?

Regards

@error-27
Copy link

Ok, I went to go test a little since its been a minute. Interestingly, it's no longer happening when I use DSDA-Doom, or at least not in my couple minutes of running around and trying to get a crash. I'll update if I pinpoint anything.

@zmnpl
Copy link
Owner

zmnpl commented Sep 26, 2024

Alright, thanks for the answer. I cannot reproduce the issue on my end currently either, but will leave this open since I think DSDA acts a little funky and I guess I need to add at least a section in the readme for it. It migt be the case that the unusual behaviour in some instances causes the issues here. Still twad should not crash in these instances but just either warn or go over it gracefully.

Some examles of what I mean:
The -save flag does not work on it's own. There is another flag in the options / config file of dsda which needs to be switched in order to re-route save files to the twad folder. "Organize my save files -> no" or "dsda_organize_saves 0".

-levelstat does not seem to work or at least I am not able to find the stat file and this file is used for displaying stats in boom-family ports.

Anyway, again cheers and thanks!

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