Fix segfault in libisofs

This commit is contained in:
Jaime Thomas 2008-04-08 01:45:30 +00:00
parent 466d3ef582
commit f0ca6d13e9
5 changed files with 9 additions and 23 deletions

View File

@ -1,19 +1,3 @@
CD Burner CD Burner
INFO++; INFO++;
Crashes:
burn_disc_free, 184 --> no bt for now
libiso_msgs_submit, 333 (libisofs problem?)
Backtrace
------------
#0 libiso_msgs_submit (m=0x0, origin=1048576, error_code=2,
severity=268435456, priority=0,
msg_text=0xb74c3b8c "Starting image writing...", os_errno=0, flag=0)
at libisofs/libiso_msgs.c:329
#1 0xb7f08ba0 in iso_msg_debug (imgid=1048576,
fmt=0xb7f19697 "Starting image writing...") at libisofs/messages.c:96
#2 0xb7f0de93 in write_function (arg=0x8079b80) at libisofs/ecma119.c:766
#3 0xb7864125 in start_thread () from /lib/libpthread.so.0
#4 0xb774ca0e in clone () from /lib/libc.so.6

View File

@ -89,6 +89,7 @@ ecdb_setup(void)
ECDB_DRIVE_ACTION_FINISHED = ecore_event_type_new(); ECDB_DRIVE_ACTION_FINISHED = ecore_event_type_new();
ECDB_DRIVE_ACTION_BEGUN = ecore_event_type_new(); ECDB_DRIVE_ACTION_BEGUN = ecore_event_type_new();
ECDB_DRIVE_ACTION_UPDATE = ecore_event_type_new(); ECDB_DRIVE_ACTION_UPDATE = ecore_event_type_new();
ecdb_image_init();
ecore_event_handler_add(ECORE_EVENT_SIGNAL_EXIT, ecdb_shutdown, ecore_event_handler_add(ECORE_EVENT_SIGNAL_EXIT, ecdb_shutdown,
NULL); NULL);

View File

@ -179,8 +179,6 @@ ecdb_burn_finished(void *data, int type, void *event)
printf("Freeing session and disc\n"); printf("Freeing session and disc\n");
burn_session_free(proj->session); burn_session_free(proj->session);
/* Crashes on this line... */
burn_disc_free(proj->disc); burn_disc_free(proj->disc);
printf("Releasing drive\n"); printf("Releasing drive\n");

View File

@ -30,8 +30,6 @@ ecdb_image_project(Ecdb_Project *proj)
} }
} }
ecdb_image_init();
ret = iso_image_new(proj->volume_id, &image); ret = iso_image_new(proj->volume_id, &image);
if (!ret) if (!ret)
@ -110,15 +108,17 @@ ecdb_image_project(Ecdb_Project *proj)
iso_image_create_burn_source(image, opts, &data_src); iso_image_create_burn_source(image, opts, &data_src);
iso_write_opts_free(opts); iso_write_opts_free(opts);
/* unref here? not sure from docs */
iso_image_unref(image); iso_image_unref(image);
FIFO_CREATE: FIFO_CREATE:
fifo_src = burn_fifo_source_new(data_src, fifo_src = burn_fifo_source_new(data_src,
proj->fifo_chunksize, proj->fifo_chunks, 0); proj->fifo_chunksize, proj->fifo_chunks, 0);
burn_source_free(data_src); burn_source_free(data_src);
iso_finish();
/* I can't call this now, as it destroys the libiso_msgr before the
* library is finished - I'll just init and finish once...
*/
//iso_finish();
efreet_mime_shutdown(); efreet_mime_shutdown();
return fifo_src; return fifo_src;

View File

@ -13,6 +13,9 @@ ecdb_project_new(void)
proj->burn_mode = BURN_MODE1; proj->burn_mode = BURN_MODE1;
proj->fifo_chunksize = 2048; proj->fifo_chunksize = 2048;
proj->fifo_chunks = 2048; proj->fifo_chunks = 2048;
proj->underrun_proof = TRUE;
proj->opc = TRUE;
proj->multi = TRUE;
return proj; return proj;
} }