spheras / desktopfolder

Bring your Desktop Back to Life
GNU General Public License v3.0
200 stars 40 forks source link

desktopfolder closes when rapidly an icon is dragged and then clicked on the empty background #293

Closed rawlines closed 4 years ago

rawlines commented 4 years ago

Description

When i drag and drop an icon in the desktop (move an icon in the desktop) and then rapidly i click the empty background, the program closes itself.

Steps to reproduce

  1. Drag an icon from de desktop
  2. Drop the icon on a different point of the desktop
  3. Rapidly click on the empty background of the desktop

Expected result

Literally nothing.

Actual result

The program closes

ezgif com-video-to-gif

System Information

Terminal output

``` $ env G_MESSAGES_DEBUG=all com.github.spheras.desktopfolder (com.github.spheras.desktopfolder:29595): Gtk-DEBUG: 18:23:48.685: Connecting to session manager (com.github.spheras.desktopfolder:29595): DEBUG: 18:23:48.686: Application.vala:99: startup event (com.github.spheras.desktopfolder:29595): DEBUG: 18:23:48.686: Application.vala:86: activate event (com.github.spheras.desktopfolder:29595): DEBUG: 18:23:48.686: Application.vala:239: show_desktoppanel: true (com.github.spheras.desktopfolder:29595): DEBUG: 18:23:48.710: FolderManager.vala:259: Monitoring: /home/gonza/Desktop (com.github.spheras.desktopfolder:29595): DEBUG: 18:23:48.710: DesktopWindow.vala:97: trying to hide (com.github.spheras.desktopfolder:29595): DEBUG: 18:23:48.710: FolderManager.vala:1106: >>>>>>>>>>> INIT _sync_files for Panel: (com.github.spheras.desktopfolder:29595): DEBUG: 18:23:48.710: DesktopManager.vala:83: hide_items false (com.github.spheras.desktopfolder:29595): DEBUG: 18:23:48.710: FolderManager.vala:1114: >>>>>>>>>>>>>>>>>>>>>>>RESTARTING _sync_files 0 times for Panel (com.github.spheras.desktopfolder:29595): DEBUG: 18:23:48.710: DesktopManager.vala:84: hiding items (com.github.spheras.desktopfolder:29595): DEBUG: 18:23:48.711: FolderManager.vala:1149: syncing file found:/home/gonza/Desktop//pagina web.txt (com.github.spheras.desktopfolder:29595): DEBUG: 18:23:48.711: FolderManager.vala:1149: syncing file found:/home/gonza/Desktop//steam.desktop (com.github.spheras.desktopfolder:29595): DEBUG: 18:23:48.711: FolderManager.vala:1149: syncing file found:/home/gonza/Desktop//Anexo III-Propuesta Proyec alumno.odt (com.github.spheras.desktopfolder:29595): DEBUG: 18:23:48.711: FolderManager.vala:1149: syncing file found:/home/gonza/Desktop//Servicio de incidencias.odt (com.github.spheras.desktopfolder:29595): DEBUG: 18:23:48.711: FolderManager.vala:1149: syncing file found:/home/gonza/Desktop//Servicio de incidencias.pdf (com.github.spheras.desktopfolder:29595): DEBUG: 18:23:48.711: FolderManager.vala:1149: syncing file found:/home/gonza/Desktop//Rutina biceps.png (com.github.spheras.desktopfolder:29595): DEBUG: 18:23:48.711: FolderManager.vala:1149: syncing file found:/home/gonza/Desktop//Supplyg (com.github.spheras.desktopfolder:29595): DEBUG: 18:23:48.711: FolderManager.vala:1149: syncing file found:/home/gonza/Desktop//Counter-Strike Global Offensive.desktop (com.github.spheras.desktopfolder:29595): DEBUG: 18:23:48.711: FolderManager.vala:1149: syncing file found:/home/gonza/Desktop//libreoffice.desktop (com.github.spheras.desktopfolder:29595): DEBUG: 18:23:48.711: FolderManager.vala:1149: syncing file found:/home/gonza/Desktop//Remmina.desktop (com.github.spheras.desktopfolder:29595): DEBUG: 18:23:48.711: FolderManager.vala:1149: syncing file found:/home/gonza/Desktop//Cities Skylines.desktop (com.github.spheras.desktopfolder:29595): DEBUG: 18:23:48.711: FolderManager.vala:1149: syncing file found:/home/gonza/Desktop//KeePass.desktop (com.github.spheras.desktopfolder:29595): DEBUG: 18:23:48.711: FolderManager.vala:1149: syncing file found:/home/gonza/Desktop//Business Tour - Online Multiplayer Board Game.desktop (com.github.spheras.desktopfolder:29595): DEBUG: 18:23:48.711: FolderManager.vala:1149: syncing file found:/home/gonza/Desktop//Minecraft launcher.desktop (com.github.spheras.desktopfolder:29595): DEBUG: 18:23:48.711: FolderManager.vala:1149: syncing file found:/home/gonza/Desktop//Lutris.desktop (com.github.spheras.desktopfolder:29595): DEBUG: 18:23:48.711: FolderManager.vala:1149: syncing file found:/home/gonza/Desktop//Eclipse.desktop (com.github.spheras.desktopfolder:29595): DEBUG: 18:23:48.711: FolderManager.vala:1149: syncing file found:/home/gonza/Desktop//.desktopfolder (com.github.spheras.desktopfolder:29595): DEBUG: 18:23:48.711: FolderManager.vala:1149: syncing file found:/home/gonza/Desktop//Android Studio.desktop (com.github.spheras.desktopfolder:29595): DEBUG: 18:23:48.711: FolderManager.vala:1149: syncing file found:/home/gonza/Desktop//Processing.desktop (com.github.spheras.desktopfolder:29595): DEBUG: 18:23:48.789: DesktopWindow.vala:97: trying to hide (com.github.spheras.desktopfolder:29595): DEBUG: 18:23:48.789: DesktopManager.vala:83: hide_items false (com.github.spheras.desktopfolder:29595): DEBUG: 18:23:48.789: DesktopManager.vala:84: hiding items (com.github.spheras.desktopfolder:29595): DEBUG: 18:23:48.789: DesktopWindow.vala:97: trying to hide (com.github.spheras.desktopfolder:29595): DEBUG: 18:23:48.789: DesktopManager.vala:83: hide_items false (com.github.spheras.desktopfolder:29595): DEBUG: 18:23:48.789: DesktopManager.vala:84: hiding items (com.github.spheras.desktopfolder:29595): DEBUG: 18:23:48.789: FolderManager.vala:1281: >>>>>>>>>>> END _sync_files for Panel: (com.github.spheras.desktopfolder:29595): DEBUG: 18:23:48.789: DesktopManager.vala:149: Dock window found: plank (com.github.spheras.desktopfolder:29595): DEBUG: 18:23:48.793: DesktopManager.vala:149: Dock window found: wingpanel (com.github.spheras.desktopfolder:29595): DEBUG: 18:23:48.797: DesktopManager.vala:128: DESKTOP SIZE CHANGED! (0,0) (1920,1080) ** (com.github.spheras.desktopfolder:29595): DEBUG: 18:23:48.799: Application.vala:571: Monitoring: /home/gonza/Desktop

(com.github.spheras.desktopfolder:29595): DEBUG: 18:23:49.311: Application.vala:637: desktop_visible is now true (com.github.spheras.desktopfolder:29595): DEBUG: 18:23:49.312: DesktopWindow.vala:94: refresh, icons enabled and desktop visibility = true ** ERROR:arraylist.c:1199:gee_array_list_real_get: assertion failed: (index < _size) Abortado ```

