On Fri, 26 Nov 2010 18:32:26 +0100 Marco Trevisan (Treviño) <[email protected]>
said:

> Hello, recentely I've been experiencing a lot of segfaults when running
> an Elementary application which uses a genlist with some swallowed parts
> in which I put some elm icons (png files).
> When running it I often get crashes... Debugging it I found this:
> 
> =========
> CRI<14207>: eina_share_common.c:561 _eina_share_common_node_from_str()
> *** Eina Magic Check Failed !!!
>     Input handle is wrong type
>     Expected: 98761254 - Eina Stringshare Node
>     Supplied: 6e657070 - (unknown)
> *** NAUGHTY PROGRAMMER!!!
> *** SPANK SPANK SPANK!!!
> *** Now go fix your code. Tut tut tut!
> 
> 
> //DEBUG: Node referencies 622869060 (slen: 1145307236)
> 
> 
> Program received signal SIGSEGV, Segmentation fault.
> eina_share_common_del (share=0x65c810, str=0x7ffff1219150 "5hhu %5hu '%
> s'\n")
>     at eina_share_common.c:858
> 858           node->references--;
> =========
> 
> So it seems that edje tries to delete an invalid eina_share_common
> string (is this a bug that should be fixed or is it theme-dependent?),
> and so the "node" pointer in eina share is not valid...

what i want to know is.. how is it trying to delete an invalid stringshare ptr?
thats more the core issue. :)

> However eina never checks for its validity, so it seg-faults...
> The attached patch fix this issue, setting the node to null when its
> magic is not valid, and then always checking for its validity.
> 
> Is this fine?

well its nicer for eina to do this - allows for better stability, it doesnt fix
the core problem as above. reading the code.. i cant see how this can happen :
( the real part comes from a mempool - but on alloc is memsets it to 0. so tis
all 0'd out to start and that string (ep->text.cache.out_str) is referred to
very little, and i've had a look at the places it is referred to and cant find
anything that is freeint it then not nulling it out (except when freeing and
returning it to the mempool)... unless its a rare case of text ==
ep->text.cache.out_str with a ref of one... tho that should die in add, not
del... 

try my commit #55264.

as for your patch - it looks good. safer. in it goes.

> Full stack trace:
> 
> #0  eina_share_common_del (share=0x65c810, str=0x7ffff1219150 "5hhu %5hu
> '%s'\n")
>     at eina_share_common.c:858
> #1  0x00007ffff120e047 in eina_stringshare_del (str=0x7ffff1219150 "5hhu
> %5hu '%s'\n")
>     at eina_stringshare.c:632
> #2  0x00007ffff1e1f7bc in _edje_text_recalc_apply (ed=0x95b900,
> ep=0x70c3a0, 
>     params=0x70c500, chosen_desc=<value optimized out>) at
> edje_text.c:556
> #3  0x00007ffff1de402d in _edje_part_recalc (ed=0x95b900, ep=0x70c3a0,
> flags=3)
>     at edje_calc.c:2007
> #4  0x00007ffff1de4d86 in _edje_recalc_do (ed=0x95b900) at
> edje_calc.c:268
> #5  0x00007ffff1e25c7d in edje_object_part_swallow (obj=<value optimized
> out>, 
>     part=0x7fffe001484c "elm.swallow.icon", obj_swallow=0x7fffe0017860)
>     at edje_util.c:2300
> #6  0x00007ffff1b5d5fc in _item_realize (it=0x7fffe0016ed0, in=10,
> calc=1)
>     at elm_genlist.c:1489
> #7  0x00007ffff1b5db89 in _item_block_recalc (itb=0x95b6a0, in=<value
> optimized out>, 
>     qadd=<value optimized out>, norender=<value optimized out>) at
> elm_genlist.c:1609
> #8  0x00007ffff1b5e329 in _queue_proecess (wd=0x721b70, norender=<value
> optimized out>)
>     at elm_genlist.c:2425
> #9  0x00007ffff1b5e567 in _item_queue (wd=0x721b70, it=<value optimized
> out>)
>     at elm_genlist.c:2476
> #10 0x00007ffff1b5ead9 in elm_genlist_item_append (obj=<value optimized
> out>, 
>     itc=0x7ffff2977040, data=0x8fed90, parent=0x0,
> flags=ELM_GENLIST_ITEM_NONE, 
>     func=<value optimized out>, func_data=0x0) at elm_genlist.c:2528


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    [email protected]


------------------------------------------------------------------------------
What happens now with your Lotus Notes apps - do you make another costly 
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus 
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to