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

command_prefs.json should be recreated if missing - possible crash if file command_prefs.json missing #133

Closed
rohrlich opened this issue Feb 9, 2020 · 7 comments

Comments

@rohrlich
Copy link
Contributor

rohrlich commented Feb 9, 2020

Many of the std cmds are not in the exec cmd list so I thought it might be a problem with stale command_prefs as I haven't been using gide in several months.

rohrlich@MacBook-Pro-5:gide:> ./gide
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x4bcf72b]

goroutine 41 [running]:
github.com/goki/ki/ki.(*Node).Child(...)
/Users/rohrlich/go/src/github.com/goki/ki/ki/node.go:589
github.com/goki/gide/gidev.(*GideView).TextViewByIndex(0xc000203500, 0x0, 0x4e2c260)
/Users/rohrlich/go/src/github.com/goki/gide/gidev/gideview.go:2213 +0xbb
github.com/goki/gide/gidev.(*GideView).ActiveTextView(...)
/Users/rohrlich/go/src/github.com/goki/gide/gidev/gideview.go:439
github.com/goki/gide/gidev.ExecCmds(0x4ed5e20, 0xc000203500, 0xc000202a80, 0x41a1d0a, 0x4edd6a6, 0x51cfbc0)
/Users/rohrlich/go/src/github.com/goki/gide/gidev/gideview.go:1373 +0xaf
github.com/goki/gi/giv.MethViewSubMenuFunc(0x5197ce0, 0xc0009ce600, 0xc0009cfe40)
/Users/rohrlich/go/src/github.com/goki/gi/giv/methview.go:953 +0xb3f
github.com/goki/gi/gi.(*ButtonBase).OpenMenu(0xc0009ce600, 0x5197ce0)
/Users/rohrlich/go/src/github.com/goki/gi/gi/buttons.go:351 +0x83
github.com/goki/gi/gi.(*Action).ButtonRelease(0xc0009ce600)
/Users/rohrlich/go/src/github.com/goki/gi/gi/action.go:224 +0x172
github.com/goki/gi/gi.(*ButtonBase).MouseEvent.func1(0x5197ce0, 0xc0009ce600, 0x51a04e0, 0xc000918000, 0x0, 0x4dee060, 0xc000682d00)
/Users/rohrlich/go/src/github.com/goki/gi/gi/buttons.go:446 +0xcd
github.com/goki/gi/gi.(*WinEventRecv).Call(0xc00696dd88, 0x51a04e0, 0xc000918000, 0x0, 0x4dee060, 0xc000682d00)
/Users/rohrlich/go/src/github.com/goki/gi/gi/events.go:116 +0x8c
github.com/goki/gi/gi.(*EventMgr).SendEventSignal(0xc000918190, 0x51374c0, 0xc000682d00, 0x1)
/Users/rohrlich/go/src/github.com/goki/gi/gi/events.go:237 +0x54f
github.com/goki/gi/gi.(*Window).ProcessEvent(0xc000918000, 0x51374c0, 0xc000682d00)
/Users/rohrlich/go/src/github.com/goki/gi/gi/window.go:1508 +0x8ec
github.com/goki/gi/gi.(*Window).EventLoop(0xc000918000)
/Users/rohrlich/go/src/github.com/goki/gi/gi/window.go:1445 +0x36
created by github.com/goki/gi/gi.(*Window).GoStartEventLoop
/Users/rohrlich/go/src/github.com/goki/gi/gi/window.go:860 +0xa6

@rohrlich
Copy link
Contributor Author

rohrlich commented Feb 9, 2020

Not reproducing.

@rohrlich rohrlich changed the title Crash if file command_prefs.json missing command_prefs.json should be recreated if missing - possible crash if file command_prefs.json missing Feb 9, 2020
@rohrlich
Copy link
Contributor Author

rohrlich commented Feb 9, 2020

Hmmm, gide commands window is empty. I think any missing prefs file should be recreated with defaults if it isn't found.

@rcoreilly
Copy link
Member

it should start out with defaults. something is getting overwritten by an empty setting?

@rcoreilly
Copy link
Member

ps. can you try to reproduce your other crash about keymaps at startup and close that ticket if it is now fixed?

@rohrlich
Copy link
Contributor Author

rohrlich commented Feb 9, 2020

yes

@rohrlich
Copy link
Contributor Author

rohrlich commented Feb 9, 2020

actually, already closed and I retested as well.

@rcoreilly
Copy link
Member

I couldn't reproduce any issue from not having them, but also if you don't have any, then you can't create any -- side effect of how tableview works now. fixed.

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