GLib-GObject invalid unclassed pointer in cast to 'GsAppReviewsDialog'
- Open review dialog for an app
- Immediately press
Esc
. - The following should be printed in console.
GLib-GObject invalid unclassed pointer in cast to 'GsAppReviewsDialog'
This is because plugin refine job takes time, and by the time gs_app_reviews_dialog_app_refine_cb ()
is invoked, the review dialog has already been finalized. This is reproducible in debug build always, and not so much in release build (system gnome-software), though issue remains.
Following is the refcount in gnome-software 46.beta
(that ships with OS). As shown, the refcount issue is still there but no warning is thrown in console.
Thread 1 "gnome-software" hit Breakpoint 1, gs_app_reviews_dialog_app_refine_cb (source=0x562d48bd3c50 [GsPluginLoader], res=0x562d4be2bfa0, user_data=0x562d4bf3be20) at ../src/gs-app-reviews-dialog.c:238
238 ../src/gs-app-reviews-dialog.c: No such file or directory.
(gdb) n
241 in ../src/gs-app-reviews-dialog.c
(gdb) n
243 in ../src/gs-app-reviews-dialog.c
(gdb) info locals
plugin_loader = 0x562d48bd3c50 [GsPluginLoader]
self = 0x562d4bf3be20
error = 0x0
(gdb) p *self
$1 = {
parent_instance = {
parent_instance = {
parent_instance = {
parent_instance = {
g_type_instance = {
g_class = <error reading variable: Cannot access memory at address 0x0>
},
ref_count = 0,
qdata = 0x0
},
priv = 0x562d4bf3bcd0
}
}
},
listbox = 0x0,
stack = 0x0,
plugin_loader = 0x0,
app = 0x0,
cancellable = 0x0,
refine_cancellable = 0x0,
odrs_provider = 0x2c0
}
Edited by Sid