Xcode swift 4 System music player crash

i am trying to play a song by store ID , when i set the Queue and play it its played successfully but the application crashed !

here is how i play it , simple code :


DispatchQueue.main.async { self.applicationMusicPlayer.setQueue(with: [String(track.epf_song_id)]) self.applicationMusicPlayer.prepareToPlay() self.applicationMusicPlayer.play() }


and this is the Errors :



libobjc.A.dylib`objc_object::release:

0x18c6fd7ec <+0>: ldr x8, [x0]

0x18c6fd7f0 <+4>: and x8, x8, #0xffffffff8

-> 0x18c6fd7f4 <+8>: ldrb w8, [x8, #0x20]

0x18c6fd7f8 <+12>: tbz w8, #0x1, 0x18c6fd84c ; <+96>

0x18c6fd7fc <+16>: tbnz x0, #0x3f, 0x18c6fd848 ; <+92>

0x18c6fd800 <+20>: orr x8, xzr, #0x200000000000

0x18c6fd804 <+24>: ldxr x9, [x0]

0x18c6fd808 <+28>: tbz w9, #0x0, 0x18c6fd85c ; <+112>

0x18c6fd80c <+32>: subs x10, x9, x8

0x18c6fd810 <+36>: b.lo 0x18c6fd820 ; <+52>

0x18c6fd814 <+40>: stlxr w9, x10, [x0]

0x18c6fd818 <+44>: cbz w9, 0x18c6fd848 ; <+92>

0x18c6fd81c <+48>: b 0x18c6fd804 ; <+24>

0x18c6fd820 <+52>: tbnz x9, #0x2c, 0x18c6fd868 ; <+124>

0x18c6fd824 <+56>: tbnz x9, #0x2b, 0x18c6fd874 ; <+136>

0x18c6fd828 <+60>: orr x9, x9, #0x80000000000

0x18c6fd82c <+64>: stxr w9, x9, [x0]

0x18c6fd830 <+68>: cbnz w9, 0x18c6fd804 ; <+24>

0x18c6fd834 <+72>: dmb ish

0x18c6fd838 <+76>: adrp x8, 161878

0x18c6fd83c <+80>: add x8, x8, #0x70 ; =0x70

0x18c6fd840 <+84>: ldr x1, [x8]

0x18c6fd844 <+88>: b 0x18c6f4140 ; objc_msgSend

0x18c6fd848 <+92>: ret

0x18c6fd84c <+96>: adrp x8, 161878

0x18c6fd850 <+100>: add x8, x8, #0x48 ; =0x48

0x18c6fd854 <+104>: ldr x1, [x8]

0x18c6fd858 <+108>: b 0x18c6f4140 ; objc_msgSend

0x18c6fd85c <+112>: clrex

0x18c6fd860 <+116>: orr w1, wzr, #0x1

0x18c6fd864 <+120>: b 0x18c6fd558 ; objc_object::sidetable_release(bool)

0x18c6fd868 <+124>: clrex

0x18c6fd86c <+128>: orr w1, wzr, #0x1

0x18c6fd870 <+132>: b 0x18c6ffaf8 ; objc_object::rootRelease_underflow(bool)

0x18c6fd874 <+136>: clrex

0x18c6fd878 <+140>: b 0x18c6ffc84 ; objc_object::overrelease_error()


any idea why ?

The crash you’re seeing indicates some sort of memory management problem (

objc_object::release
is part of the system’s retain/retain memory management system). It’s hard to say what’s causing this without more context. Please run the app outside of Xcode and reproduce the crash. That’ll product a crash report, which you can post here.

For more info on crash reports, see Technote 2151 Understanding and Analyzing iOS Application Crash Reports.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"
Xcode swift 4 System music player crash
 
 
Q