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

[Crash] Files does not open if restoring disconnected location into Column View #2330

Closed
Ericksom-Da-Veiga opened this issue Oct 4, 2023 · 16 comments · Fixed by #2332
Closed

Comments

@Ericksom-Da-Veiga
Copy link

What Happened?

try to open the files but it's not working

If I try to open from the terminal I get the following message : (io.elementary.files:8504): Handy-CRITICAL **: 23:40:00.283: hdy_tab_page_get_child: assertion 'HDY_IS_TAB_PAGE (self)' failed
Lack of segmentation

Steps to Reproduce

1- click the files icon on the applications menu

Expected Behavior

Open after click on the icon

OS Version

7.x (Horus)

Software Version

Latest release (I have run all updates)

Log Output

No response

Hardware Info

CPU i7-10510U CPU @ 1.80GHz
GPU: Nvidia GeForce MX350
Ram 16 GB
SSD 512 GB

@jeremypw
Copy link
Collaborator

jeremypw commented Oct 5, 2023

Please confirm the version of files you have with the command io.elementary.files --version. Try not restoring tabs by turning "History" off in System Settings/Scurity & Privacy to see whether that makes a difference.

@jeremypw
Copy link
Collaborator

jeremypw commented Oct 5, 2023

There was an issue with opening Files in version 6.5.1 that was fixed in version 6.5.2.

@endorama
Copy link

endorama commented Oct 7, 2023

Hello @jeremypw , I'm experiencing the same issue.

App center tells me everything is up to date.

$ io.elementary.files --version
io.elementary.files 6.5.2

With History disabled Files opens correctly.
With History enabled I get a segfault:

