GNOME Bugzilla – Bug 783471
First launch results in segfault
Last modified: 2018-02-06 23:20:11 UTC
When launching bijiben for the first time, the program segfaults with the error below. When launching the program again it complains about the lines below, it does seem to function like it should. I assume to the fact that the .local/share/bijiben/ directory doesn't have any content. Unable to load location /home/kwm/.local/share/bijiben/.Trash: Error opening directory '/home/kwm/.local/share/bijiben/.Trash': No such file or directory A bit offtopic but should be main window be transparent when no notes are stored? Starting program: /usr/local/bin/bijiben [New LWP 100663 of process 59676] [New LWP 100667 of process 59676] [New LWP 100668 of process 59676] [New LWP 100670 of process 59676] [New LWP 100708 of process 59676] [New LWP 100722 of process 59676] [New LWP 100747 of process 59676] [New LWP 100749 of process 59676] [New LWP 100751 of process 59676] [New LWP 100754 of process 59676] [New LWP 100759 of process 59676] ** (bijiben:59676): WARNING **: Enumerator failed : Error opening directory '/home/kwm/.local/share/tomboy': No such file or directory (bijiben:59676): GLib-GIO-CRITICAL **: g_file_enumerator_close_async: assertion 'G_IS_FILE_ENUMERATOR (enumerator)' failed ** (bijiben:59676): CRITICAL **: biji_manager_get_default_color: assertion 'BIJI_IS_MANAGER (manager)' failed Thread 1 received signal SIGSEGV, Segmentation fault. 0x0000000000433b04 in biji_manager_note_new_full (manager=0x0, provider_id=0x818dff5f8 "local", suggested_path=0x81a5b75d0 "eaf8ac32-b261-4523-869c-a359f9deedb7.note", info=0x81b62eec0, html=0x81a545000 "<html xmlns=\"http://www.w3.org/1999/xhtml\"><body>Using Links in Gnote<br/><br/>Notes in Gnote can be linked together by highlighting text in the current note and clicking the <b>Link</b> button above "..., color=0x81a4a4340) at biji-manager.c:882 882 provider = g_hash_table_lookup (manager->priv->providers, (gdb) bt full
+ Trace 237549
Hi, I removed the .local/share/bijiben directory but I couldn't reproduce the error you described. It shows that message: Unable to load location /home/kwm/.local/share/bijiben/.Trash: Error opening directory '/home/kwm/.local/share/bijiben/.Trash': No such file or directory But I wasn't able to segfault it neither I was able to reproduce the transparent window. I don't have a working freebsd to test it out there. If you do, please let me know how you compiled it because AFAIK FreeBSD is still running GNOME 3.18. Thanks.
Created attachment 353571 [details] [review] local-provider: Remove warning about .Trash folder When $HOME/.local/share/bijiben directory doesn't exist, application creates it, but it also complaints about another directory that doesn't exist: $HOME/.local/share/bijiben/.Trash. This patch removes that warning message because the .Trash directory will be created anyway.
Review of attachment 353571 [details] [review]: Pushed to master.
I noticed that in frame #1 bijiben found a old gnote note. It seems to try to import the gnote note in frame #0 with biji_manager_note_new_full() however manager is NULL so it segfaults. It look to me that instanciate_note() should probably make a new manager before trying to add a new note. I'm slowly updating the FreeBSD GNOME ports as a I go. I was working on the bijiben update but I had the above segfault so I decided not to commit the update yet to our ports tree just yet.
Is that possible for you to share that old gnote file, so I can test it here? Thanks.
g_file_make_directory creates directory async. So there might be timing issues which eventually result in segfault. I can reproduce this always, btw.
hm.. I'm probably wrong, there seems a separate async version. g_mkdir_with_parents fixes the issue for me though.
Created attachment 365842 [details] [review] application: Import notes only when manager is ready The notes from tomboy and gnote where being imported before the manager was ready. As this is not possible, the user was welcome with a segfault instead. So, import the notes only after the manager is ready, and test for the import paths before importing.
Review of attachment 365842 [details] [review]: Thanks.
I believe that with this last patch, this issue is fixed. Please re-open this bug if this still happens. Thanks.
*** Bug 767567 has been marked as a duplicate of this bug. ***