Problem with GUPnP root device / Question regarding GUPnP deinitialization



Hi all,

 

we are implementing a software tool using GUPnP 0.14.1-1. Our software contains a UPnP control point as well as a UPnP root device and is based on Qt 4.7.1. Right now we are facing two major issues...

 

1. Sometimes starting of our UPnP root device leads to a crash after calling "gupnp_device_info_get_service"; the proper service descriptions are hosted to that time...

 

The simplified call history looks sth. like...

1. Create UPnP context

2. "gupnp_context_host_path ()" of device description and service description files

3. "gupnp_root_device_new()"

4. Cast of root device created in 3. to GUPnPDeviceInfo (the device info is then checked with the assertion "GUPNP_IS_DEVICE_INFO()"... works just fine)

5. "gupnp_device_info_get_service()" with device info from 4. and proper service type (which is contained in service description used as param in 3.)

6. The following assertions fail when calling "gupnp_device_info_get_service()"...

 

(<unknown>:3222): GLib-GObject-CRITICAL **: g_object_ref: assertion `G_IS_OBJECT (object)' failed

** (<unknown>:3222): CRITICAL **: gupnp_service_info_get_context: assertion `GUPNP_IS_SERVICE_INFO (info)' failed

** (<unknown>:3222): CRITICAL **: gupnp_context_get_server: assertion `GUPNP_IS_CONTEXT (context)' failed

** (<unknown>:3222): CRITICAL **: gupnp_service_info_get_control_url: assertion `GUPNP_IS_SERVICE_INFO (info)' failed

(<unknown>:3222): libsoup-CRITICAL **: soup_server_add_handler: assertion `SOUP_IS_SERVER (server)' failed

** (<unknown>:3222): CRITICAL **: gupnp_service_info_get_event_subscription_url: assertion `GUPNP_IS_SERVICE_INFO (info)' failed

(<unknown>:3222): libsoup-CRITICAL **: soup_server_add_handler: assertion `SOUP_IS_SERVER (server)' failed

(<unknown>:3222): GLib-GObject-CRITICAL **: g_object_notify_queue_thaw: assertion `g_atomic_int_get(&object->ref_count) > 0' failed

(<unknown>:3222): GLib-GObject-CRITICAL **: g_object_notify_queue_thaw: assertion `g_atomic_int_get(&object->ref_count) > 0' failed

(<unknown>:3222): GLib-GObject-WARNING **: invalid uninstantiatable type `<invalid>' in cast to `GUPnPServiceInfo'

 

At first we gave the internal webserver some time to host the files before accessing them (assuming GUPNP uses it's own webserver and does not access the XML-files directly from the file-system)... but this strategy did not solve the problem. Right now we are starting to debug glib because the output does not give us any hints. Up to now our debugging revealed that inside" gupnp_service_info_get_context()" the method "g_object_new()" creates somehow broken instances of GUPnPServiceInfo; sometimes with illegal values of GType, sometimes with memory allocation errors. Does anyone know how to deal with this problem?

 

2. Our second issue: In our application the GUPNP part needs often to be restarted (initialized / deinitialized). Because of this we have a question regarding deinitialization of GUPNP structures: The sample code provided on the web simply calls g_object_unref on the GUPnPContext; we added calls to g_signal_handler_disconnect for all signal-handlers we registered during the initialization phase. Is there anything more we should take care of?

 

We would really appreciate if someone could point us in the right direction!

 

 

Thanks in advance & Best regards,

 

Alex

 

--

Alexander Kirschner M.Sc., Software Architect

Phone: +49.89.45 23 47-232

PGP-Fingerprint: 98EC 0735 04F7 3FF5 E8F3  E5B1 B836 D6D0 C5B1 5BEA

 

-- 
jambit Software Development & Management GmbH

Erika-Mann-Str. 63, 
D-80636 München
Phone: +49.89.45 23 47-0  
Fax:  +49.89.45 23 47-70  

http://www.jambit.com    
where innovation works

Geschäftsführer: Peter F. Fellinger, Markus Hartinger
Sitz: München; Registergericht: München, HRB 129139


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]