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: index out of range #565

Open
pjbrunet opened this issue Feb 26, 2017 · 11 comments
Open

runtime error: index out of range #565

pjbrunet opened this issue Feb 26, 2017 · 11 comments

Comments

@pjbrunet
Copy link

Description of the problem or steps to reproduce

runtime error: index out of range
stack traceback:
[G]: in function 'sub'
:7: in function 'charAt'
:23: in main chunk
[G]: ?

Press enter to continue


Then I pressed ^C accidentally, because I was trying to copy the error, LOL. Luckily I only lost one sentence. No idea what happened.

Specifications

You can use micro -version to get the commit hash.

Version: 1.1.4-78
Commit hash: 5dc8fe4
Compiled on February 10, 2017

Commit hash:
OS: Manjaro
Terminal: Terminology

@pjbrunet
Copy link
Author

pjbrunet commented Feb 26, 2017

I think this is a duplicate of #457

@pjbrunet
Copy link
Author

I was editing a .txt file without any syntax highlighting, if that makes any difference.

@NicolaiSoeborg
Copy link
Contributor

Can you reproduce the error? and which plugins do you have installed? (ctrl + e + plugin list)

@zyedidia
Copy link
Owner

Did you have autoclose disabled or enabled?

@pjbrunet
Copy link
Author

pjbrunet commented Feb 26, 2017 via email

@pjbrunet
Copy link
Author

pjbrunet commented Feb 26, 2017 via email

@GeigerCounter
Copy link
Contributor

@pjbrunet This issue is intermittent for many and we're still investigating the cause. Zyedidia thinks it's related to the autoclose plugin, but we have yet to find any hard evidence as to the cause that I know of. Please try disabling autoclose by using > set autoclose off. If it recurrs please let us know. In the meantime, I'm going to poke around in the plugins and source to see if I can find the place where this bug occurs.

@sum01
Copy link
Contributor

sum01 commented Dec 24, 2017

Micro crashed randomly with this, seems similar

runtime error: index out of range
stack traceback:
        autoclose:226: in function <autoclose:198>
        (tailcall): ?
        autoclose:1070: in main chunk
        [G]: ?

Press enter to continue
runtime error: index out of range
stack traceback:
        [G]: in function 'concat'
        fmt:597: in function 'format'
        fmt:606: in main chunk
        [G]: ?

Press enter to continue
Micro encountered an error: runtime error: index out of range
runtime.errorString runtime error: index out of range
/home/zbyedidia/go/src/runtime/panic.go:491 (0x42b9d3)
/home/zbyedidia/go/src/runtime/panic.go:28 (0x42a6ae)
/home/zbyedidia/gopath/src/github.com/zyedidia/micro/cmd/micro/vendor/github.com/yuin/gopher-lua/state.go:440 (0x578986)
/home/zbyedidia/gopath/src/github.com/zyedidia/micro/cmd/micro/vendor/github.com/yuin/gopher-lua/auxlib.go:250 (0x545f8a)
/home/zbyedidia/gopath/src/github.com/zyedidia/micro/cmd/micro/vendor/github.com/yuin/gopher-lua/state.go:452 (0x578bdb)
/home/zbyedidia/gopath/src/github.com/zyedidia/micro/cmd/micro/vendor/github.com/yuin/gopher-lua/state.go:1661 (0x595678)
/home/zbyedidia/go/src/runtime/asm_amd64.s:510 (0x45830b)
/home/zbyedidia/go/src/runtime/panic.go:491 (0x42b9d3)
/home/zbyedidia/go/src/runtime/panic.go:28 (0x42a6ae)
/home/zbyedidia/gopath/src/github.com/zyedidia/micro/cmd/micro/vendor/github.com/yuin/gopher-lua/vm.go:801 (0x59afcf)
/home/zbyedidia/gopath/src/github.com/zyedidia/micro/cmd/micro/vendor/github.com/yuin/gopher-lua/vm.go:31 (0x5918a1)
/home/zbyedidia/gopath/src/github.com/zyedidia/micro/cmd/micro/vendor/github.com/yuin/gopher-lua/state.go:876 (0x57bb58)
/home/zbyedidia/gopath/src/github.com/zyedidia/micro/cmd/micro/vendor/github.com/yuin/gopher-lua/state.go:1610 (0x5822d8)
/home/zbyedidia/gopath/src/github.com/zyedidia/micro/cmd/micro/vendor/github.com/yuin/gopher-lua/state.go:1671 (0x5823ed)
/home/zbyedidia/gopath/src/github.com/zyedidia/micro/cmd/micro/vendor/github.com/yuin/gopher-lua/state.go:1689 (0x58286a)
/home/zbyedidia/gopath/src/github.com/zyedidia/micro/cmd/micro/plugin.go:38 (0x8c13d6)
/home/zbyedidia/gopath/src/github.com/zyedidia/micro/cmd/micro/actions.go:21 (0x881140)
/home/zbyedidia/gopath/src/github.com/zyedidia/micro/cmd/micro/actions.go:707 (0x885d2e)
/home/zbyedidia/gopath/src/github.com/zyedidia/micro/cmd/micro/view.go:476 (0x8f6324)
/home/zbyedidia/gopath/src/github.com/zyedidia/micro/cmd/micro/view.go:559 (0x8f7217)
/home/zbyedidia/gopath/src/github.com/zyedidia/micro/cmd/micro/micro.go:542 (0x8c04b8)
/home/zbyedidia/go/src/runtime/proc.go:185 (0x42d7dd)
/home/zbyedidia/go/src/runtime/asm_amd64.s:2337 (0x45aad1)

