MantisBT - NetSurf
View Issue Details
0002881NetSurf[All Projects] Generalpublic2024-08-30 15:582024-09-11 08:49
ReporterPeter Strath 
Assigned To 
PrioritynormalSeveritycrashReproducibilityalways
StatusresolvedResolutionopen 
Platformamd64OSlinuxOS Versiongtk3, X11
Product Version3.11 
Target Version3.12Fixed in Version3.12 
Fixed in CI build #6757
Reported in CI build #
URL of problem page
Summary0002881: Crash in treeview after pressing left or right cursor keys
DescriptionCursor key navigation in a treeview without any previously selected node results in a crash.

Crash reproduced in both 3.11 and latest git update.
Steps To Reproduce- ./nsgtk3
- F6 to open new bookmarks window (or any window with a treeview)
- press either left or right cursor keys (or any cursor key if treeview is empty)
Additional Information(gdb) bt
#0 0x0000559ded6d9d00 in treeview__cw_scroll_to_node (tree=0x559e11204650, node=0x0) at desktop/treeview.c:603
#1 treeview_keyboard_navigation (tree=0x559e11204650, key=29, rect=0x7fffa8b106e0) at desktop/treeview.c:3989
0000002 treeview_keypress (tree=0x559e11204650, key=29) at desktop/treeview.c:4076
#3 0x0000559ded6c5822 in hotlist_keypress (key=<optimized out>) at desktop/hotlist.c:1699
...

I've attached a patch that prevents this crash for me.
TagsNo tags attached.
Attached Filesdiff fix-crash-on-cursor-keys-in-treeview.diff (1,286) 2024-08-30 15:58
https://bugs.netsurf-browser.org/mantis/file_download.php?file_id=748&type=bug

Notes
(0002467)
Vincent Sanders   
2024-09-11 08:49   
Thank you for the report.

This has been resolved in commit https://git.netsurf-browser.org/netsurf.git/commit/?id=a9f13decf47f43d97a7aaf48af441ef82c8dd2cd

This commit will be in the 3.12 release.

Issue History
2024-08-30 15:58Peter StrathNew Issue
2024-08-30 15:58Peter StrathFile Added: fix-crash-on-cursor-keys-in-treeview.diff
2024-09-11 08:49Vincent SandersStatusnew => resolved
2024-09-11 08:49Vincent SandersFixed in Version => 3.12
2024-09-11 08:49Vincent SandersTarget Version => 3.12
2024-09-11 08:49Vincent SandersFixed in CI build # => 6757
2024-09-11 08:49Vincent SandersNote Added: 0002467