Lazygit: X size of the view cannot be 0

Created on 20 Aug 2018  路  7Comments  路  Source: jesseduffield/lazygit

lazygit throw exception

2018/08/20 11:29:08 X size of the view cannot be 0
panic: X size of the view cannot be 0

goroutine 1 [running]:
log.Panicln(0xc420065ea0, 0x1, 0x1)
    /usr/lib/go-1.10/src/log/log.go:340 +0xc0
github.com/jesseduffield/lazygit/pkg/gui.(*Gui).RunWithSubprocesses(0xc420108c60)
    /build/lazygit-PUrRM3/lazygit-0.1.75/obj-x86_64-linux-gnu/src/github.com/jesseduffield/lazygit/pkg/gui/gui.go:359 +0xab
main.main()
    /build/lazygit-PUrRM3/lazygit-0.1.75/obj-x86_64-linux-gnu/src/github.com/jesseduffield/lazygit/main.go:48 +0x126

To Reproduce

  1. install like ubuntu install instructions
  2. echo "alias lg='lazygit'" >> ~/.zshrc
  3. run lazygit

Expected behavior
should open lazygit ? :)

Desktop (please complete the following information):

  • OS: Linux xxxxx 4.15.0-29-generic #31-Ubuntu SMP Tue Jul 17 15:39:52 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
  • Lazygit Version commit=, build date=2018-08-20, version=, os=linux, arch=amd64

Additional context
Add any other context about the problem here.

Most helpful comment

awesome thanks @dawidd6

All 7 comments

I'm experiencing the same error on Ubuntu 16.04

I believe what is happening here is that the version variable is empty, and we're trying to render a view that contains that version number as its contents, so the view has a width of zero. I have removed the VERSION file from the repo which I now recall (ashamedly) was being used to store the version number for linux packages. The resolution for now will be to set a minimum width on that view, but I'll need to either return the VERSION file back to how it was or find a way to obtain the version file from the git repo itself.

@dawidd6 Is the lack of commit and version number here due to depending on the VERSION file? (excuse my poor memory haha). Are we able to obtain the latest tag via git describe --abbrev=0 --tags with the master branch checked out, or does the current linux packaging process not support that?

Fixed in https://github.com/jesseduffield/lazygit/pull/195 (pending a better fix around the empty version string)

Each distro will have its own way of handling versions, decoupled from the app. For example, Fedora shows an example of using commit hash. If you're OK with experimental features package version support is being added to Go.

Yep, the problem exist due to lack of VERSION file. I think i will do some hackery. As i'm currently providing packages built from releases and from master:

  • the ones from releases will only contain version number and no commit sha
  • the ones from master will only contain commit sha and no version number

I can't really rely on git when building package on launchpad and it should be okay the way i've described above.

UPDATE: Done as i said above. Latest packages should be okay.

@jesseduffield #195 fix works thanks !

awesome thanks @dawidd6

Was this page helpful?
0 / 5 - 0 ratings

Related issues

LanderMoerkerke picture LanderMoerkerke  路  7Comments

5minpause picture 5minpause  路  6Comments

stratosgear picture stratosgear  路  5Comments

jangalinski picture jangalinski  路  4Comments

voigtan picture voigtan  路  4Comments