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

lagrange: Segmentation fault #33032

Closed
haary opened this issue Sep 20, 2021 · 11 comments
Closed

lagrange: Segmentation fault #33032

haary opened this issue Sep 20, 2021 · 11 comments
Labels
bug Something isn't working

Comments

@haary
Copy link

haary commented Sep 20, 2021

System

  • xuname:
    Void 5.13.19_1 x86_64 GenuineIntel uptodate rFF
  • package:
    affected package(s) including the version: lagrange-1.6.5_1

Expected behavior

Does not crash

Actual behavior

Crashes with "Segmentaion fault"

Steps to reproduce the behavior

  • Open Lagrange
  • Open some Gemini sites
  • Scroll across those sites. Mark some words with the cursor
  • Lagrange crashes with "Segmentation fault" after a few seconds.

This does not happen with the AppImage version of Lagrange from the author's Gitub site https://github.com/skyjake/lagrange/releases

@paper42
Copy link
Member

paper42 commented Sep 20, 2021

I can not reproduce this, do you have an example page where this happens? Are you able to post a backtrace?

@haary
Copy link
Author

haary commented Sep 20, 2021

It does happen at gemini://senioradmin.de/GreyMode.gmi. It involves scrolling and clicking

Backtrace:

Thread 1 "lagrange" received signal SIGSEGV, Segmentation fault.
0x0000555555606ec1 in ?? ()
(gdb) backtrace
#0  0x0000555555606ec1 in ?? ()
#1  0x0000555555577460 in ?? ()
#2  0x000055555559cc94 in ?? ()
#3  0x00005555555f074b in ?? ()
#4  0x00005555555ed4a0 in ?? ()
#5  0x0000555555567c05 in ?? ()
#6  0x0000555555568c57 in ?? ()
#7  0x0000555555561a30 in main ()

@paper42
Copy link
Member

paper42 commented Sep 20, 2021

Could you install lagrange-dbg from the debug repository? This backtrace doesn't tell us much.

@haary
Copy link
Author

haary commented Sep 20, 2021

Thread 1 "lagrange" received signal SIGSEGV, Segmentation fault.
decodeBytes_MultibyteChar (bytes=0x498000003aa <error: Cannot access memory at address 0x498000003aa>, end=0x0, 
    ch_out=ch_out@entry=0x7fffffffdc8c) at ../lib/the_Foundation/src/string.c:927
927     ../lib/the_Foundation/src/string.c: Datei oder Verzeichnis nicht gefunden.
(gdb) backtrace
#0  decodeBytes_MultibyteChar (bytes=0x498000003aa <error: Cannot access memory at address 0x498000003aa>, end=0x0, 
    ch_out=ch_out@entry=0x7fffffffdc8c) at ../lib/the_Foundation/src/string.c:927
#1  0x0000555555577460 in findLoc_GmRun (d=0x5555590381d0, pos=...) at ../src/gmdocument.c:2063
#2  0x00005555555774d4 in findLoc_GmDocument (d=<optimized out>, pos=...) at ../src/gmdocument.c:1910
#3  0x00005555555947b9 in sourceLoc_DocumentWidget_ (d=d@entry=0x5555556becc0, pos=...) at ../src/ui/documentwidget.c:2006
#4  0x0000555555594e1e in beginMarkingSelection_DocumentWidget_ (d=d@entry=0x5555556becc0, pos=...) at ../src/ui/documentwidget.c:3355
#5  0x000055555559df15 in processEvent_DocumentWidget_ (d=0x5555556becc0, ev=<optimized out>) at ../src/ui/documentwidget.c:3751
#6  0x00005555555f074b in dispatchEvent_Widget (d=d@entry=0x5555556becc0, ev=ev@entry=0x7fffffffe080) at ../src/ui/widget.c:1002
#7  0x00005555555ed4a0 in processEvent_Window (d=0x5555556ea3f0, ev=0x7fffffffe080, ev@entry=0x7fffffffe170) at ../src/ui/window.c:885
#8  0x0000555555567c05 in processEvents_App (eventMode=eventMode@entry=waitForNewEvents_AppEventMode) at ../src/app.c:1261
#9  0x0000555555568c57 in run_App_ (d=<optimized out>) at ../src/app.c:1367
#10 run_App (argc=argc@entry=1, argv=argv@entry=0x7fffffffe3d8) at ../src/app.c:1456
#11 0x0000555555561a30 in main (argc=1, argv=0x7fffffffe3d8) at ../src/main.c:78

