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 738981 - code-assistance crashes saving a file
code-assistance crashes saving a file
Status: RESOLVED FIXED
Product: gedit-plugins
Classification: Other
Component: General
3.14.x
Other Linux
: Normal critical
: ---
Assigned To: Gedit maintainers
Gedit maintainers
: 736650 741526 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2014-10-22 03:27 UTC by Christian Hergert
Modified: 2019-03-23 20:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
'make distcheck' in gnome-code-assistance fails (3.64 KB, text/plain)
2014-11-30 14:20 UTC, Sébastien Wilmet
Details

Description Christian Hergert 2014-10-22 03:27:23 UTC
Fedora 21, yum install gedit gedit-code-assistance, enable code-assistance plugin.

open a markdown file (test.md)
save
crash

Program received signal SIGSEGV, Segmentation fault.
g_type_check_instance (type_instance=0x1) at gtype.c:4085
4085	      if (type_instance->g_class)
(gdb) bt
  • #0 g_type_check_instance
    at gtype.c line 4085
  • #1 g_signal_emit_by_name
    at gsignal.c line 3391
  • #5 <emit signal 0x7fffd5ae31a9 "changed" on instance 0x7fffe000d1d0 [GeditDocument]>
    at gsignal.c line 3405
  • #6 save_cb
  • #7 g_task_return_now
    at gtask.c line 1077
  • #8 g_task_return
    at gtask.c line 1130
  • #9 query_info_cb
  • #10 g_task_return_now
    at gtask.c line 1077
  • #11 complete_in_idle_cb
    at gtask.c line 1086
  • #12 g_main_context_dispatch
    at gmain.c line 3111
  • #13 g_main_context_dispatch
    at gmain.c line 3710
  • #14 g_main_context_iterate
    at gmain.c line 3781
  • #15 g_main_context_iteration
    at gmain.c line 3842
  • #16 g_application_run
    at gapplication.c line 2282
  • #17 main

Comment 1 Ignacio Casal Quinteiro (nacho) 2014-10-22 06:59:17 UTC
afaik fedora does not provide the new code assistance. If you want to use it you will have to compile it.
Comment 2 jessevdk@gmail.com 2014-10-22 08:26:16 UTC
The reason for the crash, IIRC, is that the save/load signals have been changed when moving that API from gedit to gsv. Indeed, you'll have to compile gca yourself for now, although it would be nice to release and see it pushed into distro's.
Comment 3 Sébastien Wilmet 2014-11-29 18:18:41 UTC
Yes, new releases of {gedit,gnome}-code-assistance is quite important. Jesse, can you do it?

Also, it would be simpler to use the same versions as GNOME's and gedit's, so users know which version to install.
Comment 4 jessevdk@gmail.com 2014-11-30 12:21:26 UTC
I'm currently not able to do a release due to time constraints. I'm fine with bumping the version to match GNOME, if somebody else could do a release that would be great!
Comment 5 Sébastien Wilmet 2014-11-30 14:20:02 UTC
Created attachment 291830 [details]
'make distcheck' in gnome-code-assistance fails

I've tried to release gnome-code-assistance, but 'make distcheck' fails. I attach the errors.

It's most probably a configuration problem with D-Bus. I've just followed the build instructions at:
http://blogs.gnome.org/jessevdk/2014/04/11/gnome-code-assistance/

Is there a special thing to do so the D-Bus service works?
Comment 6 Sébastien Wilmet 2014-12-14 22:04:12 UTC
gedit- and gnome-code-assistance 3.14.0 have been released, normally this bug is fixed (it works for me).
Comment 7 Sébastien Wilmet 2014-12-15 10:44:42 UTC
*** Bug 741526 has been marked as a duplicate of this bug. ***
Comment 8 Jean-François Fortin Tam 2014-12-15 17:33:10 UTC
Filed a bug downstream at https://bugzilla.redhat.com/show_bug.cgi?id=1174356
Comment 9 Elad Alfassa 2014-12-16 18:22:24 UTC
Can't update the fedora package just yet!

The released tarball is broken. If I build the plugin from the released tarball I get this crash just like you'd get with 0.3.1.

If I manually clone gedit-code-assistance from git and build it there, it doesn't crash. 

I think the tarball is broken.

If I diff the tarball contents and the generated C files in my fresh clone, I get this:

--- ./src/gca-document.c	2014-12-07 21:26:25.000000000 +0200
+++ /home/elad/Sources/gedit-code-assistance/src/gca-document.c	2014-12-16 20:12:05.801624649 +0200
@@ -182,7 +182,7 @@
 static void gca_document_on_shortname_changed (GcaDocument* self);
 static void _gca_document_on_shortname_changed_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
 static void gca_document_on_document_saved (GcaDocument* self);
-static void _gca_document_on_document_saved_gedit_document_saved (GeditDocument* _sender, GError* _error_, gpointer self);
+static void _gca_document_on_document_saved_gedit_document_saved (GeditDocument* _sender, gpointer self);
 static void gca_document_update_location (GcaDocument* self);
 static void gca_document_real_dispose (GObject* base);
 static void gca_document_clear_unsaved_file (GcaDocument* self);
@@ -232,7 +232,7 @@
 }
 
 
-static void _gca_document_on_document_saved_gedit_document_saved (GeditDocument* _sender, GError* _error_, gpointer self) {
+static void _gca_document_on_document_saved_gedit_document_saved (GeditDocument* _sender, gpointer self) {
 	gca_document_on_document_saved ((GcaDocument*) self);
 }
 

Perhaps the tarball was generated with an older version of gedit's vapi installed or something like this?
Comment 10 Sébastien Wilmet 2014-12-18 10:30:07 UTC
*** Bug 736650 has been marked as a duplicate of this bug. ***
Comment 11 Ignacio Casal Quinteiro (nacho) 2014-12-19 10:59:05 UTC
I just made a new relase.