summaryrefslogtreecommitdiff
path: root/legacy/eio/src
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@gmail.com>2010-10-13 05:33:16 +0000
committerGustavo Sverzut Barbieri <barbieri@gmail.com>2010-10-13 05:33:16 +0000
commit83270f5f45d6b90200769900441ae9ad340428c0 (patch)
treef1e2fc9522b16b648ff2822923b2ea39ab328abf /legacy/eio/src
parentd037d75281dba95f4edca35339413f05a460b63f (diff)
seems that the other way was not enough.
I was still reaching uninitialized usage and it does make sense, as the parent thread could be postponed until the new is started, then the scanner/worker thread hits an error (ie: directory permission denied) and it is cancelled before the main thread had time to get the thread attribution (common->thread). I'd like someone to look at it. Probably this is NOT the right way to fix. Likely what we should do is send a "ready! start working" command from the main thread to the worker thread and avoid such thing. ==5848== Conditional jump or move depends on uninitialised value(s) ==5848== at 0x42808CD: ecore_thread_cancel (ecore_thread.c:534) ==5848== by 0x4238558: eio_file_thread_error (eio_single.c:35) ==5848== by 0x42368FC: _eio_file_direct_heavy (eio_file.c:78) ==5848== by 0x42800F3: _ecore_feedback_job (ecore_thread.c:247) ==5848== by 0x4280398: _ecore_thread_worker (ecore_thread.c:317) ==5848== by 0x41FE16AE: start_thread (in /lib/libpthread-2.11.2.so) ==5848== by 0x41F3295D: clone (in /lib/libc-2.11.2.so) ==5848== Uninitialised value was created by a heap allocation ==5848== at 0x400793F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so) ==5848== by 0x4237991: eio_file_direct_ls (eio_file.c:566) ==5848== by 0x8051C81: ephoto_directory_thumb_add (ephoto_directory_thumb.c:131) ==5848== by 0x804D4AB: _ephoto_thumb_dir_icon_get (ephoto_thumb_browser.c:75) ==5848== by 0x405F4C8: _item_realize (elm_gengrid.c:807) ==5848== by 0x405FE77: _item_place (elm_gengrid.c:980) ==5848== by 0x40610F6: _pan_calculate (elm_gengrid.c:1199) ==5848== by 0x418CA38: evas_call_smarts_calculate (evas_object_smart.c:843) ==5848== by 0x41B23B2: evas_render_updates_internal (evas_render.c:971) ==5848== by 0x41B3DA1: evas_render_updates (evas_render.c:1414) ==5848== by 0x42E4550: _ecore_evas_x_render (ecore_evas_x.c:406) ==5848== by 0x42DDD2C: _ecore_evas_idle_enter (ecore_evas.c:47) SVN revision: 53340
Diffstat (limited to 'legacy/eio/src')
-rw-r--r--legacy/eio/src/lib/eio_single.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/legacy/eio/src/lib/eio_single.c b/legacy/eio/src/lib/eio_single.c
index be2a2309b9..c3310778a8 100644
--- a/legacy/eio/src/lib/eio_single.c
+++ b/legacy/eio/src/lib/eio_single.c
@@ -49,6 +49,7 @@ eio_long_file_set(Eio_File *common,
49 common->error_cb = error_cb; 49 common->error_cb = error_cb;
50 common->data = data; 50 common->data = data;
51 common->error = 0; 51 common->error = 0;
52 common->thread = NULL;
52 53
53 /* Be aware that ecore_thread_run could call cancel_cb if something goes wrong. */ 54 /* Be aware that ecore_thread_run could call cancel_cb if something goes wrong. */
54 common->thread = ecore_thread_feedback_run(heavy_cb, 55 common->thread = ecore_thread_feedback_run(heavy_cb,
@@ -73,6 +74,7 @@ eio_file_set(Eio_File *common,
73 common->error_cb = error_cb; 74 common->error_cb = error_cb;
74 common->data = data; 75 common->data = data;
75 common->error = 0; 76 common->error = 0;
77 common->thread = NULL;
76 78
77 /* Be aware that ecore_thread_run could call cancel_cb if something goes wrong. */ 79 /* Be aware that ecore_thread_run could call cancel_cb if something goes wrong. */
78 common->thread = ecore_thread_run(job_cb, end_cb, cancel_cb, common); 80 common->thread = ecore_thread_run(job_cb, end_cb, cancel_cb, common);