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 8200895
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T06:36:40+00:00 2026-06-07T06:36:40+00:00

I’ve modified the jukebox example to run on Android, but it segfaults miserably when

  • 0

I’ve modified the jukebox example to run on Android, but it segfaults miserably when trying to call the sp_session_create() function.

Basically – I have a helloworld Android app with a button. When pressed it calls this function, which crashes on sp_session_create():

JNIEXPORT void JNICALL Java_com_holidaystudios_unispot_uniSpot_prepareSpotify() {
    sp_session *sp;
    sp_error err;
    const char *username = NULL;
    const char *password = NULL;

    username = __USERNAME;
    password = __PASSWORD;
    g_listname = __PLAYLIST;

    UNISPOT_DEBUG("prepareSpotify() - 1\n");
    audio_init(&g_audiofifo);
    UNISPOT_DEBUG("prepareSpotify() - 2\n");

    /* Create session */
    spconfig.application_key_size = g_appkey_size;
    UNISPOT_DEBUG("prepareSpotify() - 3 %d, %p, %p (%p)\n", g_appkey_size, &spconfig, &sp, sp_session_create);

    err = sp_session_create(&spconfig, &sp);
    UNISPOT_DEBUG("prepareSpotify() - 4\n");
.
.
.

Here’s the logcat output which shows the segfault:

I/UNISPOT|NDK( 5951): prepareSpotify() - 1
I/UNISPOT|NDK( 5951): prepareSpotify() - 2
I/UNISPOT|NDK( 5951): prepareSpotify() - 3 321, 0x575115ac, 0xbec4052c (0x5b4107b4)
F/libc    ( 5951): Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1)
I/DEBUG   (31750): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG   (31750): Build fingerprint: 'google/yakju/maguro:4.0.4/IMM76I/330937:user/release-keys'
I/DEBUG   (31750): pid: 5951, tid: 5951  >>> com.holidaystudios.unispot <<<
I/DEBUG   (31750): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000000
I/DEBUG   (31750):  r0 0155d708  r1 4006162c  r2 00000000  r3 5b47add8
I/DEBUG   (31750):  r4 0155d708  r5 5b47e740  r6 57508d48  r7 0155d708
I/DEBUG   (31750):  r8 bec40460  r9 bec4052c  10 0155d768  fp 0155d768
I/DEBUG   (31750):  ip 40061474  sp bec40340  lr 5b410a7c  pc 5b4104f4  cpsr 60000010
I/DEBUG   (31750):  d0  00656c6f736e6f63  d1  72616364732f2061
I/DEBUG   (31750):  d2  61726f74532f2f63  d3  7865646e692f6568
I/DEBUG   (31750):  d4  0000000000000000  d5  0000000000000000
I/DEBUG   (31750):  d6  0000000000000000  d7  00f92b8000000000
I/DEBUG   (31750):  d8  0000000000000000  d9  0000000000000000
I/DEBUG   (31750):  d10 0000000000000000  d11 0000000000000000
I/DEBUG   (31750):  d12 0000000000000000  d13 0000000000000000
I/DEBUG   (31750):  d14 0000000000000000  d15 0000000000000000
I/DEBUG   (31750):  d16 416f257010000000  d17 3fe0000000000000
I/DEBUG   (31750):  d18 0000000000000000  d19 3fe5555560000000
I/DEBUG   (31750):  d20 0000000000000000  d21 0000000000000000
I/DEBUG   (31750):  d22 3ff0000000000000  d23 0000000000000000
I/DEBUG   (31750):  d24 0000000000000000  d25 3fe5555560000000
I/DEBUG   (31750):  d26 0000000000000000  d27 3fe5555560000000
I/DEBUG   (31750):  d28 0000000000000000  d29 3ff0000000000000
I/DEBUG   (31750):  d30 3ff0000000000000  d31 be23e4f5df600000
I/DEBUG   (31750):  scr 80000013
I/DEBUG   (31750): 
I/DEBUG   (31750):          #00  pc 0016b4f4  /data/data/com.holidaystudios.unispot/lib/libspotify.so
I/DEBUG   (31750):          #01  lr 5b410a7c  /data/data/com.holidaystudios.unispot/lib/libspotify.so
I/DEBUG   (31750): 
I/DEBUG   (31750): code around pc:
I/DEBUG   (31750): 5b4104d4 e59f50ac e59f30ac e08f5005 e7953003  .P...0...P...0..
I/DEBUG   (31750): 5b4104e4 e5902004 e2833008 e5803000 e1a04000  . ...0...0...@..
I/DEBUG   (31750): 5b4104f4 e5923000 e1a00002 e1a0e00f e593f178  .0..........x...
I/DEBUG   (31750): 5b410504 e5943004 e3530000 0a000005 e3a02000  .0....S...... ..
I/DEBUG   (31750): 5b410514 e1a00003 e5842004 e5933000 e1a0e00f  ..... ...0......
I/DEBUG   (31750): 
I/DEBUG   (31750): code around lr:
I/DEBUG   (31750): 5b410a5c ebfaaa07 e5c7822c e1a00007 ebfffdec  ....,...........
I/DEBUG   (31750): 5b410a6c e3500000 1a000005 e1a00007 ebfffe94  ..P.............
I/DEBUG   (31750): 5b410a7c e1a00007 ebfc951c e3a04002 ea00009d  .........@......
I/DEBUG   (31750): 5b410a8c e1a01006 e4d13001 e5c73064 e3a02080  .....0..d0... ..
I/DEBUG   (31750): 5b410a9c e2870065 ebfaa8ee e3a020c0 e2861081  e........ ......
I/DEBUG   (31750): 
I/DEBUG   (31750): stack:
I/DEBUG   (31750):     bec40300  0155d9c8  [heap]
I/DEBUG   (31750):     bec40304  5b37f080  /data/data/com.holidaystudios.unispot/lib/libspotify.so
I/DEBUG   (31750):     bec40308  0155d708  [heap]
I/DEBUG   (31750):     bec4030c  5b47e740  /data/data/com.holidaystudios.unispot/lib/libspotify.so
I/DEBUG   (31750):     bec40310  57508d48  /data/data/com.holidaystudios.unispot/lib/liblespot.so
I/DEBUG   (31750):     bec40314  5b410230  /data/data/com.holidaystudios.unispot/lib/libspotify.so
I/DEBUG   (31750):     bec40318  00000400  
I/DEBUG   (31750):     bec4031c  bec40460  [stack]
I/DEBUG   (31750):     bec40320  bec4052c  [stack]
I/DEBUG   (31750):     bec40324  0155d768  [heap]
I/DEBUG   (31750):     bec40328  0155d768  [heap]
I/DEBUG   (31750):     bec4032c  5b33f988  /data/data/com.holidaystudios.unispot/lib/libspotify.so
I/DEBUG   (31750):     bec40330  00000000  
I/DEBUG   (31750):     bec40334  00040000  
I/DEBUG   (31750):     bec40338  df0027ad  
I/DEBUG   (31750):     bec4033c  00000000  
I/DEBUG   (31750): #00 bec40340  575115ac  /data/data/com.holidaystudios.unispot/lib/liblespot.so
I/DEBUG   (31750):     bec40344  5b47e740  /data/data/com.holidaystudios.unispot/lib/libspotify.so
I/DEBUG   (31750):     bec40348  57508d48  /data/data/com.holidaystudios.unispot/lib/liblespot.so
I/DEBUG   (31750):     bec4034c  5b410a7c  /data/data/com.holidaystudios.unispot/lib/libspotify.so
I/DEBUG   (31750):     bec40350  00000000  
I/DEBUG   (31750):     bec40354  57e90026  /system/framework/framework.odex
I/DEBUG   (31750):     bec40358  41678018  /dev/ashmem/dalvik-heap (deleted)
I/DEBUG   (31750):     bec4035c  bec404e4  [stack]
I/DEBUG   (31750):     bec40360  00000000  
I/DEBUG   (31750):     bec40364  00010001  
I/DEBUG   (31750):     bec40368  00000000  
I/DEBUG   (31750):     bec4036c  00000000  
I/DEBUG   (31750):     bec40370  416a9ee8  /dev/ashmem/dalvik-heap (deleted)
I/DEBUG   (31750):     bec40374  416a9ee8  /dev/ashmem/dalvik-heap (deleted)
I/DEBUG   (31750):     bec40378  41678018  /dev/ashmem/dalvik-heap (deleted)
I/DEBUG   (31750):     bec4037c  00000024  
I/DEBUG   (31750):     bec40380  01303740  [heap]
I/DEBUG   (31750):     bec40384  408a39b8  
I/BootReceiver(  189): Copying /data/tombstones/tombstone_00 to DropBox (SYSTEM_TOMBSTONE)
I/WindowManager(  189): WIN DEATH: Window{416abe40 com.holidaystudios.unispot/com.holidaystudios.unispot.uniSpot paused=false}
I/ActivityManager(  189): Process com.holidaystudios.unispot (pid 5951) has died.

Any ideas?

  • 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-06-07T06:36:43+00:00Added an answer on June 7, 2026 at 6:36 am

    I finally figured out what the problem is. If your AndroidManifest.xml does not request the INTERNET permission (and possibly WRITE_EXTERNAL_STORAGE) it will crash… Unfortunately libspotify does not perform any checks on creating sockets and will therefore crash… I’d say it’s actually a bug in libspotify… But anyhoo – here’s what you need to add to your AndroidManifest.xml if you are having the same problem as I did:

      <uses-permission android:name="android.permission.INTERNET" />
    

    Possibly also this:

    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
Basically, what I'm trying to create is a page of div tags, each has
I have a French site that I want to parse, but am running into
I want to construct a data frame in an Rcpp function, but when I
I am trying to loop through a bunch of documents I have to put
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I am trying to understand how to use SyndicationItem to display feed which is

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.