Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6471327
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:12:42+00:00 2026-05-25T06:12:42+00:00

I am trying to natively buffer audio retrieved from the OpenSL ES API. To

  • 0

I am trying to natively buffer audio retrieved from the OpenSL ES API.
To do this, I implemented a simple Queue in my C file, which holds the buffered data.
I then use a native pthread to pass the buffered data to the Java layer, if there is enough buffered data (minimum of 3 buffered audio frames, 1 frame = 30 ms audio).

However, while the native thread is waiting on data from the OpenSL ES API, I get a SIGSEGV error message, with the native stacktrace. However, I can’t see where the error occurred, as the stacktrace is incredibly useless…. This is because the program counter is not displayed, only the registers.

08-30 14:09:51.148: INFO/DEBUG(21802): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
08-30 14:09:51.148: INFO/DEBUG(21802): Build fingerprint: 'samsung/GT-I9000/GT-I9000:2.3.2/GINGERBREAD/XWJV1:user/release-keys'
08-30 14:09:51.148: INFO/DEBUG(21802): pid: 21803, tid: 21811  >>> w�� <<<
08-30 14:09:51.148: INFO/DEBUG(21802): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr fffc0000
08-30 14:09:51.148: INFO/DEBUG(21802):  r0 405329c0  r1 fffc0000  r2 000001a0  r3 00000000
08-30 14:09:51.148: INFO/DEBUG(21802):  r4 405329c0  r5 00000000  r6 002b5688  r7 000001e0
08-30 14:09:51.148: INFO/DEBUG(21802):  r8 84b00dc5  r9 00000000  10 00100000  fp 00000001
08-30 14:09:51.148: INFO/DEBUG(21802):  ip 822a5684  sp 46e6dea0  lr 8224b657  pc 8010dde8  cpsr 20000010
08-30 14:09:51.148: INFO/DEBUG(21802):  d0  697320657565757a  d1  6974696c69747565
08-30 14:09:51.148: INFO/DEBUG(21802):  d2  6f696475412f733a  d3  6f737365636f7220
08-30 14:09:51.148: INFO/DEBUG(21802):  d4  006c006c00690068  d5  006100650074002e
08-30 14:09:51.148: INFO/DEBUG(21802):  d6  006e0069006c006d  d7  00730075002e006b
08-30 14:09:51.148: INFO/DEBUG(21802):  d8  0000000000000000  d9  0000000000000000
08-30 14:09:51.148: INFO/DEBUG(21802):  d10 0000000000000000  d11 0000000000000000
08-30 14:09:51.148: INFO/DEBUG(21802):  d12 0000000000000000  d13 0000000000000000
08-30 14:09:51.148: INFO/DEBUG(21802):  d14 0000000000000000  d15 0000000000000000
08-30 14:09:51.148: INFO/DEBUG(21802):  d16 000000004052e0f8  d17 0000000000000000
08-30 14:09:51.148: INFO/DEBUG(21802):  d18 0000000000000000  d19 0000000000000000
08-30 14:09:51.148: INFO/DEBUG(21802):  d20 3fe0000000000000  d21 8000000000000000
08-30 14:09:51.148: INFO/DEBUG(21802):  d22 0000000000000000  d23 0000000000000000
08-30 14:09:51.148: INFO/DEBUG(21802):  d24 0000000000000000  d25 3ff0000000000000
08-30 14:09:51.148: INFO/DEBUG(21802):  d26 0000000000000000  d27 3ff0000000000000
08-30 14:09:51.148: INFO/DEBUG(21802):  d28 0000000000000000  d29 4000000000000000
08-30 14:09:51.148: INFO/DEBUG(21802):  d30 0000000000000000  d31 3fe0000000000000
08-30 14:09:51.148: INFO/DEBUG(21802):  scr 60000012

This is the whole stacktrace… If anybody could point me to where I could start with debugging this error? I know of the addr2line utility provided by the NDK, but without a program counter, I can’t determine where the error occurred…

Update

As per the suggestions given @ http://groups.google.com/group/android-ndk/browse_thread/thread/d7fe50f356f50896#, I’ve been able to further investigate the issue. After using the Addr2Line tool on the libOpenSLES.so and libc.so, I got a hit with libc.so. However, the file in question is one automatically generated by python and is written in Assembly. It is however, a System Call. The file I speak of is fchownat.S:

/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>

    .text
    .type fchownat, #function
    .globl fchownat
    .align 4
    .fnstart

fchownat:
    mov     ip, sp
    .save   {r4, r5, r6, r7}
    stmfd   sp!, {r4, r5, r6, r7}
    ldmfd   ip, {r4, r5, r6}
    ldr     r7, =__NR_fchownat
    swi     #0
    ldmfd   sp!, {r4, r5, r6, r7}
    movs    r0, r0
    bxpl    lr
    b       __set_syscall_errno
    .fnend

Anybody got an idea on why it would crash here? Better yet, could anybody explain what it actually does? From what I found, it is a System Call to change ownership of a file… But I can’t understand that from the code… My Assembly skillz are none to terrible…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T06:12:42+00:00Added an answer on May 25, 2026 at 6:12 am

    This issue apparently was caused by the fact that I didn’t properly synchronize access to the buffer which I use to pass data from the OpenSL ES callback to my own Thread. After properly synchronizing the access, the error disappeared.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to figure out which browsers currently (natively) support the CSS3 layout module
I am trying to write a C++ program which plays real-time processed audio. I
Trying to get my css / C# functions to look like this: body {
Trying to find some simple SQL Server PIVOT examples. Most of the examples that
Trying to keep all the presentation stuff in the xhtml on this project and
Trying to do this sort of thing... WHERE username LIKE '%$str%' ...but using bound
Trying to honor a feature request from our customers, I'd like that my application,
I'm trying to figure out a way to display a simple countdown that displays
ANSWER: There isn't a natively managed equivalent for this method. However, a good example
I'm trying to create a Qt main windows from Java using JNI directly and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.