Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 696759 Details for
Bug 904302
[abrt] espeak-1.46.02-6.fc18: wave_write: Process /usr/bin/espeak was killed by signal 6 (SIGABRT)
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Proposed fix sent upstream
espeak-1.46.02-add-err-check.patch (text/plain), 6.68 KB, created by
Jaroslav Škarvada
on 2013-02-13 10:48:02 UTC
(
hide
)
Description:
Proposed fix sent upstream
Filename:
MIME Type:
Creator:
Jaroslav Škarvada
Created:
2013-02-13 10:48:02 UTC
Size:
6.68 KB
patch
obsolete
>diff --git a/src/espeak.cpp b/src/espeak.cpp >index aa49195..152b419 100644 >--- a/src/espeak.cpp >+++ b/src/espeak.cpp >@@ -768,7 +768,11 @@ int main (int argc, char **argv) > fclose(f_text); > } > >- espeak_Synchronize(); >+ if (espeak_Synchronize() != EE_OK) >+ { >+ fprintf(stderr,"espeak_Synchronize failed, maybe error when opening output device\n"); >+ exit(4); >+ } > > if(f_phonemes_out != stdout) > fclose(f_phonemes_out); // needed for WinCE >diff --git a/src/speak_lib.cpp b/src/speak_lib.cpp >index 299285b..56cb89d 100644 >--- a/src/speak_lib.cpp >+++ b/src/speak_lib.cpp >@@ -60,6 +60,7 @@ static espeak_AUDIO_OUTPUT my_mode=AUDIO_OUTPUT_SYNCHRONOUS; > static int synchronous_mode = 1; > static int out_samplerate = 0; > static int voice_samplerate = 22050; >+static espeak_ERROR err = EE_OK; > > t_espeak_callback* synth_callback = NULL; > int (* uri_callback)(int, const char *, const char *) = NULL; >@@ -114,7 +115,11 @@ static int dispatch_audio(short* outbuf, int length, espeak_EVENT* event) > sleep(1); > } > out_samplerate = voice_samplerate; >- wave_init(voice_samplerate); >+ if (!wave_init(voice_samplerate)) >+ { >+ err = EE_INTERNAL_ERROR; >+ return -1; >+ } > wave_set_callback_is_output_enabled( fifo_is_command_enabled); > my_audio = wave_open("alsa"); > event_init(); >@@ -167,7 +172,7 @@ static int dispatch_audio(short* outbuf, int length, espeak_EVENT* event) > > SHOW_TIME("LEAVE dispatch_audio\n"); > >- return (a_wave_can_be_played==0); // 1 = stop synthesis >+ return (a_wave_can_be_played==0); // 1 = stop synthesis, -1 = error > } > > >@@ -373,6 +378,7 @@ static int initialise(int control) > int param; > int result; > >+ err = EE_OK; > LoadConfig(); > WavegenInit(22050,0); // 22050 > if((result = LoadPhData()) != 1) >@@ -487,6 +493,8 @@ static espeak_ERROR Synthesize(unsigned int unique_identifier, const void *text, > { > #ifdef USE_ASYNC > finished = create_events((short *)outbuf, length, event_list, a_write_pos); >+ if (finished < 0) >+ return EE_INTERNAL_ERROR; > length = 0; // the wave data are played once. > #endif > } >@@ -516,7 +524,8 @@ static espeak_ERROR Synthesize(unsigned int unique_identifier, const void *text, > #ifdef USE_ASYNC > if (my_mode==AUDIO_OUTPUT_PLAYBACK) > { >- dispatch_audio(NULL, 0, NULL); // TBD: test case >+ if (dispatch_audio(NULL, 0, NULL) < 0) // TBD: test case >+ return err = EE_INTERNAL_ERROR; > } > else > { >@@ -1198,6 +1207,7 @@ ESPEAK_API int espeak_IsPlaying(void) > > ESPEAK_API espeak_ERROR espeak_Synchronize(void) > {//============================================= >+ espeak_ERROR berr = err; > #ifdef USE_ASYNC > SHOW_TIME("espeak_Synchronize > ENTER"); > while (espeak_IsPlaying()) >@@ -1205,8 +1215,9 @@ ESPEAK_API espeak_ERROR espeak_Synchronize(void) > usleep(20000); > } > #endif >+ err = EE_OK; > SHOW_TIME("espeak_Synchronize > LEAVE"); >- return EE_OK; >+ return berr; > } // end of espeak_Synchronize > > >diff --git a/src/wave.cpp b/src/wave.cpp >index bd53f86..133a0f5 100644 >--- a/src/wave.cpp >+++ b/src/wave.cpp >@@ -62,7 +62,7 @@ enum {ONE_BILLION=1000000000}; > static int pulse_running; > > // wave.cpp (this file) >-void wave_port_init(int); >+int wave_port_init(int); > void* wave_port_open(const char* the_api); > size_t wave_port_write(void* theHandler, char* theMono16BitsWaveBuffer, size_t theSize); > int wave_port_close(void* theHandler); >@@ -77,7 +77,7 @@ int wave_port_get_remaining_time(uint32_t sample, uint32_t* time); > > // wave_pulse.cpp > int is_pulse_running(); >-void wave_pulse_init(int); >+int wave_pulse_init(int); > void* wave_pulse_open(const char* the_api); > size_t wave_pulse_write(void* theHandler, char* theMono16BitsWaveBuffer, size_t theSize); > int wave_pulse_close(void* theHandler); >@@ -91,13 +91,13 @@ void* wave_pulse_test_get_write_buffer(); > int wave_pulse_get_remaining_time(uint32_t sample, uint32_t* time); > > // wrappers >-void wave_init(int srate) { >+int wave_init(int srate) { > pulse_running = is_pulse_running(); > > if (pulse_running) >- wave_pulse_init(srate); >+ return wave_pulse_init(srate); > else >- wave_port_init(srate); >+ return wave_port_init(srate); > } > > void* wave_open(const char* the_api) { >@@ -756,7 +756,7 @@ void wave_set_callback_is_output_enabled(t_wave_callback* cb) > //<wave_init > > // TBD: the arg could be "alsa", "oss",... >-void wave_init(int srate) >+int wave_init(int srate) > { > ENTER("wave_init"); > PaError err; >@@ -773,6 +773,7 @@ void wave_init(int srate) > { > SHOW_TIME("wave_init > Failed to initialise the PortAudio sound"); > } >+ return err == paNoError; > } > > //> >@@ -1194,7 +1195,7 @@ void *wave_test_get_write_buffer() > // notdef USE_PORTAUDIO > > >-void wave_init(int srate) {} >+int wave_init(int srate) {} > void* wave_open(const char* the_api) {return (void *)1;} > size_t wave_write(void* theHandler, char* theMono16BitsWaveBuffer, size_t theSize) {return theSize;} > int wave_close(void* theHandler) {return 0;} >diff --git a/src/wave.h b/src/wave.h >index 337c8a1..aac2a8d 100644 >--- a/src/wave.h >+++ b/src/wave.h >@@ -7,7 +7,7 @@ > > extern int option_device_number; > >-extern void wave_init(int samplerate); >+extern int wave_init(int samplerate); > // TBD: the arg could be "alsa", "oss",... > extern void* wave_open(const char* the_api); > >diff --git a/src/wave_pulse.cpp b/src/wave_pulse.cpp >index a5db638..85cab2d 100644 >--- a/src/wave_pulse.cpp >+++ b/src/wave_pulse.cpp >@@ -660,14 +660,14 @@ void wave_set_callback_is_output_enabled(t_wave_callback* cb) > //> > //<wave_init > >-void wave_init(int srate) >+int wave_init(int srate) > { > ENTER("wave_init"); > > stream = NULL; > wave_samplerate = srate; > >- pulse_open(); >+ return pulse_open() == PULSE_OK; > } > > //> >@@ -870,7 +870,7 @@ void *wave_test_get_write_buffer() > // notdef USE_PULSEAUDIO > > >-void wave_init() {} >+int wave_init() {} > void* wave_open(const char* the_api) {return (void *)1;} > size_t wave_write(void* theHandler, char* theMono16BitsWaveBuffer, size_t theSize) {return theSize;} > int wave_close(void* theHandler) {return 0;} >diff --git a/src/wave_sada.cpp b/src/wave_sada.cpp >index 0c93ca0..1fce83a 100644 >--- a/src/wave_sada.cpp >+++ b/src/wave_sada.cpp >@@ -78,7 +78,7 @@ static uint32_t wave_samplerate; > // > //<wave_init > >-void wave_init(int srate) { >+int wave_init(int srate) { > ENTER("wave_init"); > > audio_info_t ainfo; >@@ -104,7 +104,7 @@ void wave_init(int srate) { > SHOW("wave_init() sun_audio_fd: %d\n", sun_audio_fd); > > if (sun_audio_fd < 0) { >- return; >+ return 0; > } > > ioctl(sun_audio_fd, AUDIO_GETINFO, &ainfo); >@@ -117,8 +117,9 @@ void wave_init(int srate) { > if (ioctl(sun_audio_fd, AUDIO_SETINFO, &ainfo) == -1) { > SHOW("wave_init() failed to set audio params: %s\n", strerror(errno)); > close(sun_audio_fd); >- return; >+ return 0; > } >+ return 1 > } > > //>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 904302
:
687794
|
687795
|
687796
|
687797
|
687798
|
687799
|
687800
|
687801
|
687802
|
687803
|
687804
|
696757
| 696759