After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 683935 - Idle source dispatched without callback, You must call g_source_set_callback()
Idle source dispatched without callback, You must call g_source_set_callback()
Status: RESOLVED NOTABUG
Product: libsoup
Classification: Core
Component: HTTP Transport
2.38.x
Other Linux
: Normal normal
: ---
Assigned To: libsoup-maint@gnome.bugs
libsoup-maint@gnome.bugs
Depends on:
Blocks:
 
 
Reported: 2012-09-13 09:55 UTC by Milan Crha
Modified: 2012-09-13 14:46 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Milan Crha 2012-09-13 09:55:22 UTC
I get this warning:
   (evolution:15200): GLib-WARNING **: Idle source dispatched without callback
   You must call g_source_set_callback().
when I use current git master of evolution (to be 3.5.92) with libsoup 2.38.1 and I have set to download images from the Internet, and I select an HTML message with images which are not downloaded yet.

This is caused because of soup_add_completion is called with NULL 'function'.

Breakpoint 2, soup_add_completion (async_context=0x0, function=0, data=0x0) at soup-misc.c:136
136		GSource *source = g_idle_source_new ();
(gdb) bt
  • #0 soup_add_completion
    at soup-misc.c line 136
  • #1 send_sync_finished
    at soup-http-input-stream.c line 444
  • #2 soup_http_input_stream_got_headers
    at soup-http-input-stream.c line 238
  • #3 g_closure_invoke
    at gclosure.c line 777
  • #4 signal_emit_unlocked_R
    at gsignal.c line 3551
  • #5 g_signal_emit_valist
    at gsignal.c line 3300
  • #6 g_signal_emit
    at gsignal.c line 3356
  • #7 soup_message_got_headers
    at soup-message.c line 1068
  • #8 io_read
    at soup-message-io.c line 975
  • #9 io_write
    at soup-message-io.c line 851
  • #10 soup_message_io_client
    at soup-message-io.c line 1142
  • #11 soup_message_send_request
    at soup-message-client-io.c line 146
  • #12 soup_connection_send_request
    at soup-connection.c line 958
  • #13 soup_session_send_queue_item
    at soup-session.c line 1780
  • #14 process_queue_item
    at soup-session-sync.c line 306
  • #15 queue_message_thread
    at soup-session-sync.c line 348
  • #16 g_thread_proxy
    at gthread.c line 801
  • #17 start_thread
    from /lib64/libpthread.so.0
  • #18 clone
    from /lib64/libc.so.6



(gdb) f 14
 #14 0x00007ffff4e53752 in process_queue_item (item=0x7fff9803e9b0) at soup-session-sync.c:306
306				soup_session_send_queue_item (item->session, item, NULL);
(gdb) f 1
 #1  0x00007ffff4e37ae7 in send_sync_finished (stream=0x7fffb80398c0 [SoupHTTPInputStream]) at soup-http-input-stream.c:444
444		soup_add_completion (priv->async_context, NULL, NULL);
Comment 1 Milan Crha 2012-09-13 09:57:22 UTC
View on threads at the above break-point is:

Thread 32 (Thread 0x7fffc9b63700 (LWP 15275))

  • #0 soup_add_completion
    at soup-misc.c line 136
  • #1 send_sync_finished
    at soup-http-input-stream.c line 444
  • #2 soup_http_input_stream_got_headers
    at soup-http-input-stream.c line 238
  • #3 g_closure_invoke
    at gclosure.c line 777
  • #4 signal_emit_unlocked_R
    at gsignal.c line 3551
  • #5 g_signal_emit_valist
    at gsignal.c line 3300
  • #6 g_signal_emit
    at gsignal.c line 3356
  • #7 soup_message_got_headers
    at soup-message.c line 1068
  • #8 io_read
    at soup-message-io.c line 975
  • #9 io_write
    at soup-message-io.c line 851
  • #10 soup_message_io_client
    at soup-message-io.c line 1142
  • #11 soup_message_send_request
    at soup-message-client-io.c line 146
  • #12 soup_connection_send_request
    at soup-connection.c line 958
  • #13 soup_session_send_queue_item
    at soup-session.c line 1780
  • #14 process_queue_item
    at soup-session-sync.c line 306
  • #15 queue_message_thread
    at soup-session-sync.c line 348
  • #16 g_thread_proxy
    at gthread.c line 801
  • #17 start_thread
    from /lib64/libpthread.so.0
  • #18 clone
    from /lib64/libc.so.6

Comment 2 Dan Winship 2012-09-13 11:16:02 UTC
In libsoup 2.38 and earlier, SoupRequestHTTP only supports async requests. (soup_request_send_async() as opposed to soup_request_send()). This is part of why the API is marked unstable; because it was never fully implemented.

In libsoup 2.40, you can use soup_request_send() with SoupSessionSync, and soup_request_send_async() with SoupSessionAsync, but not vice versa. (The plan is that eventually there will only be a single SoupSession class, which will support both sync and async ops.)
Comment 3 Milan Crha 2012-09-13 14:46:43 UTC
Strange, I thought this worked before.

In other words, I understand this as: just wait for 2.40 and it'll work there. I'm fine with that.