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

Attempt to unlock mutex that was not locked #469

Closed
r004 opened this issue Oct 27, 2014 · 8 comments
Closed

Attempt to unlock mutex that was not locked #469

r004 opened this issue Oct 27, 2014 · 8 comments

Comments

@r004
Copy link

r004 commented Oct 27, 2014

yesterday after a system-wide update I got this error:

Attempt to unlock mutex that was not locked

as I searched, I found out there is a problem with new Glib and older softwares.
I know that you don't maintain anymore. but please fix this issue in order to make spacefm usable again.
Cheers;
r004

@VastOne
Copy link

VastOne commented Oct 27, 2014

This was solved with 0.9.4-2 which is in both Testing and SID, assuming that you are referring to Debian

Here is the changelog

spacefm (0.9.4-2) unstable; urgency=high

  • Add debian/patches/0001-fix-issue-468.patch to fix crash when
    spacefm is running on glib2.0 >= 2.41.2. (Closes: #763575)

  • debian/control:

    • Bump Standards-Version to 3.9.6. (no changes needed)
    • Drop deprecated udisks1 from Recommends. (Closes: #750510)

    -- Mateusz Łukasik mati75@linuxmint.pl Wed, 01 Oct 2014 20:42:31 +0200

@r004
Copy link
Author

r004 commented Oct 27, 2014

I am using gentoo and LFS linux. and repo and the Makefile provided with gentoo or other source based builds spacefm 0.9.4-1.
What is my solution then?

@VastOne
Copy link

VastOne commented Oct 27, 2014

I believe Gentoo has a a live ebuild (9999) for GTK3. The GTK3 version does not seem to be affected by this issue. You might want to try that

@r004
Copy link
Author

r004 commented Oct 27, 2014

ok but as luck would have it i prefer GTK2.

@skalteis
Copy link

I made a patch, works here with glib 2.42.1!

--- spacefm-masterA/src/main.c  2014-03-30 14:17:28.000000000 +0200
+++ spacefm-masterB/src/main.c  2014-12-11 18:48:02.446663631 +0100
@@ -1320,6 +1320,7 @@ int main ( int argc, char *argv[] )
         {
             g_thread_init( NULL );
             gdk_threads_init ();
+           gdk_threads_enter();
             /* initialize the file alteration monitor */
             if( G_UNLIKELY( ! vfs_file_monitor_init() ) )
             {
@@ -1339,6 +1340,7 @@ int main ( int argc, char *argv[] )
                 return ret == -1 ? 0 : ret;
             }
             gtk_main();
+           gdk_threads_leave();
             vfs_file_monitor_clean();
             return 0;
         }
@@ -1442,6 +1444,7 @@ int main ( int argc, char *argv[] )
 #endif
     g_thread_init( NULL );
     gdk_threads_init ();
+    gdk_threads_enter();

 #if HAVE_HAL
     /* If the user wants to mount/umount/eject a device */
@@ -1527,6 +1530,7 @@ int main ( int argc, char *argv[] )
             printf( "spacefm: Error: Unable to save session\n       %s\n", err_msg );
     }
 */
+    gdk_threads_leave();
     vfs_volume_finalize();
     vfs_mime_type_clean();
     vfs_file_monitor_clean();

@r004
Copy link
Author

r004 commented Dec 21, 2014

Thanks; I will check it out and see if it works.
If it does work here; I also push it down in downstream gentoo and crux packages.
Thanks

@IgnorantGuru
Copy link
Owner

This "Attempt to unlock mutex that was not locked" error on SpaceFM startup is caused by upgrading from glib <= 2.40 to glib >= 2.41, while using GTK 2.24.24. This was a bug in GTK2 which affected a lot of GTK2 apps. eg you can see some discussion and links here.

This problem was fixed upstream in GTK2 with version 2.24.25. So building SpaceFM with glib >= 2.41 and GTK >= 2.24.25 should solve this problem. No changes are required in SpaceFM.

In Debian, you only need to update these packages (which have no systemd dependency):
libglib2.0-0 (2.40.0-3 => 2.42.1-1)
libglib2.0-dev (2.40.0-3 => 2.42.1-1)
gir1.2-gtk-2.0 (2.24.24-1 => 2.24.25-1)
gtk2-engines-pixbuf (2.24.24-1 => 2.24.25-1)
libgtk2.0-0 (2.24.24-1 => 2.24.25-1)
libgtk2.0-0-dbg (2.24.24-1 => 2.24.25-1)
libgtk2.0-bin (2.24.24-1 => 2.24.25-1)
libgtk2.0-dev (2.24.24-1 => 2.24.25-1)

Thanks to skalteis for providing his patch, which may have been a temp fix for glib 2.41 with GTK 2.24.24. However, I do not recommend using that patch any longer, as it will probably interfere with SpaceFM's multithread support, and may cause other issues.

@IgnorantGuru
Copy link
Owner

Closing this as a duplicate of #468. Also, BwackNinja informs me there that he believes the patch to be a valid solution, which still corrects some issues with GTK3 and other versions, so I will defer to his experience on that. He has included that patch in his maintenance fork.

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

No branches or pull requests

4 participants