@paper42
Copy link
Member

paper42 commented Sep 25, 2021

I can still not reproduce this, could you report this (with the backtrace) upstream?

@ericonr
Copy link
Member

ericonr commented Sep 25, 2021

Can you capture your screen while doing this? Knowing the exact movements could help in reproducing.

What does xbps-pkgdb -a say?

@sgn
Copy link
Member

sgn commented Oct 2, 2021

Recipe for crash in my side:

  • Nagivate to gemini://senioradmin.de/GreyMode.gmi
  • Fetch an image
  • Click into the image

@sgn
Copy link
Member

sgn commented Oct 2, 2021

#0  0x000055f420f6ef11 in u8_mbtouc (n=18446726344084553426, s=0x10200000012e <error: Cannot access memory at address 0x10200000012e>, puc=0x7ffcf1bc484c, 
    puc@entry=0x7ffcf1bc480c) at /usr/include/unistr.h:233
#1  decodeBytes_MultibyteChar (bytes=0x10200000012e <error: Cannot access memory at ad
dress 0x10200000012e>, end=0x0, ch_out=ch_out@entry=0x7ffcf1bc484c)                   
    at ../lib/the_Foundation/src/string.c:927                                         
#2  0x000055f420edf540 in findLoc_GmRun (d=0x55f4239d4540, pos=...) at ../src/gmdocument.c:2063
#3  0x000055f420edf5b4 in findLoc_GmDocument (d=<optimized out>, pos=...) at ../src/gmdocument.c:1910
#4  0x000055f420efc899 in sourceLoc_DocumentWidget_ (d=d@entry=0x55f423860800, pos=...) at ../src/ui/documentwidget.c:2006
#5  0x000055f420efccde in beginMarkingSelection_DocumentWidget_ (d=d@entry=0x55f423860800, pos=...) at ../src/ui/documentwidget.c:3355
#6  0x000055f420f05ff5 in processEvent_DocumentWidget_ (d=0x55f423860800, ev=<optimized out>) at ../src/ui/documentwidget.c:3751
#7  0x000055f420f587eb in dispatchEvent_Widget (d=d@entry=0x55f423860800, ev=ev@entry=0x7ffcf1bc4c40) at ../src/ui/widget.c:1002
#8  0x000055f420f55530 in processEvent_Window (d=0x55f423122dc0, ev=0x7ffcf1bc4c40, ev@entry=0x7ffcf1bc4d30) at ../src/ui/window.c:885
#9  0x000055f420ecfca5 in processEvents_App (eventMode=eventMode@entry=waitForNewEvents_AppEventMode) at ../src/app.c:1261
#10 0x000055f420ed0cf7 in run_App_ (d=<optimized out>) at ../src/app.c:1367           
#11 run_App (argc=argc@entry=1, argv=argv@entry=0x7ffcf1bc4ee8) at ../src/app.c:1456  
#12 0x000055f420ec9a30 in main (argc=1, argv=0x7ffcf1bc4ee8) at ../src/main.c:78      

@paper42
Copy link
Member

paper42 commented Oct 2, 2021

I can not get lagrange to crash anywhere, is it still happening with 1.7 (#33276)? cc @skyjake

@paper42 paper42 added the bug Something isn't working label Oct 2, 2021
@skyjake
Copy link

skyjake commented Oct 3, 2021

I am able to reproduce this crash. Looking into a fix...

This seems to correct the issue: https://git.skyjake.fi/gemini/lagrange/commit/1fe2b10bc1a2def2af86390272907206f819b7ae

@sgn sgn closed this as completed in e8d1d54 Oct 3, 2021
@sgn
Copy link
Member

sgn commented Oct 3, 2021

@skyjake The patch indeed fixes the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants