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: slice bounds out of range [:-1] #24

Open
Michdo93 opened this issue Nov 3, 2021 · 3 comments
Open

panic: runtime error: slice bounds out of range [:-1] #24

Michdo93 opened this issue Nov 3, 2021 · 3 comments

Comments

@Michdo93
Copy link

Michdo93 commented Nov 3, 2021

I got following error:

panic: runtime error: slice bounds out of range [:-1]

@xiaofengjue
Copy link

I also got the same problem,

@acmpo6ou
Copy link

acmpo6ou commented Nov 4, 2023

Could this be a problem because there are multiple smali folders? I have smali, smali_classes2, smali_classes3, etc. Maybe it's looking only withing the smali dir, and can't find references to stuff from other smali folders?

The command I used is:

../smali2java_darwin_amd64  -path_to_smali=smali

output:

panic: runtime error: slice bounds out of range [:-1]

goroutine 1 [running]:
github.com/alexeysoshin/smali2java/parser.(*MethodParser).Parse(0xc0007279d8, 0xc000727a80, 0xc0002e7c20, 0x5, 0x5, 0x100cb30, 0xf8a4)
	/Users/alexeysoshin/GitHub/smali2java/parser/method.go:84 +0xfb2
github.com/alexeysoshin/smali2java/parser.(*JavaFile).ParseLine(0xc000727a80, 0xc0004bc8a0, 0x5e, 0xc0004bc8a0, 0x5e)
	/Users/alexeysoshin/GitHub/smali2java/parser/java_file.go:117 +0x9f3
main.convertSmali(0xc0004a8720, 0x10, 0xc0000180a0)
	/Users/alexeysoshin/GitHub/smali2java/smali2java.go:70 +0x236
main.parseSmaliFiles.func1(0xc0004a8720, 0x10, 0x1114ea0, 0xc00006a680, 0x0, 0x0, 0x7, 0xc000727c80)
	/Users/alexeysoshin/GitHub/smali2java/smali2java.go:40 +0x185
path/filepath.walk(0xc0004a8720, 0x10, 0x1114ea0, 0xc00006a680, 0xc000727f10, 0x0, 0x0)
	/usr/local/Cellar/go/1.15.3/libexec/src/path/filepath/path.go:360 +0x423
path/filepath.walk(0xc0002f30f0, 0x8, 0x1114ea0, 0xc00006a340, 0xc000727f10, 0x0, 0x0)
	/usr/local/Cellar/go/1.15.3/libexec/src/path/filepath/path.go:384 +0x2fe
path/filepath.walk(0x2055fd37a, 0x5, 0x1114ea0, 0xc00006b040, 0xc000727f10, 0x0, 0x10)
	/usr/local/Cellar/go/1.15.3/libexec/src/path/filepath/path.go:384 +0x2fe
path/filepath.Walk(0x2055fd37a, 0x5, 0xc000070f10, 0x10bb305, 0xc00005e180)
	/usr/local/Cellar/go/1.15.3/libexec/src/path/filepath/path.go:406 +0x105
main.parseSmaliFiles(0x2055fd37a, 0x5)
	/Users/alexeysoshin/GitHub/smali2java/smali2java.go:29 +0x76
main.main()
	/Users/alexeysoshin/GitHub/smali2java/smali2java.go:23 +0xe8

@alvaroyecla
Copy link

Same here

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

4 participants