Skip to content
This repository has been archived by the owner on Dec 20, 2021. It is now read-only.

index out of range [1024] with length 1024 #1092

Closed
Vitexus opened this issue Mar 20, 2021 · 2 comments
Closed

index out of range [1024] with length 1024 #1092

Vitexus opened this issue Mar 20, 2021 · 2 comments

Comments

@Vitexus
Copy link

Vitexus commented Mar 20, 2021

Application crash at start
It does not start at all :(

To Reproduce
Steps to reproduce the behavior:

  1. git pull
  2. ./build.sh'
  3. ./OpenDiablo2
  4. wait for miracle

Expected behavior
Game up and running

Screenshots

obrazek

Desktop (please complete the following information):

  • OS: Debian
  • Version 10

Additional context
go version go1.15.6 linux/amd64

vitex@exiv:~/Projects/Packaging/Games/OpenDiablo2$ ./OpenDiablo2 
[App][INFO] OpenDiablo2 - Open source Diablo 2 engine
[File Loader][INFO] Adding source: '.'
[File Loader][INFO] Adding source: '/home/vitex/.config/OpenDiablo2'
[File Loader][INFO] Loaded /home/vitex/.config/OpenDiablo2 -> config.json
[App][INFO] loaded configuration file from 
[File Loader][INFO] Adding source: '/home/vitex/Projects/Packaging/Games/OpenDiablo2/mpq/Patch_D2.mpq'
[File Loader][INFO] Adding source: '/home/vitex/Projects/Packaging/Games/OpenDiablo2/mpq/d2exp.mpq'
[File Loader][INFO] Adding source: '/home/vitex/Projects/Packaging/Games/OpenDiablo2/mpq/d2xmusic.mpq'
panic: runtime error: index out of range [1024] with length 1024

goroutine 1 [running, locked to thread]:
github.com/OpenDiablo2/OpenDiablo2/d2core/d2render/d2sdl2renderer.(*surface).pushCurrentState(...)
        /home/vitex/Projects/Packaging/Games/OpenDiablo2/d2core/d2render/d2sdl2renderer/sdl2_surface.go:216
github.com/OpenDiablo2/OpenDiablo2/d2core/d2render/d2sdl2renderer.(*surface).PushTranslation(0xc00028a000, 0x0, 0x0)
        /home/vitex/Projects/Packaging/Games/OpenDiablo2/d2core/d2render/d2sdl2renderer/sdl2_surface.go:235 +0x148
github.com/OpenDiablo2/OpenDiablo2/d2common/d2util.(*GlyphPrinter).drawDebugText(0xc000037f00, 0xc77360, 0xc00028a000, 0xc00068cb00, 0xfe, 0x0, 0x0, 0x7c2f00)
        /home/vitex/Projects/Packaging/Games/OpenDiablo2/d2common/d2util/debug_print.go:103 +0xf2
github.com/OpenDiablo2/OpenDiablo2/d2common/d2util.(*GlyphPrinter).PrintAt(...)
        /home/vitex/Projects/Packaging/Games/OpenDiablo2/d2common/d2util/debug_print.go:86
github.com/OpenDiablo2/OpenDiablo2/d2common/d2util.(*GlyphPrinter).Print(...)
        /home/vitex/Projects/Packaging/Games/OpenDiablo2/d2common/d2util/debug_print.go:78
github.com/OpenDiablo2/OpenDiablo2/d2core/d2render/d2sdl2renderer.(*surface).DrawTextf(0xc00028a000, 0xc000094200, 0xfe, 0x0, 0x0, 0x0)
        /home/vitex/Projects/Packaging/Games/OpenDiablo2/d2core/d2render/d2sdl2renderer/sdl2_surface.go:187 +0x128
github.com/OpenDiablo2/OpenDiablo2/d2app.(*App).updateInitError(0xc0001bf400, 0xc772a0, 0xc000037e80, 0x0, 0x0)
        /home/vitex/Projects/Packaging/Games/OpenDiablo2/d2app/app.go:603 +0xda
github.com/OpenDiablo2/OpenDiablo2/d2core/d2render/d2sdl2renderer.(*Renderer).Run(0xc000037e80, 0xc0004ac1a0, 0xbc0458, 0x320, 0x258, 0xc000028440, 0x13, 0xc000037c40, 0xc0002721b0)
        /home/vitex/Projects/Packaging/Games/OpenDiablo2/d2core/d2render/d2sdl2renderer/sdl2_renderer.go:122 +0x122
github.com/OpenDiablo2/OpenDiablo2/d2app.(*App).Run(0xc0001bf400, 0x0, 0x0)
        /home/vitex/Projects/Packaging/Games/OpenDiablo2/d2app/app.go:320 +0x382
main.main()
        /home/vitex/Projects/Packaging/Games/OpenDiablo2/main.go:26 +0x8c
@gucio321
Copy link
Contributor

gucio321 commented Mar 20, 2021

Hi,
From your "Steps To Reproduce" I can see, that you cloned repo in past, so
could you try to download a new copy of the game
git clone https://github.com/OpenDiablo2/OpenDiablo2
and then

cd OpenDiablo2
./build.sh
./OpenDiablo2

you can also try to "remove" your old config (because some time ago we did a changes in config struct)
rm ~/.config/OpenDiablo2/config.json
and let game to create a new one

and if it doesn't work, try to run the game in verbose mode:
go run . -l 6 or ./OpenDiablo2 -l 6

@Vitexus
Copy link
Author

Vitexus commented Mar 20, 2021

Thank you very much. New clone of source code works for me.

@Vitexus Vitexus closed this as completed Mar 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants