Merge lp://staging/~ev/activity-log-manager/add-whoopsie-back into lp://staging/activity-log-manager

Proposed by Evan
Status: Merged
Merged at revision: 47
Proposed branch: lp://staging/~ev/activity-log-manager/add-whoopsie-back
Merge into: lp://staging/activity-log-manager
Diff against target: 357 lines (+280/-5)
5 files modified
.bzrignore (+4/-1)
configure.ac (+2/-1)
src/Makefile.am (+18/-2)
src/alm-cc.c (+1/-1)
src/diagnostics-widget.c (+255/-0)
To merge this branch: bzr merge lp://staging/~ev/activity-log-manager/add-whoopsie-back
Reviewer Review Type Date Requested Status
Manish Sinha (मनीष सिन्हा) Approve
Review via email: mp+169855@code.staging.launchpad.net

Description of the change

This resurrects code for the Diagnostics panel (whoopsie) that appears to have been accidentally deleted in the move from the lp:~activity-log-manager/activity-log-manager/vala branch.

Namely, it brings back src/diagnostics-widget.c, which is not automatically generated code, unlike the rest of the C files that appear in that directory.

I'm working on a debdiff, with these changes incorporated, against 0.9.4-0ubuntu6.1, which is the version in Ubuntu Saucy.

To post a comment you must log in.
Revision history for this message
Manish Sinha (मनीष सिन्हा) (manishsinha) wrote :

It looks good, but still doesn't show up in System Settings.

http://i.imgur.com/xCTk5bR.png

review: Needs Fixing
Revision history for this message
Manish Sinha (मनीष सिन्हा) (manishsinha) wrote :

I did some more research and found that in alm-cc.c file, inside function "alm_main_window_panel_init"

the #ifdef section is not being called. I tried fixing that with changing

#ifdef HAVE_WHOOPSIE to
#ifdef WHOOPSIE

and changing in src/Makefile.am

if HAVE_WHOOPSIE
libactivity_log_manager_la_CFLAGS += \
 $(POLKIT_CFLAGS) \
 -DGNOMECC_UI_DIR=\""$(gnomeccuidir)"\"
endif

to
if HAVE_WHOOPSIE
libactivity_log_manager_la_CFLAGS += \
 $(POLKIT_CFLAGS) \
 -DGNOMECC_UI_DIR=\""$(gnomeccuidir)"\" \
 -DWHOOPSIE
endif

Now the section isnide #ifdef is built, but there is a segfault with bt

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6488c10 in g_type_check_instance_cast () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
(gdb) bt
#0 0x00007ffff6488c10 in g_type_check_instance_cast () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#1 0x00007fffb99244b0 in alm_main_window_panel_init (self=0x5555557b9b40) at alm-cc.c:63
#2 0x00007ffff648795f in g_type_create_instance () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#3 0x00007ffff646c718 in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#4 0x00007ffff646dce1 in g_object_newv () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#5 0x00007ffff646e4d0 in g_object_new_valist () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#6 0x00007ffff646e804 in g_object_new () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#7 0x000055555555de8c in ?? ()
#8 0x000055555555be47 in ?? ()
#9 0x00007ffff6467620 in g_closure_invoke () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#10 0x00007ffff6478f00 in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#11 0x00007ffff6480d11 in g_signal_emit_valist () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#12 0x00007ffff6480f92 in g_signal_emit () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#13 0x000055555555ebbb in ?? ()
#14 0x00007ffff646a7a0 in g_cclosure_marshal_VOID__BOXEDv () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#15 0x00007ffff64678e7 in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#16 0x00007ffff64802df in g_signal_emit_valist () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#17 0x00007ffff6480f92 in g_signal_emit () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#18 0x000055555555ed94 in ?? ()
#19 0x00007ffff76a849c in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#20 0x00007ffff6467620 in g_closure_invoke () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#21 0x00007ffff6478f00 in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#22 0x00007ffff6480996 in g_signal_emit_valist () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#23 0x00007ffff6480f92 in g_signal_emit () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#24 0x00007ffff77d777e in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0

Revision history for this message
Manish Sinha (मनीष सिन्हा) (manishsinha) wrote :

#1 0x00007fffb99244b0 in alm_main_window_panel_init (self=0x5555557b9b40) at alm-cc.c:63
line 63 is
GtkWidget *whoopsie = GTK_WIDGET (whoopsie_daisy_preferences_new ());

tells that the issue is with macro GTK_WIDGET since if the problem was with whoopsie_daisy_preferences_new () then the backtrace would have included the function

GtkWidget*
whoopsie_daisy_preferences_new (void)
{
    return g_object_new (WHOOPSIE_DAISY_TYPE_PREFERENCES, NULL);
}

section from diagnostic-widget.c

Revision history for this message
Manish Sinha (मनीष सिन्हा) (manishsinha) wrote :

I tried it in a VM and I did not get any Segfault. Now this is weird. Evan, can you try it out with the above changes I mentioned

Revision history for this message
Manish Sinha (मनीष सिन्हा) (manishsinha) wrote :

Sorry, here is the branch where I pushed the minor changes with your merged branch
lp:~manishsinha/activity-log-manager/ev

51. By Evan

Tidy

52. By Evan

Merge Manish's branch with changes.

Revision history for this message
Evan (ev) wrote :

I've implemented the define for whoopsie in a slightly different way. It is working fine for me when I build it in a deb and install that way.

Can you please build with debugging symbols and provide a backtrace?

Revision history for this message
Evan (ev) wrote :
Revision history for this message
Manish Sinha (मनीष सिन्हा) (manishsinha) wrote :
Download full text (6.5 KiB)

Hello Evan, I am still getting crashes on another system, with backtrace

Program received signal SIGSEGV, Segmentation fault.
g_type_check_instance_cast (type_instance=0xffffffffe8006e00, iface_type=iface_type@entry=93824994480816) at /build/buildd/glib2.0-2.36.0/./gobject/gtype.c:4027
4027 /build/buildd/glib2.0-2.36.0/./gobject/gtype.c: No such file or directory.
(gdb) bt
#0 g_type_check_instance_cast (type_instance=0xffffffffe8006e00, iface_type=iface_type@entry=93824994480816) at /build/buildd/glib2.0-2.36.0/./gobject/gtype.c:4027
#1 0x00007fffe45f94b0 in alm_main_window_panel_init (self=0x555555b3ab40) at alm-cc.c:63
#2 0x00007ffff648795f in g_type_create_instance (type=<optimized out>) at /build/buildd/glib2.0-2.36.0/./gobject/gtype.c:1917
#3 0x00007ffff646c718 in g_object_constructor (type=<optimized out>, n_construct_properties=1, construct_params=0x555555b78110) at /build/buildd/glib2.0-2.36.0/./gobject/gobject.c:1855
#4 0x00007ffff646dce1 in g_object_newv (object_type=object_type@entry=93824997485168, n_parameters=n_parameters@entry=2, parameters=parameters@entry=0x555555b7dcf0)
    at /build/buildd/glib2.0-2.36.0/./gobject/gobject.c:1719
#5 0x00007ffff646e4d0 in g_object_new_valist (object_type=object_type@entry=93824997485168, first_property_name=first_property_name@entry=0x55555556019b "shell",
    var_args=var_args@entry=0x7fffffffca48) at /build/buildd/glib2.0-2.36.0/./gobject/gobject.c:1836
#6 0x00007ffff646e804 in g_object_new (object_type=93824997485168, first_property_name=0x55555556019b "shell") at /build/buildd/glib2.0-2.36.0/./gobject/gobject.c:1551
#7 0x000055555555de8c in ?? ()
#8 0x000055555555be47 in ?? ()
#9 0x00007ffff6467620 in g_closure_invoke (closure=0x555555931870, return_value=0x0, n_param_values=4, param_values=0x7fffffffce10, invocation_hint=0x7fffffffcdb0)
    at /build/buildd/glib2.0-2.36.0/./gobject/gclosure.c:777
#10 0x00007ffff6478f00 in signal_emit_unlocked_R (node=node@entry=0x555555931b20, detail=detail@entry=0, instance=instance@entry=0x555555a00000, emission_return=emission_return@entry=0x0,
    instance_and_params=instance_and_params@entry=0x7fffffffce10) at /build/buildd/glib2.0-2.36.0/./gobject/gsignal.c:3584
#11 0x00007ffff6480d11 in g_signal_emit_valist (instance=0x555555a00000, signal_id=<optimized out>, detail=0, var_args=var_args@entry=0x7fffffffd098)
    at /build/buildd/glib2.0-2.36.0/./gobject/gsignal.c:3328
#12 0x00007ffff6480f92 in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at /build/buildd/glib2.0-2.36.0/./gobject/gsignal.c:3384
#13 0x000055555555ebbb in ?? ()
#14 0x00007ffff646a7a0 in g_cclosure_marshal_VOID__BOXEDv (closure=0x555555931ff0, return_value=<optimized out>, instance=<optimized out>, args=<optimized out>,
    marshal_data=<optimized out>, n_params=<optimized out>, param_types=0x555555768ea0) at /build/buildd/glib2.0-2.36.0/./gobject/gmarshal.c:1160
#15 0x00007ffff64678e7 in _g_closure_invoke_va (closure=0x555555931ff0, return_value=0x0, instance=0x555555a00000, args=0x7fffffffd518, n_params=1, param_types=0x555555768ea0)
    at /build/buildd/glib2.0-2.36.0/./gobject/gclosure.c:840
#16 0x00007ffff64802df in g_s...

Read more...

Revision history for this message
Manish Sinha (मनीष सिन्हा) (manishsinha) wrote :

Used the debdiff and built the packages locally and installed it. Sadly, crashes again with exactly the same backtrace

53. By Evan

Some small cleanups. Debugging.

Revision history for this message
Evan (ev) wrote :

So whoopsie_daisy_preferences_new () is returning an invalid type from the looks of it.

Can you please build from my branch with the latest commits (r53) and try again? It should output something like "GType: 258458288" but will probably give you something bogus. Bonus points if you can use gdb to dig at what's going on in whoopsie_daisy_preferences_new ().

As far as I can see we're constructing the type properly, so I'm perplexed as to what's going on here.

Revision history for this message
Manish Sinha (मनीष सिन्हा) (manishsinha) wrote :

This fixes it. I guess it was solved by

- extern void* whoopsie_daisy_preferences_new (void);
+ extern GtkWidget* whoopsie_daisy_preferences_new (void);

I will still check it on another developer installation before merging

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches