[asterisk-bugs] [JIRA] (ASTERISK-27986) Failed Assertion from app_speech_utils

Bill Kervaski (JIRA) noreply at issues.asterisk.org
Wed Jul 25 15:52:54 CDT 2018


     [ https://issues.asterisk.org/jira/browse/ASTERISK-27986?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bill Kervaski updated ASTERISK-27986:
-------------------------------------

        Description: 
This is just to get that patch reviewed and into the next 13 LTS release hopefully.  It appears to be a common issue when using uniMRCP with app_speech_utils.

[Feb  6 10:48:35] ERROR[17692][C-00000021] astobj2.c: FRACK!, Failed assertion bad magic number 0x0 for object 0x31990d8 (0)

Love the BSG reference!

Here is a patch! app_speech_utils.diff attached.

  was:
This is just to get that patch reviewed and into the next 13 LTS release hopefully.  It appears to be a common issue when using uniMRCP with app_speech_utils.

[Feb  6 10:48:35] ERROR[17692][C-00000021] astobj2.c: FRACK!, Failed assertion bad magic number 0x0 for object 0x31990d8 (0)

Love the BSG reference!

I have a patch, will post the diff in reference notes.

    Reference Notes:   (was: --- asterisk-13.11.2\apps\app_speech_utils.c.org	2018-03-21 19:08:57.000000000 -0700
+++ asterisk-13.11.2\apps\app_speech_utils.c	2018-03-21 19:02:25.000000000 -0700
@@ -38,12 +38,13 @@
 #include "asterisk/channel.h"
 #include "asterisk/pbx.h"
 #include "asterisk/module.h"
 #include "asterisk/lock.h"
 #include "asterisk/app.h"
 #include "asterisk/speech.h"
+#include "asterisk/format_cache.h"
 
 /*** DOCUMENTATION
 	<application name="SpeechCreate" language="en_US">
 		<synopsis>
 			Create a Speech Structure.
 		</synopsis>
@@ -543,15 +544,22 @@
 
 /*! \brief SpeechCreate() Dialplan Application */
 static int speech_create(struct ast_channel *chan, const char *data)
 {
 	struct ast_speech *speech = NULL;
 	struct ast_datastore *datastore = NULL;
+	struct ast_format_cap *cap;
 
+	if (!(cap = ast_format_cap_alloc(AST_FORMAT_CAP_FLAG_DEFAULT))) {
+		pbx_builtin_setvar_helper(chan, "ERROR", "1");
+		return 0;
+	}
+	ast_format_cap_append(cap, ast_format_slin, 0);
+
 	/* Request a speech object */
-	speech = ast_speech_new(data, ast_channel_nativeformats(chan));
+	speech = ast_speech_new(data, cap);
 	if (speech == NULL) {
 		/* Not available */
 		pbx_builtin_setvar_helper(chan, "ERROR", "1");
 		return 0;
 	}
 
)

> Failed Assertion from app_speech_utils
> --------------------------------------
>
>                 Key: ASTERISK-27986
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-27986
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Applications/app_speech_utils
>    Affects Versions: 13.22.0
>         Environment: Amazon Linux (CentOS).
>            Reporter: Bill Kervaski
>              Labels: patch
>         Attachments: app_speech_utils.diff
>
>
> This is just to get that patch reviewed and into the next 13 LTS release hopefully.  It appears to be a common issue when using uniMRCP with app_speech_utils.
> [Feb  6 10:48:35] ERROR[17692][C-00000021] astobj2.c: FRACK!, Failed assertion bad magic number 0x0 for object 0x31990d8 (0)
> Love the BSG reference!
> Here is a patch! app_speech_utils.diff attached.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list