ott 07 19:52:55 REDACTED io.elementary.f[2986]: hdy_tab_page_get_child: assertion 'HDY_IS_TAB_PAGE (self)' failed
ott 07 19:52:55 REDACTED kernel: io.elementary.f[2986]: segfault at 40 ip 000055c05be528c2 sp 00007ffe78f3e390 error 4 in io.elementary.files[55c05be47000+7e000] likely on CPU 0 (core 0, socket 0)
ott 07 19:52:55 REDACTED kernel: Code: c6 0a 00 0f 1f 44 00 00 8b 04 25 cc 00 00 00 0f 0b 8b 04 25 0c 01 00 00 0f 0b 31 ff e8 c7 f0 03 00 8b 04 25 48 00 00 00 0f 0b <48> 8b 04 25 40 00 00 00 0f 0b 0f 1f 40 00 f3 0f 1e fa 48 8d 3d 45
ott 07 19:52:55 REDACTED bamfdaemon[1327]: Got an X error: BadWindow (invalid Window parameter)
ott 07 19:52:55 REDACTED bamfdaemon[1327]: Got an X error: BadWindow (invalid Window parameter)
ott 07 19:52:55 REDACTED bamfdaemon[1327]: Got an X error: BadWindow (invalid Window parameter)
ott 07 19:52:55 REDACTED plank.desktop[1308]: [WARN 19:45:48.963812] [Preferences:192] '/usr/share/themes/io.elementary.stylesheet.bubblegum/plank-dark/dock.theme' is read-only!
ott 07 19:52:55 REDACTED plank.desktop[1308]: [WARN 19:45:48.964332] [Preferences:378] Missing key 'UrgentHueShift' for group 'PlankDockTheme' in preferences file '/usr/share/themes/io.elementary.stylesheet.bubblegum/plank-dark/dock.theme' - using default value
ott 07 19:52:55 REDACTED plank.desktop[1308]: [WARN 19:45:49.236445] Creating surface took WAY TOO LONG (67ms), enabled downscaling for this cache!
ott 07 19:52:55 REDACTED plank.desktop[1308]: [WARN 19:45:50.669216] Failed to fetch xid: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.ayatana.bamf.window” on object at path /org/ayatana/bamf/window/8388612
ott 07 19:52:55 REDACTED plank.desktop[1308]: [WARN 19:45:50.679679] Failed to fetch type: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: Object does not exist at path “/org/ayatana/bamf/window/8388612”
ott 07 19:52:55 REDACTED plank.desktop[1308]: [WARN 19:45:50.689512] Failed to fetch monitor: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: Object does not exist at path “/org/ayatana/bamf/window/8388612”
ott 07 19:52:55 REDACTED plank.desktop[1308]: [WARN 19:45:50.701745] Failed to fetch maximized state: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: Object does not exist at path “/org/ayatana/bamf/window/8388612”
ott 07 19:52:55 REDACTED plank.desktop[1308]: [WARN 19:45:50.710884] Failed to fetch xid: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: Object does not exist at path “/org/ayatana/bamf/window/8388612”
ott 07 19:52:55 REDACTED plank.desktop[1308]: [WARN 19:45:50.723189] Unable to fetch children: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: Object does not exist at path “/org/ayatana/bamf/application/0x55da5857a2c0”
ott 07 19:52:55 REDACTED plank.desktop[1308]: [WARN 19:45:50.732773] Failed to fetch path: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: Object does not exist at path “/org/ayatana/bamf/application/0x55da5857a2c0”
ott 07 19:52:55 REDACTED plank.desktop[1308]: [WARN 19:45:50.742166] Failed to fetch xid: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: Object does not exist at path “/org/ayatana/bamf/window/8388612”
ott 07 19:52:55 REDACTED plank.desktop[1308]: [WARN 19:46:19.377781] Failed to fetch xid: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: Object does not exist at path “/org/ayatana/bamf/window/62914568”
ott 07 19:52:55 REDACTED plank.desktop[1308]: [WARN 19:46:19.386549] Failed to fetch type: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: Object does not exist at path “/org/ayatana/bamf/window/62914568”
ott 07 19:52:55 REDACTED plank.desktop[1308]: [WARN 19:46:19.395966] Failed to fetch monitor: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: Object does not exist at path “/org/ayatana/bamf/window/62914568”
ott 07 19:52:55 REDACTED plank.desktop[1308]: [WARN 19:46:19.407554] Failed to fetch maximized state: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: Object does not exist at path “/org/ayatana/bamf/window/62914568”
ott 07 19:52:55 REDACTED plank.desktop[1308]: [WARN 19:46:19.416623] Failed to fetch xid: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: Object does not exist at path “/org/ayatana/bamf/window/62914568”
ott 07 19:52:55 REDACTED plank.desktop[1308]: [WARN 19:46:19.431856] Unable to fetch children: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: Object does not exist at path “/org/ayatana/bamf/application/0x55da5857a4a0”
ott 07 19:52:55 REDACTED plank.desktop[1308]: [WARN 19:46:19.441417] Failed to fetch path: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: Object does not exist at path “/org/ayatana/bamf/application/0x55da5857a4a0”
ott 07 19:52:55 REDACTED plank.desktop[1308]: [WARN 19:46:25.268965] Creating surface took WAY TOO LONG (41ms), enabled downscaling for this cache!
ott 07 19:52:55 REDACTED plank.desktop[1308]: [WARN 19:50:28.804929] Failed to fetch maximized state: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.ayatana.bamf.window” on object at path /org/ayatana/bamf/window/69206024
ott 07 19:52:55 REDACTED plank.desktop[1308]: [WARN 19:52:55.938391] Failed to fetch xid: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: Object does not exist at path “/org/ayatana/bamf/window/73400328”
ott 07 19:52:55 REDACTED plank.desktop[1308]: [WARN 19:52:55.947580] Failed to fetch type: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: Object does not exist at path “/org/ayatana/bamf/window/73400328”

@jeremypw
Copy link
Collaborator

jeremypw commented Oct 8, 2023

@endorama Thanks for the report! Is there anything unusual about the locations being restored, e.g. on a disconnected remote server, or no longer existing? Does the crash happen even if only restoring the home folder? I've tried to reproduce but without success so far. You can get more information in the backtrace by running sudo apt build-dep io.elementary.files and then gdb io.elementary.files followed by run and then bt after the crash.

