On Thu, 03 Mar 2011 18:16:05 +0100 Yassin <[email protected]> said:

i can't reproduce your problem. i've run another sample video player that uses
emotion and plays several videos in a row (can hit button for next). valgrind
complained about some decoder accessing uninitialized memory stuff - but
nothing else. no crashes. worked fine with software and gl engines.

try running your app under valgrind - you'll get much more useful information
especially with --db-attach.

> Hello,
> 
> i have always my problem : (
> i have update the efl yesterday evening.
> and i have recompile my program :
> 
> 
> the code who have the seg fault :
> 
> =============================================================
> ...
> static void
> played(void *data, Evas_Object *obj, void *event_info) {
> 
>      Evas_Object * ov = data;
> 
>      printf("video stopped!\n");
>      emotion_object_position_set(ov, 0.0);
>      emotion_object_play_set(ov, 0);
> 
>      if (!emotion_object_file_set(ov, "video2.flv"))
>          printf("Chargement de la video failed 2 !\n");
>      else
>          printf("Chargement de la video  Sucess 2 !\n");
> 
>      //emotion_object_play_set(ov, 1);
> }
> ...
> =============================================================
> 
> The seg fault back trace with gdb :
> 
> =============================================================
> ...
>     Program received signal SIGSEGV, Segmentation fault.
> 0xb7d0e84a in malloc_consolidate (av=<value optimized out>) at malloc.c:5161
> 5161    malloc.c: Aucun fichier ou dossier de ce type.
>      in malloc.c
> (gdb) bt
> #0  0xb7d0e84a in malloc_consolidate (av=<value optimized out>) at 
> malloc.c:5161
> #1  0xb7d10a85 in _int_malloc (av=<value optimized out>, bytes=<value 
> optimized out>) at malloc.c:4373
> #2  0xb7d12f33 in __libc_malloc (bytes=2048) at malloc.c:3660
> #3  0xb7e81333 in evas_common_draw_context_cutouts_add (dc=0x80bbd30, 
> x=0, y=0, w=480, h=800)
>      at ../../../../src/lib/include/evas_inline.x:43
> #4  evas_common_draw_context_add_cutout (dc=0x80bbd30, x=0, y=0, w=480, 
> h=800) at evas_draw_main.c:191
> #5  0xb7fcd039 in eng_context_cutout_add (data=0x80bb900, 
> context=0x80bbd30, x=0, y=0, w=480, h=800)
>      at evas_engine.c:102
> #6  0xb7e555c1 in evas_render_updates_internal (e=0x80946f0, 
> make_updates=<value optimized out>,
>      do_draw=1 '\001') at evas_render.c:1315
> #7  0xb7eed469 in _ecore_evas_x_render (ee=0x8094478) at ecore_evas_x.c:420
> #8  0xb7ee3bae in _ecore_evas_idle_enter (data=0x0) at ecore_evas.c:47
> #9  0xb7ebea75 in _ecore_idle_enterer_call () at ecore_idle_enterer.c:146
> #10 0xb7ec0bed in _ecore_main_loop_iterate_internal (once_only=0) at 
> ecore_main.c:1412
> #11 0xb7ec0fb7 in ecore_main_loop_begin () at ecore_main.c:680
> #12 0xb7f1b7b7 in elm_run () at elm_main.c:985
> #13 0x080490ca in elm_main (argc=1, argv=0xbffff2c4) at main.c:130
> #14 0x08049103 in main (argc=1, argv=0xbffff2c4) at main.c:136
> 
> ...
> =============================================================
> 
> What do u think please ?
> 
> The complet code :
> 
> =============================================================
> /**
>   * \file main.c
>   * \brief Programme de tests.
>   * \author YChoucha
>   * \version 0.2
>   * \date 14 août 2010
>   *
>   * Programme qui affhiche des videos avec emotion
>   *
>   */
> 
> #include <Elementary.h>
> #include <Emotion.h>
> #include "lectureFichier.h"
> 
> /**
>   * \fn win_del(void *data, Evas_Object *obj, void *event_info)
>   * \brief Fonction qui permet de fermer le programme en appuynat sur la 
> croix de la fenetre
>   *
>   * \param data Chaîne à stocker dans l'objet Str_t, ne peut être NULL.
>   *           *obj
>   *         event_info
>   */
> static void
> win_del(void *data, Evas_Object *obj, void *event_info) {
>      elm_exit();
> }
> 
> static void
> played(void *data, Evas_Object *obj, void *event_info) {
> 
>      Evas_Object * ov = data;
> 
>      printf("video stopped!\n");
>      emotion_object_position_set(ov, 0.0);
>      emotion_object_play_set(ov, 0);
> 
>      if (!emotion_object_file_set(ov, "video2.flv"))
>          printf("Chargement de la video failed 2 !\n");
>      else
>          printf("Chargement de la video  Sucess 2 !\n");
> 
>      //emotion_object_play_set(ov, 1);
> }
> 
> EAPI int
> elm_main(int argc, char **argv) {
> 
>      Evas_Object *win, *bg, *bx, *o, *bt;
> 
>      //création d'une fenetre de taille 320 x 300
>      win = elm_win_add(NULL, "E-Info Memoire", ELM_WIN_BASIC);
>      elm_win_title_set(win, "E-Info Memoire");
>      evas_object_smart_callback_add(win, "delete,request", win_del, NULL);
> 
>      bg = elm_bg_add(win);
>      evas_object_size_hint_weight_set(bg, 1.0, 1.0);
>      elm_win_resize_object_add(win, bg);
>      evas_object_show(bg);
> 
>      bx = elm_box_add(win);
>      elm_win_resize_object_add(win, bx);
>      evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, 
> EVAS_HINT_EXPAND);
>      evas_object_show(bx);
> 
>      evas_object_resize(win, 480, 800);
> 
>      //~ //On créer l'objet video
>      //~ obj = emotion_object_add(evas_object_evas_get(win));
>      //~ if (!emotion_object_init(obj, "xine"))
>      //~ printf("emotion_object_init Fail\n");
>      //~ emotion_object_vis_set(obj, EMOTION_VIS_NONE);
>      //~ if (!emotion_object_file_set(obj, "video1.flv")) {
>      //~ printf("Chargement de la video Fail\n");
>      //~ }else
>      //~ printf("Chargement de la video Ok\n");
>      //~ emotion_object_play_set(obj, 1);
>      //~ //evas_object_move(obj, 0, 0);
>      //~
>      //~ evas_object_resize(obj, 480, 380);
>      //~ //emotion_object_smooth_scale_set(obj, 1);
>      //~
>      //~
>      //~ // imposible de positionner l'obj video dans elementary
>      //~ //elm_box_pack_end (bx,obj);
>      //~ //elm_box_pack_start (bx,obj);
>      //~ evas_object_show(obj);
> 
> 
>      /* basic video object setup */
> 
>      static Emotion_Vis vis = EMOTION_VIS_NONE;
> 
>      o = emotion_object_add(evas_object_evas_get(win));
>      if (!emotion_object_init(o, "xine"))
>          printf("Chargement module failed !\n");
>      else
>          printf("Chargement module Sucess !\n");
>      emotion_object_vis_set(o, vis);
>      if (!emotion_object_file_set(o, "video1.flv"))
>          printf("Chargement de la video failed !\n");
>      else
>          printf("Chargement de la video  Sucess !\n");
>      emotion_object_play_set(o, 1);
>      evas_object_move(o, 0, 0);
>      evas_object_resize(o, 320, 240);
>      emotion_object_smooth_scale_set(o, 1);
>      evas_object_show(o);
>      /* end basic video setup. all the rest here is just to be fancy */
> 
>      //on ajoute un bouton qui change la video
>      bt = elm_button_add(win);
>      elm_button_label_set(bt, "Change video");
>      elm_box_pack_end(bx, bt);
>      elm_button_autorepeat_set(bt, 1);
>      elm_button_autorepeat_initial_timeout_set(bt, 2.0);
>      elm_button_autorepeat_gap_timeout_set(bt, 0.5);
>      evas_object_show(bt);
> 
>      evas_object_smart_callback_add(bt, "clicked", played, o);
> 
> 
>      //on affiche a l'écran notre programme
>      evas_object_show(win);
> 
>      elm_run();
> 
>      elm_shutdown();
> 
>      return 0;
> }
> ELM_MAIN()
> =============================================================
> 
> 
> 
> Thanks.
> 
> 
> 


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


------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to