Most times thunar only emits "thunar-CRITICAL " messages into the console and draws a blanc tree-view in all open thunar windows. Occasionally it as well crashes. To reproduce I do the following: 1. Open fresh thunar: thunar -q; thunar 2. Switch to tree view if not already visible: View --> SidePane --> Tree ( CTRL + E ) 3. Open new window: File --> New Window ( CTRL + N ) 4. Close the new window ( CTRL + Q ) 5. Toggle View-->"show hidden files" ( CTRL + H ) Hidden files should not be visible when the first window is created. Here the CRITICAL Message I get: (thunar:12720): thunar-CRITICAL **: thunar_tree_view_visible_func: assertion '(((__extension__ ({ GTypeInstance *__inst = (GTypeInstance*) ((user_data)); GType __t = ((thunar_tree_view_get_type ())); gboolean __r; if (!__inst) __r = (0); else if (__inst->g_class && __inst->g_class->g_type == __t) __r = (!(0)); else __r = g_type_check_instance_is_a (__inst, __t); __r; }))))' failed
Created attachment 8011 patch The problem is, that thunar-tree-model is implemented as singleton. When a new thunar-tree-view is created, the tree-view registers itself in the single thunar-tree-model. The tree-view will be used by tree-model to decide if specific hidden files should be displayed. Since each thunar-window creates a fresh tree-view, the reference in tree-model will be overwritten by the tree-view of the new window. If the new window is closed, the reference will point to nowhere. An update of the tree on the old window may now result in a crash. According to gtk-doc, the tree-model seems to be the place where tree-items can be added / removed. And it does not make sense to register multiple tree-views in one tree-model (IMO each tree-view should have its own show/hide toggle) This fix just removes the singleton nature from the tree-model, so that each tree-view has its own tree-model. I checked all tree-model methods to see if this could have negative side-effects, and I as well did some testing. For me everything works fine. However I would be happy if someone else as well could test the patch before I push it.
*** Bug 14423 has been marked as a duplicate of this bug. ***
*** Bug 11903 has been marked as a duplicate of this bug. ***
Created attachment 8016 patch just fixed a comment
Alexander Schwinn referenced this bugreport in commit 5d6b51a21a1466c2e8b8a3b2dec273ed23bec563 Crash in tree-view when multiple windows are open (Bug #14714) https://git.xfce.org/xfce/thunar/commit?id=5d6b51a21a1466c2e8b8a3b2dec273ed23bec563
Alexander Schwinn referenced this bugreport in commit 59bad0ce5de26d117dc9350d78fbb67bb4735faf Crash in tree-view when multiple windows are open (Bug #14714) https://git.xfce.org/xfce/thunar/commit?id=59bad0ce5de26d117dc9350d78fbb67bb4735faf
Patch considered to be fine after some more testing by me and Andre Miranda ( thanks alot for that! ) Applied to master and 4.14 branch. Will be released in thunar 1.8.3
*** Bug 14640 has been marked as a duplicate of this bug. ***
Alexander Schwinn referenced this bugreport in commit 42bfa0dc3be571cf8677ac350d115528597f899b Crash in tree-view when multiple windows are open (Bug #14714) https://git.xfce.org/xfce/thunar/commit?id=42bfa0dc3be571cf8677ac350d115528597f899b
^^ as well pushed to 4.12 branch, to be released as 1.6.16
*** Bug 12311 has been marked as a duplicate of this bug. ***