@jeremypw jeremypw changed the title The files are not opening [Crash] Files does not open if restoring tabs Oct 8, 2023
@jeremypw
Copy link
Collaborator

jeremypw commented Oct 8, 2023

I have pushed a PR that fixes a theoretical problem with restoring tabs that contain a Column View (although I haven't managed to trigger a crash in practice). If the reporters of this issue are able to build and test that PR to see whether it fixes this issue that would be very helpful, thanks.

@oli-ver
Copy link

oli-ver commented Oct 8, 2023

Faced the same issue, disabling history was a workaround for me as well to use the file manager.
Tried the provided fix from your pull request, works like a charm. Thanks :)

Without your fix:

$ gdb io.elementary.files 
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from io.elementary.files...
(gdb) run
Starting program: /usr/bin/io.elementary.files 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff2dff640 (LWP 15616)]
[New Thread 0x7ffff25fe640 (LWP 15617)]
[New Thread 0x7ffff1dfd640 (LWP 15618)]
[New Thread 0x7ffff14c0640 (LWP 15620)]
[New Thread 0x7fffe3fff640 (LWP 15621)]
[Thread 0x7fffe3fff640 (LWP 15621) exited]
[New Thread 0x7fffe3fff640 (LWP 15622)]
[New Thread 0x7fffe33ff640 (LWP 15623)]
[Thread 0x7fffe3fff640 (LWP 15622) exited]
[Thread 0x7fffe33ff640 (LWP 15623) exited]
[New Thread 0x7fffe33ff640 (LWP 15624)]
[New Thread 0x7fffe3fff640 (LWP 15625)]
[Thread 0x7fffe33ff640 (LWP 15624) exited]
[Thread 0x7fffe3fff640 (LWP 15625) exited]
[New Thread 0x7fffe3fff640 (LWP 15626)]
[New Thread 0x7fffe33ff640 (LWP 15627)]
[Thread 0x7fffe3fff640 (LWP 15626) exited]
[Thread 0x7fffe33ff640 (LWP 15627) exited]
[New Thread 0x7fffe33ff640 (LWP 15628)]
[New Thread 0x7fffe3fff640 (LWP 15630)]
[New Thread 0x7fffe15ff640 (LWP 15631)]
[New Thread 0x7fffe0dfe640 (LWP 15632)]
[New Thread 0x7fffd61ff640 (LWP 15633)]
[New Thread 0x7fffd59fe640 (LWP 15634)]
[New Thread 0x7fffd51fd640 (LWP 15635)]
[New Thread 0x7fffd49fc640 (LWP 15636)]

(io.elementary.files:15613): Handy-CRITICAL **: 19:36:10.505: hdy_tab_page_get_child: assertion 'HDY_IS_TAB_PAGE (self)' failed

Thread 1 "io.elementary.f" received signal SIGSEGV, Segmentation fault.
0x000055555561202b in files_view_window_expand_miller_view (self=0x555555ad2550, tip_uri=0x5555559a7330 "afc://<some-id>/", unescaped_root_uri=0x5555556efba0 "afc://<some-id>/iTunes_Control/iTunes") at ../src/View/Window.vala:1280
1280	        var mwcols = (Miller)(view.view) ;
(gdb) bt
#0  0x000055555561202b in files_view_window_expand_miller_view
    (self=0x555555ad2550, tip_uri=0x5555559a7330 "afc://<some-id>/", unescaped_root_uri=0x5555556efba0 "afc://<some-id>/iTunes_Control/iTunes")
    at ../src/View/Window.vala:1280
