Hi,

On Sat, Jul 23, 2011 at 03:10:15AM +0200, Cedric BAIL wrote:
>Hi,
>
>On Sat, Jul 23, 2011 at 12:55 AM, Tomas Cech <tc...@suse.cz> wrote:
>> Hi,
>>
>> On Fri, Jul 22, 2011 at 11:44:53AM +0200, Tomas Cech wrote:
>>>
>>> On Fri, Jul 22, 2011 at 01:20:32AM +0200, Cedric BAIL wrote:
>>>>
>>>> Hi,
>>>>
>>>> On Thu, Jul 21, 2011 at 11:47 PM, Tomas Cech <tc...@suse.cz> wrote:
>>>>>
>>>>> I'm trying to create packages for openSUSE once again. I noticed that
>>>>> build of elementary fails on segfault of edje_cc.
>>>>>
>>>>> Log of the build can be found here:
>>>>> http://goo.gl/xTTuj
>>>>>
>>>>> I tried to analyze coredump of this segfault and it looks like:
>>>>>
>>>>> Program received signal SIGSEGV, Segmentation fault.
>>>>> 0x00007ffff724f236 in evas_object_image_add (e=<value optimized out>)
>>>>> at evas_object_image.c:147
>>>>> 147        o->cur.cspace =
>>>>>
>>>>> obj->layer->evas->engine.func->image_colorspace_get(obj->layer->evas->engine.data.output,
>>>>> (gdb) bt
>>>>> #0  0x00007ffff724f236 in evas_object_image_add (e=<value optimized
>>>>> out>) at evas_object_image.c:147
>>>>> #1  0x000000000040441a in data_write_images
>>>>> (ef=0xa00580,image_num=0x7fffffffbc04, input_bytes=0x7fffffffbc0c,
>>>>>     input_raw_bytes=0x7fffffffbc08) at edje_cc_out.c:519
>>>>> #2  0x00000000004059ad in data_write () at edje_cc_out.c:1084
>>>>> #3  0x000000000040343f in main (argc=8, argv=<value optimized out>) at
>>>>> edje_cc.c:217
>>>>> (gdb) p obj->layer->evas->engine
>>>>> $5 = {module = 0x0, func = 0x0, data = {output = 0x0, context = 0x0},
>>>>> info = 0x0, info_magic = 0}
>>>>
>>>> Sounds like you don't have buffer engine installed for evas.
>>>> What would be interesting is evas build log.
>>
>> Buffer engine is installed and successfully loaded. I'm unable to
>> find, where EcoreEvas->Evas->engine gets initialized.
>
>How do you know that the engine is successfully loaded ? Did you try
>running edje_cc on top of strace ? I would be interested to know what
>it tell.

I walked through the code and got here:

Breakpoint 4, eina_module_load (m=0x6902d0) at
eina_amalgamation.c:15511
15511      DBG("successfully loaded %s", m->file);
(gdb) p m->file
$64 = 0x6902dc
"/usr/lib64/evas/modules/engines/buffer/linux-gnu-x86_64-1.0.1/module.so"

>
>> I got to 'ecore_evas_buffer_allocfunc_new', where is
>>  557    ee->evas = evas_new();
>>
>> but this evas object doesn't have engine initialized:
>> 557        ee->evas = evas_new();
>> (gdb) 558        evas_data_attach_set(ee->evas, ee);
>> (gdb) p ee->evas
>> $60 = (Evas *) 0x660610
>> (gdb) p ee->evas->engine
>> $61 = {module = 0x0, func = 0x0, data = {output = 0x0, context = 0x0},
>> info = 0x0, info_magic = 0}
>>
>> I'd appreciate if someone could tell me where to look.
>
>The function call that will bind the engine to the evas cancas is the
>following one :
> evas_output_method_set(ee->evas, rmethod);
>
>After reading your build log, I don't see anything obviously wrong, so
>try strace that the best advice I can give you and post the output
>when done. Maybe that will us figure out what's going on.

Strace really shown the culprit:

stat("/usr/lib64/evas/modules/engines/buffer/linux-gnu-x86_64-1.0.1/module.so", 
{st_mode=S_IFREG|0755, st_size=18904, ...}) = 0
futex(0x7fb2f25b30e0, FUTEX_WAKE_PRIVATE, 2147483647) = 0
open("/usr/lib64/evas/modules/engines/buffer/linux-gnu-x86_64-1.0.1/module.so", 
O_RDONLY) = 7
read(7, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\30\0\0\0\0\0\0"..., 
832) = 832
fstat(7, {st_mode=S_IFREG|0755, st_size=18904, ...}) = 0
mmap(NULL, 2115568, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 7, 0) = 
0x7fb2ed84c000
fadvise64(7, 0, 2115568, POSIX_FADV_WILLNEED) = 0
mprotect(0x7fb2ed84f000, 2097152, PROT_NONE) = 0
mmap(0x7fb2eda4f000, 8192, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 7, 0x3000) = 0x7fb2eda4f000
close(7)                                = 0
mprotect(0x7fb2eda4f000, 4096, PROT_READ) = 0
stat("/usr/lib64/evas/modules/engines/software_generic/linux-gnu-x86_64-1.0.1/module.so",
 0x7fff235b05f0) = -1 ENOENT (No such file or directory)

It also explains where 'image_colorspace_get' is defined when not
redefined in engine.

After adding 'evas-module_engine_software_generic' to Requires field
in the spec file problem vanished. I'll recheck which engines need
this dependency and fix it too.

I'd suggest to print some error message when such condition happen and
add check for not accessing NULL pointer there.

Thanks for your help!

Best regards,

Tomas Cech
Sleep_Walker

------------------------------------------------------------------------------
Storage Efficiency Calculator
This modeling tool is based on patent-pending intellectual property that
has been used successfully in hundreds of IBM storage optimization engage-
ments, worldwide.  Store less, Store more with what you own, Move data to 
the right place. Try It Now! http://www.accelacomm.com/jaw/sfnl/114/51427378/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to