libdbusmenu crashes in prop_array_teardown

Bug #1244244 reported by Denis Fokin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libdbusmenu (Ubuntu)
New
Undecided
Unassigned

Bug Description

It is possible that this issue has the same cause as the #837009. I am not sure about it, so I am creating another one.

I have attached a stack trace. The problem is in prop_array. On widow closing, in my particular case functions are invoked in the next order

1. Check in menuitem_property_idle that priv->prop_array is not NULL
2. Entering dbusmenu_server_dispose
3. Deallocation of priv->prop_array and assigning NULL to it
3. Exiting dbusmenu_server_dispose
4. Entering dbusmenu_server_finalize
5. Exiting dbusmenu_server_finalize
6. Invoking prop_array_teardown that accesses priv->prop_array->len which has been deallocated in #3

As a simple fix I would think about checking of the array for NULL in the beginning of prop_array_teardown. But I found that in my case the prop array is invoked from different threads (I used (pid_t) syscall (SYS_gettid) to compare the thread ids). By this reason, it seems the code needs better synchronization.

Please let me know if I can disable multithreading for the library or may be I use libdbusmenu incorrectly.

Actually the problem happens in Intellij IDEA when I am trying to use Jayatana library which is written on top of Ayatana library. This issue is a stopper for using Unity menu.

My environment is Ubuntu 13.04

I can provide a dump as well.

Revision history for this message
Denis Fokin (denis-fokin) wrote :
affects: indicator-messages (Ubuntu) → libdbusmenu (Ubuntu)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.