Closed abdalazizrashid closed 8 months ago
Hi Maybe it's the same problem as the following. https://github.com/akiyosi/goneovim/issues/140#issuecomment-656947741
The solution is like the following
cd /path/to/goneovim && chmod u+x QtWebEngineProcess
Thanks, It seems it solved this problem, but now it just hangs with 100% CPU consumption.
strace
(partial output):
munmap(0x7f2e08624000, 11780) = 0
openat(AT_FDCWD, "/usr/share/fonts/mathjax2/HTML-CSS/STIX-Web/woff/STIXMathJax_Size2-Regular.woff", O_RDONLY) = 56
fcntl(56, F_SETFD, FD_CLOEXEC) = 0
fstat(56, {st_mode=S_IFREG|0644, st_size=7796, ...}) = 0
mmap(NULL, 7796, PROT_READ, MAP_PRIVATE, 56, 0) = 0x7f2e08630000
close(56) = 0
ltrace
(partial output):
malloc(24) = 0x23f8680
sigfillset(~<31-32>) = 0
pthread_sigmask(2, 0x7ffc366bf520, 0x7ffc366bf5a0, 0x23f8690) = 0
pthread_attr_init(0x7ffc366bf4e0, 0x7ffc366bf520, 0, 0) = 0
pthread_attr_getstacksize(0x7ffc366bf4e0, 0x7ffc366bf4d8, 0, 0) = 0
pthread_create(0x7ffc366bf4d0, 0x7ffc366bf4e0, 0xf2bbf0, 0x23f8680) = 0
pthread_detach(0x7ffa559c5700, 0x7ffa559c4eb0, 0, 0) = 0
pthread_sigmask(2, 0x7ffc366bf5a0, 0, 0) = 0
malloc(24) = 0x23f8830
sigfillset(~<31-32>) = 0
pthread_sigmask(2, 0x7ffc366bf870, 0x7ffc366bf8f0, 0x23f8840) = 0
pthread_attr_init(0x7ffc366bf830, 0x7ffc366bf870, 0, 0) = 0
pthread_attr_getstacksize(0x7ffc366bf830, 0x7ffc366bf828, 0, 0) = 0
pthread_create(0x7ffc366bf820, 0x7ffc366bf830, 0xf2bbf0, 0x23f8830) = 0
pthread_detach(0x7ffa549c3700, 0x7ffa549c2eb0, 0, 0) = 0
pthread_sigmask(2, 0x7ffc366bf8f0, 0, 0) = 0
pthread_mutex_lock(0x1f7a6a0, 0x1f5f300, 0xc000044720, 0) = 0
pthread_cond_broadcast(0x1f7a6e0, 0x1f5f300, 0, 0) = 0
pthread_mutex_unlock(0x1f7a6a0, 0x1f5f300, 0, 0) = 0
mmap(0, 0x40000, 3, 34) = 0x7ffa54183000
mmap(0, 0x15f8f8, 3, 34) = 0x7ffa54023000
mmap(0, 0x40000, 3, 34) = 0x7ffa3f7bf000
setenv("LD_LIBRARY_PATH", "/home/aziz/src/Goneovim/lib", 1) = 0
setenv("QT_PLUGIN_PATH", "/home/aziz/src/Goneovim/plugins", 1) = 0
setenv("RESOURCE_NAME", "goneovim", 1) = 0
setenv("QT_AUTO_SCREEN_SCALE_FACTOR", "1", 1) = 0
_ZN11QMetaObject14normalizedTypeEPKc(0x7ffc366bf940, 0x141f9cb, 1, 0xc0004c79e0) = 0x7ffc366bf940
_ZN9QMetaType22registerNormalizedTypeERK10QByteArrayPFvPvEPFS3_S3_PKvEi6QFlagsINS_8TypeFlagEEPK11QMetaObject(0x7ffc366bf940, 0xe52280, 0xe52290, 8) = 1026
_Znwm(16, 0x1f5f300, 0xc0004c7930, 0xc0004c79a0) = 0x23f90f0
_ZN7QObjectC2EPS_(0x23f90f0, 0, 0x7ffa5cd629e0, 0x23f9100) = 0
_ZN11QMetaObject14normalizedTypeEPKc(0x7ffc366bf930, 0x141f9af, 0, 0) = 0x7ffc366bf930
_ZN9QMetaType25registerNormalizedTypedefERK10QByteArrayi(0x7ffc366bf930, 5, 0xffffffff, 0x7ffa65912600) = 5
pthread_mutex_lock(0x1f7a6a0, 0x7ffc366bf890, 2, 0) = 0
pthread_mutex_unlock(0x1f7a6a0, 0x7ffc366bf890, 1, 0) = 0
pthread_mutex_lock(0x1f7a6a0, 0x1f5f300, 0x1f5f860, 1) = 0
pthread_mutex_unlock(0x1f7a6a0, 0x1f5f300, 0, 0) = 0
_Znwm(32, 0, 0xc0004c78d8, 0xc0004c7948) = 0x23f9380
_ZN7QObject11connectImplEPKS_PPvS1_S3_PN9QtPrivate15QSlotObjectBaseEN2Qt14ConnectionTypeEPKiPK11QMetaObject(0x7ffc366bf938, 0x23f90f0, 0x7ffc366bf940, 0x23f90f0 <unfinished ...>
pthread_mutex_lock(0x1f7a6a0, 0x7ffc366bf7f0, 0x7ffa65814760, 0x7ffa659dfac0) = 0
pthread_mutex_unlock(0x1f7a6a0, 0x7ffc366bf7f0, 1, 0) = 0
_ZN7QObject13connectNotifyERK11QMetaMethod(0x23f90f0, 0x7ffc366bf7f0, 0xc0004c75f0, 0xc0004c7660) = 0xe4e030
pthread_mutex_lock(0x1f7a6a0, 0x1f5f300, 0x1f5f860, 1) = 0
pthread_mutex_unlock(0x1f7a6a0, 0x1f5f300, 0, 0) = 0
<... _ZN7QObject11connectImplEPKS_PPvS1_S3_PN9QtPrivate15QSlotObjectBaseEN2Qt14ConnectionTypeEPKiPK11QMetaObject resumed> ) = 0x7ffc366bf938
_ZN11QMetaObject10ConnectionD1Ev(0x7ffc366bf938, 0, 0, 0) = 0x7ffc366bf938
mmap(0, 0x10000, 3, 34) = 0x7ffa3df6c000
[1] 63989 segmentation fault (core dumped) ltrace ./goneovim
What is the content of ~/.goneovim/setting.toml
?
# ~/.goneovim/setting.toml
[Editor]
## Editor minimum window width (>= 400)
Width = 800
## Editor minimum window height (>= 300)
Height = 600
## Editor external font-family, font-size, and linespace.
## This is the font and linespace settings of the graphical UI as an nvim front end.
## For example, linespace affects the margins of the external completion popup menu UI.
## Font settings in nvim are set with well-known options, such as `:set guifont = hoge:h10`, `:set linespace=4`.
# FontFamily = "Monospace"
# FontSize = 14
# Linespace = 6
## Neovim external UI features
## The following is the default value of goneovim.
## You can change the behavior of the GUI by changing the following boolean values.
## If you prefer the traditional Vim UI, set it to false for all.
## Also, `ExtMessages` is still experimental at this time and we don't recommend setting it to true if you want stability.
ExtCmdline = true
ExtPopupmenu = false
ExtTabline = true
ExtMessages = false
## Copy yanked text to clipboard
# Clipboard = false
## Goneovim has a cached rendering feature enabled to speed up the process.
## If you want to disable it, set it to false
# CachedDrawing = true
## You can specify the cache size to be used by the cache rendering feature of goneovim.
## The default is 320.
# CacheSize = 320
## The input method editor will be automatically disabled when the mode is changed to normal mode.
## It may be useful for users who use the input method editor (e.g. East Asian People).
DisableImeInNormal = false
## You can write a vimscript to be executed after goneovim starts,
## for example to disable the vimscript that Goneovim has embedded internally.
# GinitVim = '''
# let g:hoge =fuga
# '''
## Launch goneovim with full screen window size.
# StartFullscreen = false
## This option makes the whole GUI window in semi-transparent.
## This setting also implicitly enables the Drawborder setting
Transparent = 1.0
## Draw borders on the GUI side instead of the vertical border and status line that nvim draws.
DrawBorder = false
## Draw built-in indent guide
IndentGuide = true
## Draw border on a float window
# DrawBorderForFloatWindow = false
## Draw shadow under a float window
# DrawShadowForFloatWindow = false
## Enable desktop notification settings for nvim messages.
## This option works only if `ExtMessages` is enabled.
# DesktopNotifications = false
# Pattern that fills the diff background
# Change the background pattern used for diff display.
# This option allows you to use a visual effect pattern such as Dense, Diagonal Stripe instead of a regular solid pattern.
# The available patterns are all Qt brush styles. For more information, See: https://doc.qt.io/qt-5/qbrush.html#details
# // -- diffpattern enum --
# // SolidPattern 1
# // Dense1Pattern 2
# // Dense2Pattern 3
# // Dense3Pattern 4
# // Dense4Pattern 5
# // Dense5Pattern 6
# // Dense6Pattern 7
# // Dense7Pattern 8
# // HorPattern 9
# // VerPattern 10
# // CrossPattern 11
# // BDiagPattern 12
# // FDiagPattern 13
# // DiagCrossPattern 14
# // LinearGradientPattern 15
# // RadialGradientPattern 16
# // ConicalGradientPattern 17
# // TexturePattern 24
DiffAddPattern = 1
DiffDeletePattern = 1
DiffChangePattern = 1
# Display the effect when clicked
ClickEffect = false
[Palette]
## Specifies the proportion of the command line palette to the height of the entire window.
AreaRatio = 0.5
## Specifies the number of items to be displayed in the command line palette.
MaxNumberOfResultItems = 30
## Specifies the opacity of the command line palette.
Transparent = 1.0
[Message]
## Specifies the opacity of the message window.
Transparent = 1.0
## The statusline configuration below relates to the display of Goneovim's own external status lines.
## If you want to use neovim's status line plugin, you should disable its display.
[Statusline]
## Whether or not to display the external status line
Visible = false
## Options: "textLabel" / "icon" / "background" / "none"
# ModeIndicatorType = "textLabel"
## Optional setting colors per Neovim editing modes
# NormalModeColor = "#3cabeb"
# CommandModeColor = "#5285b8"
# InsertModeColor = "#2abcb4"
# ReplaceModeColor = "#ff8c0a"
# VisualModeColor = "#9932cc"
# TerminalModeColor = "#778899"
## Statusline components
# Left = [ "mode", "filepath", "filename" ]
# Right = [ "message", "git", "filetype", "fileformat", "fileencoding", "curpos", "lint" ]
[Tabline]
## Whether or not to display the external tabline
Visible = true
[Popupmenu]
## neovim's popupmenu is made up of word, menu and info parts.
## Each of these parts will display the following information.
## word: the text that will be inserted, mandatory
## menu: extra text for the popup menu, displayed after "word"
## info: more information about the item, can be displayed in a preview window
## The following options specify whether to display a dedicated column in the popupmenu
## to display the long text displayed in the `info` part.
ShowDetail = true
## total number to display item
Total = 20
## width of `menu` column
MenuWidth = 400
## width of `info` column
InfoWidth = 1
## width of `detail` column
DetailWidth = 250
[Lint]
## Specifies whether the external linter tooltip should be displayed or not.
Visible = true
[MiniMap]
## To view the minimap, launch an additional nvim instance;
## setting Disable to true will not launch this additional nvim instance
## and will completely disable the minimap feature.
Disable = false
## Specifies whether to show the minimap or not.
Visible = false
## Specifies the width of the minimap.
Width = 120
[ScrollBar]
## Specifies whether to show the external scrollbar or not.
Visible = false
[SideBar]
## Specifies whether to show the external sidebar or not.
Visible = false
## Specify whether or not to draw a shadow under the sidebar.
DropShadow = false
## Specify the sidebar width
Width = 200
## Specify the color to use when selecting items in the sidebar or palette in hexadecimal format
AccentColor = "#5596ea"
[Workspace]
## This setting sets the format of the path string of CWD in the sidebar.
## name: directoryname
## full: /path/to/directoryname
## minimum: /p/t/directoryname
PathStyle = "minimum"
## Specifies whether the last exited session should be restored at the next startup.
RestoreSession = false
[FileExplore]
## Specify the maximum number of items to be displayed in the file explorer.
MaxDisplayItems = 30
Thanks for quick reply :) One more thing.
Could this problem be reproduced in /path/to/goneovim -u NONE
?
Yes, same behaviour. Any idea about the problem?
Yeah, sure.
Umm, I can't reproduced it in my archlinux (5.3.10-arch-1). Is it because the version of archlinux is old...?
Maybe, I'm not really sure. Try to update?
I'm going to try to update archlinux. Could you remove the setting.toml file and see if it reproduces?
Hm, nothing changed the exact same behaviour!
Any news?
What is your desktop environment? (KDE, GNOME, MATE, or somthing)
I3
Hi, sorry for late. I've tried to create an environment close to yours, but I can't reproduce the probrem that causes CPU high load.
Are there any other applications that are specific to your environment?
Well, nothing special :confused:
What about we schedule an online meeting so I can share my screen and do live debugging?
I'm working on this repository in between jobs, so live debugging is difficult.
Is it possible to setup a goneovim development environment in your PC and use a debugger such as delve to pick up any potentially problematic processes?
The following pages describe the basic setup instructions.
https://github.com/akiyosi/goneovim/wiki/Development
If you have any detailed questions, you can ask us in the chat room and we can answer them.
So, after spending some time trying to figure out what's going on and reinstalling qt This time I got a new error division by Zero)
panic: runtime error: integer divide by zero
goroutine 38 [running]:
github.com/akiyosi/goneovim/editor.(*MiniMap).updateRows(0xc000197e00, 0x1)
github.com/akiyosi/goneovim/editor/minimap.go:189 +0x81
github.com/akiyosi/goneovim/editor.(*MiniMap).updateSize(0xc000197e00)
github.com/akiyosi/goneovim/editor/minimap.go:212 +0x4c
github.com/akiyosi/goneovim/editor.(*MiniMap).startMinimapProc(0xc000197e00)
github.com/akiyosi/goneovim/editor/minimap.go:130 +0x310
github.com/akiyosi/goneovim/editor.newWorkspace.func2(0xc00023a000)
github.com/akiyosi/goneovim/editor/workspace.go:221 +0x42
created by github.com/akiyosi/goneovim/editor.newWorkspace
github.com/akiyosi/goneovim/editor/workspace.go:217 +0xcb8
Hi I appreciate your research.
I see; Goneovim determines the number of rows and columns based on the size of the minimap widget and the font size, but for some reason the font width and height seem to be zero.
In any case, I'll fix it, as it's not good code that can be divided by zero.
@akiyosi Just jumping in, I can use the GitHub Actions build from the refactor branch right?
@p00f Yes, you can use the build
BTW, this issue is related to the font issue in arch linux. I wonder if arch linux doesn't have "monospace" font by default. Umm.
I'm not sure what you mean. When you install a DE, you have to compulsorily install one of gnu-free-fonts, ttf-dejavu, or ttf-liberation
All the three have monospace variants included.
As in @abdalazizrashid 's case, I don't know about i3. (sorry for tagging you twice :P)
Actually I have two possible explanations: 1) Atleast in GNOME, Qt apps don't recognise certain fonts as monospace. This happened to me in nvim-qt, Konsole and Qterminal. 2) I remember redditors in r/archlinux posting about missing fonts when they use only WMs (i3 etc) so it is possible that @abdalazizrashid doesn't have monospace fonts at all. (Very unlikely)
Thanks for the suggestions. I have many monospace fonts actually...
So, I tried the patched version #143 the GUI still take a couple of minutes to load with full CPU load, but this time the GUI loads successfully with a message on the console: nvim:nvim_ui_attach validation: Expected width > 0 and height > 0
and It seems that this is the source of the https://github.com/neovim/neovim/blob/master/src/nvim/api/ui.c#L104.
Also, I can't type anything in the editor
I also tried it in dwm window manager, with the same behaviour.
okay, just to be sure, can you try it in a DE? like gnome or kde
okay, just to be sure, can you try it in a DE? like gnome or kde
please don't take this otherwise 😅
I don't have Gnome or KDE)
I don't have Gnome or KDE)
install it duh (btw I'm totally unqualified, don't listen to me)
Tried the nightly release and the stable release, the same problem failing to start. Kernel version
5.7.7-arch1-1