#1  0x000055555561186d in files_view_window_restore_tabs_co (_data_=0x555555d03540) at ../src/View/Window.vala:1239
#2  0x000055555561115b in files_view_window_restore_tabs_ready (source_object=0x555555ad2550, _res_=0x555555dfd830, _user_data_=0x555555d03540) at ../src/View/Window.vala:1234
#3  0x00007ffff7be7e39 in  () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
#4  0x00007ffff7be805b in  () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
#5  0x000055555560ab8f in files_view_window_add_tab_by_uri_co (_data_=0x555555de28a0) at ../src/View/Window.vala:550
#6  0x000055555560aa1f in files_view_window_add_tab_by_uri_ready (source_object=0x555555ad2550, _res_=0x555555dfd8f0, _user_data_=0x555555de28a0) at ../src/View/Window.vala:550
#7  0x00007ffff7be7e39 in  () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
#8  0x00007ffff7be805b in  () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
#9  0x000055555560b558 in files_view_window_add_tab_co (_data_=0x555555d492e0) at ../src/View/Window.vala:579
#10 0x000055555560b09c in files_view_window_add_tab_ready (source_object=0x555555ddfd50, _res_=0x555555dfd9b0, _user_data_=0x555555d492e0) at ../src/View/Window.vala:571
#11 0x00007ffff7be7e39 in  () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
#12 0x00007ffff7be805b in  () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
#13 0x00007ffff15d6ee6 in  () at /usr/lib/x86_64-linux-gnu/gio/modules/libgvfsdbus.so
#14 0x00007ffff15e67dd in  () at /usr/lib/x86_64-linux-gnu/gio/modules/libgvfsdbus.so
#15 0x00007ffff7be7e39 in  () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
#16 0x00007ffff7be805b in  () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
#17 0x00007ffff7c50fcd in  () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
#18 0x00007ffff7be7e39 in  () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
#19 0x00007ffff7be805b in  () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
#20 0x00007ffff7c48774 in  () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
#21 0x00007ffff7be7e39 in  () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
#22 0x00007ffff7be7e7d in  () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
#23 0x00007ffff7dc4c44 in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#24 0x00007ffff7e1a258 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#25 0x00007ffff7dc23e3 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#26 0x00007ffff7c16fb5 in g_application_run () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
#27 0x00005555555977e1 in _vala_main (args=0x7fffffffdd88, args_length1=1) at ../src/main.vala:28
#28 0x0000555555597828 in main (argc=1, argv=0x7fffffffdd88) at ../src/main.vala:16

With your fix:

~/Development/files/build on  9329eaf4a ⌚ 19:41:00
$ gdb io.elementary.files                   
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from io.elementary.files...
(gdb) run
Starting program: /usr/bin/io.elementary.files 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff2dff640 (LWP 16398)]
[New Thread 0x7ffff25fe640 (LWP 16399)]
[New Thread 0x7ffff1dfd640 (LWP 16400)]
[New Thread 0x7ffff14c0640 (LWP 16401)]
[New Thread 0x7fffe3fff640 (LWP 16402)]
[Thread 0x7fffe3fff640 (LWP 16402) exited]
[New Thread 0x7fffe3fff640 (LWP 16403)]
[New Thread 0x7fffe33ff640 (LWP 16404)]
[Thread 0x7fffe3fff640 (LWP 16403) exited]
[Thread 0x7fffe33ff640 (LWP 16404) exited]
[New Thread 0x7fffe33ff640 (LWP 16405)]
[New Thread 0x7fffe3fff640 (LWP 16406)]
[Thread 0x7fffe33ff640 (LWP 16405) exited]
[Thread 0x7fffe3fff640 (LWP 16406) exited]
[New Thread 0x7fffe3fff640 (LWP 16407)]
[New Thread 0x7fffe33ff640 (LWP 16408)]
[Thread 0x7fffe3fff640 (LWP 16407) exited]
[Thread 0x7fffe33ff640 (LWP 16408) exited]
[New Thread 0x7fffe33ff640 (LWP 16409)]
[New Thread 0x7fffe3fff640 (LWP 16410)]
[New Thread 0x7fffe15ff640 (LWP 16411)]
[New Thread 0x7fffe0dfe640 (LWP 16412)]
[New Thread 0x7fffd61ff640 (LWP 16413)]
[New Thread 0x7fffd59fe640 (LWP 16414)]
[New Thread 0x7fffd51fd640 (LWP 16415)]
[Thread 0x7ffff14c0640 (LWP 16401) exited]
[Thread 0x7fffe15ff640 (LWP 16411) exited]
[Thread 0x7fffe3fff640 (LWP 16410) exited]
[Thread 0x7fffd61ff640 (LWP 16413) exited]
[Thread 0x7fffe33ff640 (LWP 16409) exited]
[Thread 0x7fffd59fe640 (LWP 16414) exited]
[Thread 0x7fffe0dfe640 (LWP 16412) exited]
[Thread 0x7ffff1dfd640 (LWP 16400) exited]
[Thread 0x7ffff597ba80 (LWP 16395) exited]
[Thread 0x7fffd51fd640 (LWP 16415) exited]
[Thread 0x7ffff2dff640 (LWP 16398) exited]
[Thread 0x7ffff25fe640 (LWP 16399) exited]
[New process 16395]
[Inferior 1 (process 16395) exited normally]
(gdb) bt
No stack.
(gdb) exit

