After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 783471 - First launch results in segfault
First launch results in segfault
Status: RESOLVED FIXED
Product: bijiben
Classification: Applications
Component: general
3.24.x
Other FreeBSD
: Normal major
: ---
Assigned To: Bijiben maintainer(s)
Bijiben maintainer(s)
: 767567 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2017-06-06 12:52 UTC by Koop Mast (kwm)
Modified: 2018-02-06 23:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
local-provider: Remove warning about .Trash folder (1.20 KB, patch)
2017-06-11 18:16 UTC, Isaque Galdino
committed Details | Review
application: Import notes only when manager is ready (2.70 KB, patch)
2017-12-21 14:45 UTC, Mohammed Sadiq
committed Details | Review

Description Koop Mast (kwm) 2017-06-06 12:52:23 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
  • #0 biji_manager_note_new_full
    at biji-manager.c line 882
  • #1 instanciate_note
    at provider/biji-import-provider.c line 115
  • #2 go_through_notes_cb
    at provider/biji-import-provider.c line 166
  • #3 next_async_callback_wrapper
    at gfileenumerator.c line 305
  • #4 g_task_return_now
    at gtask.c line 1121
  • #5 complete_in_idle_cb
    at gtask.c line 1135
  • #6 g_idle_dispatch
    at gmain.c line 5545
  • #7 g_main_dispatch
    at gmain.c line 3203
  • #8 g_main_context_dispatch
    at gmain.c line 3856
  • #9 g_main_context_iterate
    at gmain.c line 3929
  • #10 g_main_context_iteration
    at gmain.c line 3990
  • #11 g_application_run
    at gapplication.c line 2381
  • #12 main
    at bjb-main.c line 37

Comment 1 Isaque Galdino 2017-06-11 17:12:37 UTC
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.
Comment 2 Isaque Galdino 2017-06-11 18:16:48 UTC
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.
Comment 3 Isaque Galdino 2017-06-11 18:22:07 UTC
Review of attachment 353571 [details] [review]:

Pushed to master.
Comment 4 Koop Mast (kwm) 2017-06-12 16:23:05 UTC
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.
Comment 5 Isaque Galdino 2017-06-21 02:35:17 UTC
Is that possible for you to share that old gnote file, so I can test it here?
Thanks.
Comment 6 Mohammed Sadiq 2017-11-13 08:51:06 UTC
g_file_make_directory creates directory async. So there might be timing issues which eventually result in segfault. I can reproduce this always, btw.
Comment 7 Mohammed Sadiq 2017-11-13 08:56:50 UTC
hm.. I'm probably wrong, there seems a separate async version. g_mkdir_with_parents fixes the issue for me though.
Comment 8 Mohammed Sadiq 2017-12-21 14:45:26 UTC
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.
Comment 9 Isaque Galdino 2017-12-24 20:24:38 UTC
Review of attachment 365842 [details] [review]:

Thanks.
Comment 10 Isaque Galdino 2017-12-24 20:26:18 UTC
I believe that with this last patch, this issue is fixed.
Please re-open this bug if this still happens.
Thanks.
Comment 11 Isaque Galdino 2018-02-06 23:20:11 UTC
*** Bug 767567 has been marked as a duplicate of this bug. ***