! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Imgur Upload Not Working
Status:
RESOLVED: FIXED
Product:
Xfce4-screenshooter
Component:
General

Comments

Description ToZ editbugs 2015-05-01 00:24:42 CEST
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.
Comment 1 Landry Breuil editbugs 2015-10-17 08:04:04 CEST
Flo, since this is your commit, any idea ?
Comment 2 flo.xfce 2015-10-17 09:30:40 CEST
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.
Comment 3 ToZ editbugs 2015-10-17 14:11:50 CEST
Created attachment 6484 
strace
Comment 4 ToZ editbugs 2015-10-17 14:12:26 CEST
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.
Comment 5 flo.xfce 2015-10-19 09:44:54 CEST
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.
Comment 6 ToZ editbugs 2015-10-19 13:16:29 CEST
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)
Comment 7 flo.xfce 2015-10-19 15:39:37 CEST
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.
Comment 8 flo.xfce 2015-10-19 16:30:24 CEST
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.
Comment 9 ToZ editbugs 2015-10-19 20:16:47 CEST
Yes, this patch fixes the issue. Thank you.
Comment 10 Landry Breuil editbugs 2015-10-19 20:39:31 CEST
Thanks for testing - commited in 6de6b7e
Comment 11 Maarten 2016-06-11 23:27:48 CEST
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.
Comment 12 Landry Breuil editbugs 2016-06-12 22:27:15 CEST
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 :)

Bug #11879

Reported by:
ToZ
Reported on: 2015-05-01
Last modified on: 2016-06-12

People

Assignee:
flo.xfce
CC List:
3 users

Version

Version:
unspecified

Attachments

Additional information