liamg / darktile

:waning_crescent_moon: Darktile is a GPU rendered terminal emulator designed for tiling window managers.
MIT License
3.04k stars 113 forks source link

Crash on startup - panic: to determine current monitor the window must be set #291

Closed luke-goddard closed 3 years ago

luke-goddard commented 3 years ago

Describe the bug Crashes on startup with panic: to determine current monitor the window must be set

To Reproduce Steps to reproduce the behavior:

┌[luke☮archie]-(~/Downloads)
└> aminal -debug
2020-11-17T11:32:44.464Z        INFO    aminal/main.go:32       Allocating pty...
2020-11-17T11:32:44.465Z        INFO    aminal/main.go:58       Creating terminal...
2020-11-17T11:32:44.465Z        DEBUG   gui/gui.go:301  Creating window...
panic: to determine current monitor the window must be set

goroutine 1 [running, locked to thread]:
github.com/liamg/aminal/gui.(*GUI).GetMonitor(0xc00060a400, 0x0)
        /home/luke/go/src/github.com/liamg/aminal/gui/gui.go:86 +0x217
github.com/liamg/aminal/gui.(*GUI).calculateDpiScale(0xc00060a400, 0x0)
        /home/luke/go/src/github.com/liamg/aminal/gui/gui.go:133 +0x2f
github.com/liamg/aminal/gui.(*GUI).SetDPIScale(...)
        /home/luke/go/src/github.com/liamg/aminal/gui/gui.go:125
github.com/liamg/aminal/gui.(*GUI).Render(0xc00060a400, 0x0, 0x0)
        /home/luke/go/src/github.com/liamg/aminal/gui/gui.go:3042020-11-17T11:32:44.631Z        FATAL   aminal/main.go:71       Failed to wait for guest process: signal: killed
main.initialize.func1
        /home/luke/go/src/github.com/liamg/aminal/main.go:71
 +0x178e
main.initialize(0x0)
        /home/luke/go/src/github.com/liamg/aminal/main.go:77 +0x4b9
main.main()
        /home/luke/go/src/github.com/liamg/aminal/main.go:20 +0x2a

Expected behavior Not to crash, maybe a better error message?

Screenshots If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

└> uname -a ; go version ; echo $0 
Linux archie 5.9.1-arch1-1 #1 SMP PREEMPT Sat, 17 Oct 2020 13:30:37 +0000 x86_64 GNU/Linux
go version go1.15.4 linux/amd64
-zsh

Additional context Add any other context about the problem here.

I have quite the monitor setup. Not sure if it's relevant. Additionally I'm running https://i3wm.org/

└> xrandr 
Screen 0: minimum 8 x 8, current 9600 x 1440, maximum 32767 x 32767
DVI-D-0 disconnected primary (normal left inverted right x axis y axis)
HDMI-0 connected 1920x1080+7680+180 (normal left inverted right x axis y axis) 345mm x 195mm
   1920x1080     60.00*+
   1600x1200     60.00  
   1360x850      60.00  
   1280x1024     75.02    60.02  
   1024x768      75.03    60.00  
   800x600       75.00    60.32  
   640x480       75.00    59.94  
DP-0 connected 2560x1440+0+0 (normal left inverted right x axis y axis) 600mm x 340mm
   2560x1440     60.00*+ 144.00   120.00    84.98  
   1920x1080     60.00    59.94    50.00  
   1680x1050     59.95  
   1440x900      59.89  
   1440x576      50.00  
   1440x480      59.94  
   1280x1024     75.02    60.02  
   1280x960      60.00  
   1280x720      60.00    59.94    50.00  
   1152x864      75.00  
   1024x768      75.03    70.07    60.00  
   800x600       75.00    72.19    60.32    56.25  
   720x576       50.00  
   720x480       59.94  
   640x480       75.00    72.81    59.93    59.94  
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 connected 2560x1440+5120+0 (normal left inverted right x axis y axis) 600mm x 340mm
   2560x1440     60.00*+ 144.00   120.00    84.98  
   1920x1080     60.00    59.94    50.00  
   1680x1050     59.95  
   1440x900      59.89  
   1440x576      50.00  
   1440x480      59.94  
   1280x1024     75.02    60.02  
   1280x960      60.00  
   1280x720      60.00    59.94    50.00  
   1152x864      75.00  
   1024x768      75.03    70.07    60.00  
   800x600       75.00    72.19    60.32    56.25  
   720x576       50.00  
   720x480       59.94  
   640x480       75.00    72.81    59.93    59.94  
DP-3 disconnected (normal left inverted right x axis y axis)
DP-4 connected 2560x1440+2560+0 (normal left inverted right x axis y axis) 600mm x 340mm
   2560x1440     60.00*+ 144.00   120.00    84.98  
   1920x1080     60.00    59.94    50.00  
   1680x1050     59.95  
   1440x900      59.89  
   1440x576      50.00  
   1440x480      59.94  
   1280x1024     75.02    60.02  
   1280x960      60.00  
   1280x720      60.00    59.94    50.00  
   1152x864      75.00  
   1024x768      75.03    70.07    60.00  
   800x600       75.00    72.19    60.32    56.25  
   720x576       50.00  
   720x480       59.94  
   640x480       75.00    72.81    59.93    59.94  
DP-5 disconnected (normal left inverted right x axis y axis)

Logs Run aminal with the --debug flag, then paste the relevant debug logs here.

See above

luke-goddard commented 3 years ago

Kernel update messed up my graphics drivers. Resolved :)