Version: 1.3.5-dev.22
Commit hash: 4e0d402
Compiled on December 24, 2017

@sum01
Copy link
Contributor

sum01 commented Dec 31, 2017

I seem to commonly get this issue if I have one file open for a long time, after lots of saves. I don't recall it happening when making quick edits.

@sum01
Copy link
Contributor

sum01 commented Mar 18, 2018

Been running into this error quite a bit lately. And I mean more than once an hour while working on a project.

Version: 1.4.1-dev.35
Commit hash: 26da85d
Compiled on March 10, 2018

@KingOfThePirates
Copy link

KingOfThePirates commented Apr 22, 2018

Since #457 seems distinct from all the other open index out of range issues, I'll post here.

Using 1.4.0.

It had been working fine, then splat!

No data loss thankfully. I started using micro this week. This was the first time I ran into this bug.

Every time I tried to reopen after the bug: when I tried to type, a bug splat on the first character entry or so. It saved this freshly pressed character though.

In the same shell, I switched to nano and finished my work.

Some more info..

Even before I closed the first shell: I opened a new shell and used it to run micro on the same file. This worked.

Considering the contrast of working states between micro and nano in the same environment, the successful run of micro in a fresh environment, and runtime.errorString runtime error: index out of range is the error, I recommend debugging with yuin/gopher-lua@f13a5aa#diff-a987904f2c16109d2be403c8d8d7f93e in mind.

Although there's since been commits to relevant files and they may have fixed this issue, it's not obvious to me those commits would've fix the issue.

However, assuming there's no data loss from this bug for anybody, if you're going to release 1.4.1 in a few months, I'd recommend instead seeing if the newer version with updated dependencies even run into this problem.

Stack trace
[username_redacted@system_name_redacted:/home_directoy/redacted/directory/redacted]$ mkdir  src

[username_redacted@system_name_redacted:/home_directoy/redacted/directory/redacted]$ kickstart-micro '' README.md
runtime error: index out of range
stack traceback:
        autoclose:226: in function <autoclose:198>
        (tailcall): ?
        autoclose:1067: in main chunk
        [G]: ?

Press enter to continue
runtime error: index out of range
stack traceback:
        autoclose:226: in function <autoclose:198>
        (tailcall): ?
        autoclose:1067: in main chunk
        [G]: ?

Press enter to continue 
Micro encountered an error: runtime error: index out of range
runtime.errorString runtime error: index out of range
/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-go-1.9.5/share/go/src/runtime/panic.go:491 (0x42be53)
/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-go-1.9.5/share/go/src/runtime/panic.go:28 (0x42ab2e)
/build/go/src/github.com/zyedidia/micro/cmd/micro/vendor/github.com/yuin/gopher-lua/state.go:440 (0x579776)
/build/go/src/github.com/zyedidia/micro/cmd/micro/vendor/github.com/yuin/gopher-lua/auxlib.go:250 (0x54696a)
/build/go/src/github.com/zyedidia/micro/cmd/micro/vendor/github.com/yuin/gopher-lua/state.go:452 (0x5799cb)
/build/go/src/github.com/zyedidia/micro/cmd/micro/vendor/github.com/yuin/gopher-lua/state.go:1661 (0x596638)
/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-go-1.9.5/share/go/src/runtime/asm_amd64.s:510 (0x45889b)
/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-go-1.9.5/share/go/src/runtime/panic.go:491 (0x42be53)
/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-go-1.9.5/share/go/src/runtime/panic.go:28 (0x42ab2e)
/build/go/src/github.com/zyedidia/micro/cmd/micro/vendor/github.com/yuin/gopher-lua/vm.go:801 (0x59c036)
/build/go/src/github.com/zyedidia/micro/cmd/micro/vendor/github.com/yuin/gopher-lua/vm.go:31 (0x592861)
/build/go/src/github.com/zyedidia/micro/cmd/micro/vendor/github.com/yuin/gopher-lua/state.go:876 (0x57c948)
/build/go/src/github.com/zyedidia/micro/cmd/micro/vendor/github.com/yuin/gopher-lua/state.go:1610 (0x583148)
/build/go/src/github.com/zyedidia/micro/cmd/micro/vendor/github.com/yuin/gopher-lua/state.go:1671 (0x58325d)
/build/go/src/github.com/zyedidia/micro/cmd/micro/vendor/github.com/yuin/gopher-lua/state.go:1689 (0x5836ea)
/build/go/src/github.com/zyedidia/micro/cmd/micro/plugin.go:38 (0x8cbc76)
/build/go/src/github.com/zyedidia/micro/cmd/micro/view.go:656 (0x9043f7)
/build/go/src/github.com/zyedidia/micro/cmd/micro/micro.go:553 (0x8cac39)
/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-go-1.9.5/share/go/src/runtime/proc.go:195 (0x42dc76)
/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-go-1.9.5/share/go/src/runtime/asm_amd64.s:2337 (0x45b061)

[username_redacted@system_name_redacted:/home_directoy/redacted/directory/redacted]$ 

[username_redacted@system_name_redacted:/home_directoy/redacted/directory/redacted]$ nano README.md 

[username_redacted@system_name_redacted:/home_directoy/redacted/directory/redacted]$ nano README.md 

[username_redacted@system_name_redacted:/home_directoy/redacted/directory/redacted]$ 

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

6 participants