davatorium / rofi

Rofi: A window switcher, application launcher and dmenu replacement
https://davatorium.github.io/rofi/
Other
13.06k stars 608 forks source link

Segfault when run rofi 1.5.1 #825

Closed gBopHuk closed 6 years ago

gBopHuk commented 6 years ago

Version

Version: 1.5.1

Configuration

$ rofi -help Segmentation fault

Launch Command

rofi and rofi --help Everything rofi commands segfaults. But --version works

Steps to reproduce

What behaviour you see

What behaviour you expect to see

gBopHuk commented 6 years ago

Gdb wtih debuginfo files

(gdb) run rofi
Starting program: /usr/bin/rofi rofi
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Missing separate debuginfo for /usr/lib64/libfreetype-infinality/libfreetype.so.6
Try to install the hash file /usr/lib/debug/.build-id/89/882892327b85a0c5cdd94b601cca6efa563622.debug

Program received signal SIGSEGV, Segmentation fault.
yylex (yylval_param=yylval_param@entry=0x7fffffffd838, yylloc_param=yylloc_param@entry=0x7fffffffd858) at lexer/theme-lexer.l:244
244 YY_LLOC_START
(gdb) bt
#0  yylex (yylval_param=yylval_param@entry=0x7fffffffd838, yylloc_param=yylloc_param@entry=0x7fffffffd858) at lexer/theme-lexer.l:244
#1  0x00000000004177b5 in yyparse (
    what=what@entry=0x4451c0 <resources_resource_data+216> "/**\n * rofi -dump-theme output.\n **/\n* {\n    selected-normal-foreground:  @lightbg;\n    foreground:", ' ' <repeats 18 times>, "rgba ( 0, 43, 54, 100 % );\n    normal-foreground:", ' ' <repeats 11 times>, "@foreground;\n    altern"...)
    at lexer/theme-parser.c:3443
#2  0x000000000041af66 in rofi_theme_parse_string (
    string=0x4451c0 <resources_resource_data+216> "/**\n * rofi -dump-theme output.\n **/\n* {\n    selected-normal-foreground:  @lightbg;\n    foreground:", ' ' <repeats 18 times>, "rgba ( 0, 43, 54, 100 % );\n    normal-foreground:", ' ' <repeats 11 times>, "@foreground;\n    altern"...) at lexer/theme-lexer.l:663
#3  0x00000000004119c5 in main (argc=<optimized out>, argv=0x7fffffffe408) at source/rofi.c:898
(gdb) 
gBopHuk commented 6 years ago

Wrong button - reopen

DaveDavenport commented 6 years ago

Can you pastebin your configuration file. It seems to choke on that. (Xresources (xrdb -query) if you use it and ~/.config/rofi/config if you use it.)

Thanks.

gBopHuk commented 6 years ago
$ xrdb -query
*VT100*colorBD: blue
*VT100*colorBDMode: true
*VT100*colorUL: magenta
*VT100*colorULMode: true
*VT100*dynamicColors:   true
*VT100*fontMenu*fontdefault*Label:  Default
*VT100*highlightSelection:  true
*VT100*reverseWrap: true
*VT100*saveLines:   9999
*VT100*scrollBar:   true
*VT100*scrollKey:   true
*VT100*scrollTtyOutput: false
*VT100*titeInhibit: false
*VT100*underLine:   false
*VT100*visualBell:  false
*VT100.allowC1Printable:    true
*VT100.eightBitInput:   false
*backarrowKeyIsErase:   true
*customization: -color
Aterm*saveLines:    9999
Aterm*scrollBar:    true
Aterm*scrollKey:    true
Aterm*scrollTtyOutput:  false
Aterm*titeInhibit:  false
Netscape*globalTranslations:    #override <Btn5Up>: LineDown()\n <Btn4Up>: LineUp()
Rxvt*saveLines: 9999
Rxvt*scrollBar: true
Rxvt*scrollKey: true
Rxvt*scrollTtyOutput:   false
Rxvt*titeInhibit:   false
Scrollbar.JumpCursor:   true
Xft.autohint:   0
Xft.lcdfilter:  lcddefault
Xft.antialias:  1
Xft.hintstyle:  hintslight
Xft.rgba:   rgb
Xft.dpi:    96
Xcursor.theme:  jimmac
Xcursor.size:   0
Xcursor.theme_core: 1

I have no ~/.config/rofi dir and any rofi config files.

DaveDavenport commented 6 years ago

Odd nothing specific to rofi there? What distro are you on? (and version)

gBopHuk commented 6 years ago

ALTLinux/Sisyphus and ALTLinux/p8. But I think the versions of libs and tools wich are used by rofi could help us more. Anyway is there any idea to explore this issue on my distro?

DaveDavenport commented 6 years ago

what flex/bison version.

gBopHuk commented 6 years ago

Sisyphus: flex-2.6.0 bison-3.0.4.0.14.8bf2

p8: flex-2.6.0 bison-3.0.4.0.14.8bf2

gBopHuk commented 6 years ago

Sorry, there is a problem in flex package in ALTLinux repo

Since flex-2.5.37-alt2 the ALT flex package contains a change which makes the generated parser code different from the upstream version of flex: the %{ ... %} enclosed code from the rules section is inserted before the yylloc local variable is initialized. As a workaround, initialize yylloc explicitly using the undocumented function parameter name yylloc_param.

Fixed by a dirty hack :-) https://bugzilla.altlinux.org/attachment.cgi?id=7652

Anyway this is a disrt-specific bug, not rofi bug

github-actions[bot] commented 3 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.