Skip to content

listbase: Fix a null dereference

Khalid Abu Shawarib requested to merge wip/kabus/scroll_to_null_tile into main
Click to expand

Thread 1 "nautilus" received signal SIGSEGV, Segmentation fault.
gtk_list_base_scroll_to (self=0x55555788ca30 [GtkGridView], pos=0, flags=(GTK_LIST_SCROLL_FOCUS | GTK_LIST_SCROLL_SELECT), scroll=0x5555578ca290) at ../gtk/gtklistbase.c:2361
2361	          gtk_widget_grab_focus (tile->widget);
> bt full
#0  gtk_list_base_scroll_to (self=0x55555788ca30 [GtkGridView], pos=0, flags=(GTK_LIST_SCROLL_FOCUS | GTK_LIST_SCROLL_SELECT), scroll=0x5555578ca290) at ../gtk/gtklistbase.c:2361
        tile = 0x0
        old_focus = <optimized out>
        priv = <optimized out>
#1  0x000055555563d62f in real_scroll_to (list_base_view=0x5555578807c0 [NautilusGridView], position=0, flags=(GTK_LIST_SCROLL_FOCUS | GTK_LIST_SCROLL_SELECT), scroll=0x5555578ca290) at ../../../../../../../../../Projects/nautilus/src/nautilus-grid-view.c:346
        self = 0x5555578807c0 [NautilusGridView]
#2  0x000055555563e60d in internal_scroll_to (self=0x5555578807c0 [NautilusGridView], position=0, flags=(GTK_LIST_SCROLL_FOCUS | GTK_LIST_SCROLL_SELECT), scroll=0x5555578ca290) at ../../../../../../../../../Projects/nautilus/src/nautilus-list-base.c:98
#3  0x000055555563e797 in nautilus_list_base_set_cursor (self=0x5555578807c0 [NautilusGridView], position=0, select=1, scroll_to=1) at ../../../../../../../../../Projects/nautilus/src/nautilus-list-base.c:149
        info = 0x5555578ca290
        flags = (GTK_LIST_SCROLL_FOCUS | GTK_LIST_SCROLL_SELECT)
#4  0x00005555556259b1 in nautilus_files_view_select_first (self=0x555557820c90 [NautilusFilesView]) at ../../../../../../../../../Projects/nautilus/src/nautilus-files-view.c:777
        priv = 0x5555578209a0
#5  0x000055555562de93 in display_pending_files (view=0x555557820c90 [NautilusFilesView]) at ../../../../../../../../../Projects/nautilus/src/nautilus-files-view.c:4468
        priv = 0x5555578209a0
        selection = 0x555557b88ed0
        no_selection = 1
#6  0x000055555562e0d0 in display_pending_callback (data=0x555557820c90) at ../../../../../../../../../Projects/nautilus/src/nautilus-files-view.c:4556
        view = 0x555557820c90 [NautilusFilesView]
        priv = 0x5555578209a0
#7  0x00007ffff7ec67da in g_timeout_dispatch (source=0x5555579f4ee0, callback=<optimized out>, user_data=<optimized out>) at ../glib/gmain.c:5057
        timeout_source = 0x5555579f4ee0
        again = <optimized out>
#8  0x00007ffff7ec3767 in g_main_dispatch (context=context@entry=0x55555575d7c0) at ../glib/gmain.c:3348
        dispatch = 0x7ffff7ec67b0 <g_timeout_dispatch>
        prev_source = 0x0
        begin_time_nsec = 412536845550953
        was_in_call = 0
        user_data = 0x555557820c90
        callback = 0x55555562e071 <display_pending_callback>
        cb_funcs = 0x7ffff7fb2260 <g_source_callback_funcs>
        cb_data = 0x555555c3d790
        need_destroy = <optimized out>
        source = 0x5555579f4ee0
        current = 0x555555765be0
        i = 0
        __func__ = "g_main_dispatch"
#9  0x00007ffff7ec5907 in g_main_context_dispatch_unlocked (context=0x55555575d7c0) at ../glib/gmain.c:4197
#10 g_main_context_iterate_unlocked (context=context@entry=0x55555575d7c0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4262
        max_priority = 2147483647
        timeout_usec = 4205
        some_ready = 1
        nfds = 2
        allocated_nfds = <optimized out>
        fds = 0x555555953f40
        begin_time_nsec = 412536841279651
#11 0x00007ffff7ec60b3 in g_main_context_iteration (context=context@entry=0x55555575d7c0, may_block=may_block@entry=1) at ../glib/gmain.c:4327
        retval = <optimized out>
#12 0x00007ffff6f9f37d in g_application_run (application=0x555555746580 [NautilusApplication], argc=<optimized out>, argv=<optimized out>) at ../gio/gapplication.c:2712
        arguments = 0x5555557be230
        status = 0
        context = 0x55555575d7c0
        acquired_context = <optimized out>
        __func__ = "g_application_run"
#13 0x0000555555586202 in main (argc=1, argv=0x7fffffffe408) at ../../../../../../../../../Projects/nautilus/src/nautilus-main.c:78
        retval = 0
        application = 0x555555746580 [NautilusApplication]

Merge request reports