aljelly commented 4 years ago

It sounds like some sort of segfault from what you've described. Maybe it's some interaction between the show/hide feature (which is triggered when you double click an empty part of the desktop) and something that's happening during the release of an icon being dragged.

rawlines commented 4 years ago

It sounds like some sort of segfault from what you've described. Maybe it's some interaction between the show/hide feature (which is triggered when you double click an empty part of the desktop) and something that's happening during the release of an icon being dragged.

i have it already parched on my repository https://github.com/comandantexd/desktopfolder. It is not solved, i just added a way to prevent that from happening.

in detail, the solution is in this file described https://github.com/comandantexd/desktopfolder/blob/master/src/widgets/DesktopWindow.vala Line 44

spheras commented 4 years ago

Thanks @comandantexd for reporting. I added a patch to solve this issue. It seems that the problem was during the render of the background (FolderWindow.vala, method draw_background)

this.manager.get_selected_items ().@get (0);

Not sure if this solve all the problems, or if it could have any side effect. Could you @comandantexd check the solution?

Thanks!

rawlines commented 4 years ago

Sorry @spheras, but for now i am using Zorin os, if sometime i came back to elementaryOS i will test it

spheras commented 4 years ago

Ok, thankyou anyway for reporting :D. Closing the issue as it seems to be solved with the patch.