I connected my iPhone on my last session of the operating system, perhaps this was triggering it?

@oli-ver
Copy link

oli-ver commented Oct 8, 2023

Wondering though, did not find the debug entry from your PR Failed to restore tab %s. Right now my history seems to be empty, not sure if installing from the PR branch emptied it or disabling and enabling history again. I now installed from main again but am not able to reproduce the issue anymore. Perhaps this needs another validation when I am able to reproduce the issue. Will try that with connecting the iphone again and let you know if I find out something.

@fayjie92
Copy link

fayjie92 commented Oct 8, 2023

I face this issue with a remote server (using VPN) even with the current version, i.e. 6.5.2. Once, I disconnect my VPN, file crashes if one of the opened tabs has the contents from the remote server.

@jeremypw
Copy link
Collaborator

jeremypw commented Oct 9, 2023

@fayjie92 The issue with restoring disconnected remote locations has been previously raise in #1858

@jeremypw
Copy link
Collaborator

jeremypw commented Oct 9, 2023

@Ericksom-Da-Veiga Thanks for the report. Could you confirm whether you were restoring a tab that uses the Column View? If so, this issue should be fixed by #2332. Are you able to build and test that branch?

@jeremypw jeremypw changed the title [Crash] Files does not open if restoring tabs [Crash] Files does not open if restoring tabs into Column View Oct 9, 2023
@jeremypw
Copy link
Collaborator

jeremypw commented Oct 9, 2023

@oli-ver From you backtrace of the crash it occurred when expanding a ColumnView so you need to be restoring a ColumnView that has been expanded (i.e. showing at least subfolder). It is possible it only occurs when restoring a remote location - can you remember if that is what you were doing?

@jeremypw jeremypw changed the title [Crash] Files does not open if restoring tabs into Column View [Crash] Files does not open if restoring disconnected location into Column View Oct 9, 2023
@jeremypw
Copy link
Collaborator

jeremypw commented Oct 9, 2023

I have now reproduced the crash by connecting an Android phone, navigating several folders deep using a Column View, closing Files, disconnecting the phone and then re-opening Files. Can firm the linked PR fixes this.

@jeremypw
Copy link
Collaborator

jeremypw commented Oct 9, 2023

@fayjie92 Actually you are right - a disconnected location is a necessary part of this issue, as well as restoring to ColumnView.

@oli-ver
Copy link

oli-ver commented Oct 10, 2023

@oli-ver From you backtrace of the crash it occurred when expanding a ColumnView so you need to be restoring a ColumnView that has been expanded (i.e. showing at least subfolder). It is possible it only occurs when restoring a remote location - can you remember if that is what you were doing?

@jeremypw I think in the meantime you confirmed yourself, disconnecting the phone was triggering it, when before navigating in paths on it which built up a history.

Do you need me to confirm again or is this enough for you to close this bug?

@jeremypw
Copy link
Collaborator

@oli-ver That's OK. The bug will be closed when the linked PR is merged.

@fayjie92
Copy link

Thanks a lot, @jeremypw for fixing this. This bug was the reason, I needed to use Nautilus. I hope to use Files now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants