As of commit: http://git.xfce.org/apps/xfce4-screenshooter/commit/?id=1c462a075f194c85a483db1db2bbccdb89af64ac, the upload to Imgur is not longer working. With debug enabled in the build, the following happens: $ xfce4-screenshooter DBG[lib/screenshooter-utils.c:298] screenshooter_get_datetime(): datetime is 2015-04-30_18-16-28 ** ERROR:lib/screenshooter-simple-job.c:115:screenshooter_simple_job_execute: assertion failed: (err != NULL || exo_job_is_cancelled (job)) Aborted (core dumped) Reverting back to the release 1.8.2 results in a working upload.
Flo, since this is your commit, any idea ?
I can't reproduce your problem here. Please provide more information, especially: Which version of glib are you running? Which version of exo are you running? Which distribution do you use, in case there were vendor specific patches applied? Since when do you encounter this issue? glib was recently updated, there might be some regressions. I still use 2.44, but 2.46 is already out.
Created attachment 6484 strace
I build Xfce from the git master tree on Arch Linux. glib is at 2.46.0-2 and exo is at 0.10.7git-88af665.I had the problem with glib 2.44 and it persists with 2.46, however the error message has changed: $ xfce4-screenshooter DEBUG2: /tmp/Screenshot_2015-10-17_07-58-48.png - Screenshot DEBUG3: /tmp/Screenshot_2015-10-17_07-58-48.png DEBUG3: Screenshot DEBUG: - 0 ** (xfce4-screenshooter:17601): CRITICAL **: cb_error: assertion 'error != NULL' failed (xfce4-screenshooter:17601): GLib-CRITICAL **: g_error_free: assertion 'error != NULL' failed Also attached is an strace. As before, building the 1.8.2 snapshot results in a working imgur upload.
I am on an other machine now (Arch Linux, all packages latest stable release) and I am able to reproduce the bug now. Could you please try downgrading libsoup and test again? With full debug enabled I can't even compile right know, it seems that libsoup changed the API a bit.
Unfortunately no. I downgraded libsoup all the way back to 2.44.1-1 (from the current 2.52.1-1) and it did not help. It still crashes and the error messages remains the same. With debug enabled, I get: DBG[lib/screenshooter-utils.c:298] screenshooter_get_datetime(): datetime is 2015-10-19_07-15-27 DEBUG2: /tmp/Screenshot_2015-10-19_07-15-27.png - Screenshot DEBUG3: /tmp/Screenshot_2015-10-19_07-15-27.png DEBUG3: Screenshot DEBUG: - @ ** ERROR:lib/screenshooter-simple-job.c:115:screenshooter_simple_job_execute: assertion failed: (err != NULL || exo_job_is_cancelled (job)) Aborted (core dumped)
Well I know where the problem is. Try the following in screenshooter_simple_job_launch(): g_strdup_value_contents (&value)); g_array_insert_val(simple_job->param_values,n,value); g_value_unset (&value); g_strdup_value_contents (&g_array_index (simple_job->param_values, GValue, n)); The values just don't get stored in the array, which leads to the crash some time later. Unfortunatly I have no idea why the insert functions does not work as expected.
Created attachment 6486 fix_upload.patch GArray used references where GValueArray uses copies. So we allocate new memory for all elements which is not affected by operations on the original values.
Yes, this patch fixes the issue. Thank you.
Thanks for testing - commited in 6de6b7e
Created attachment 6702 Crash introduced on zimagez and imgur, this patch contains the zimagez part of the fix. This crash also happens when uploading to zimagez. The introducing commit did it to zimagez and imgur, but only imgur is currently fixed.
Thanks Maarten, applied in http://git.xfce.org/apps/xfce4-screenshooter/commit/?id=4569b71 - can't wait to see your work on the gtk3 branch :)