"This doesn't look like an easy fix. We can return early in create_partition_cb if udisks_client_get_object returns NULL, but it's probably better to crash because the partition is not going to be formatted then. We need to figure out why udisks_client_get_object sometimes returns NULL."
Doing some debugging with gdu create_partition_cb() in gducreatepartitiondialog.c
Reported on https:/ /bugs.launchpad .net/ubuntu/ +source/ gnome-disk- utility/ +bug/1479710 and https:/ /retrace. fedoraproject. org/faf/ reports/ bthash/ 8281bb04e3d96be 71f0533b318776d c95cc087b2
It seems to be easy to trigger by removing/adding partitions on an usb stick
backtrace
"#1 0xb76a89b1 in udisks_ object_ peek_drive (object=0x0) at udisks- generated. c:31392 select_ object (window=0xa1061a8, object=0x0) at gduwindow.c:882 object= 0xa1061a8, res=0x0, user_data= 0xa22c3f8) at gducreatepartit iondialog. c:374
created_ partition_ object_ path = 0xa393e90 "/org/freedeskt op/UDisks2/ block_devices/ sdf1"
partition_ object = 0x0
options_ builder = {x = {3062377923, 3062363303, 3063296000, 167964752, 3062447638, 168661408, 0, 3062377865, 3062670108, 3062447607, 3063296000, 0, 3062378169, 167964752, 0, 167760240}} entry=0xa02f658 ) at /build/ glib2.0- Lm6jKr/ glib2.0- 2.45.7/ ./gio/gtask. c:1104 glib2.0- Lm6jKr/ glib2.0- 2.45.7/ ./gio/gtask. c:1162 0xa028960, res=0xa02f880, user_data= 0xa02f658) at /build/ glib2.0- Lm6jKr/ glib2.0- 2.45.7/ ./gio/gdbusprox y.c:2579 entry=0xa02f880 ) at /build/ glib2.0- Lm6jKr/ glib2.0- 2.45.7/ ./gio/gtask. c:1104 glib2.0- Lm6jKr/ glib2.0- 2.45.7/ ./gio/gtask. c:1162 connection_ call_done (source=0xa028960, result=0xa02f808, user_data= 0xa02f880) at /build/ glib2.0- Lm6jKr/ glib2.0- 2.45.7/ ./gio/gdbusconn ection. c:5704 entry=0xa02f808 ) at /build/ glib2.0- Lm6jKr/ glib2.0- 2.45.7/ ./gio/gtask. c:1104 glib2.0- Lm6jKr/ glib2.0- 2.45.7/ ./gio/gtask. c:1118
ret = <optimized out>
#2 0x08064560 in gdu_window_
ret = 168845736
partition = 0xa06fb10
table = 0x0
drive = 0x0
#3 0x0806ed73 in create_partition_cb (source_
error = 0x0
fstype = 0xa06e048 "\001"
#4 0xb6a40450 in g_task_return_now (task=task@
No locals.
#5 0xb6a40b3a in g_task_return (task=0xa02f658, type=<optimized out>) at /build/
source = 0xb424e100
#6 0xb6a9dbf4 in reply_cb (connection=
data = <optimized out>
task = 0xa02f658
value = 0xb4212fc0
error = 0x0
fd_list = 0x0
#7 0xb6a40450 in g_task_return_now (task=task@
No locals.
#8 0xb6a40b3a in g_task_return (task=0xa02f880, type=<optimized out>) at /build/
source = 0xb424e100
#9 0xb6a92110 in g_dbus_
connection = 0xa028960
task = 0xa02f880
state = 0xa0e1500
error = 0x0
reply = 0xa2fc380
value = <optimized out>
#10 0xb6a40450 in g_task_return_now (task=task@
No locals.
#11 0xb6a4049b in complete_in_idle_cb (task=0xa02f808) at /build/
No locals.""
Reported on https:/ /bugzilla. gnome.org/ show_bug. cgi?id= 756275 where the maintainer added this comment
"This doesn't look like an easy fix. We can return early in create_partition_cb if udisks_ client_ get_object returns NULL, but it's probably better to crash because the partition is not going to be formatted then. We need to figure out why udisks_ client_ get_object sometimes returns NULL."
Doing some debugging with gdu create_ partition_ cb() in gducreatepartit iondialog. c
"udisks_ client_ settle (gdu_window_ get_client (data->window)); client_ get_object (gdu_window_ get_client (data->window), created_ partition_ object_ path); object) ;"
sleep(3);
partition_object = udisks_
system("udisksctl dump > /tmp/log");
g_print("%x\n", (unsigned int)partition_
When it segfaults the udiskctl dump knowns about sbd1 but the partition_object is null...