VLCKit 4.0.0a5 crash reason: '-[VLCMediaPlayer handleEvent:]: unrecognized selector sent to instance

iOS, iPad, iPhone, tvOS specific usage questions
arsalan99
New Cone
New Cone
Posts: 7
Joined: 19 Aug 2024 19:31

VLCKit 4.0.0a5 crash reason: '-[VLCMediaPlayer handleEvent:]: unrecognized selector sent to instance

Postby arsalan99 » 23 Aug 2024 19:28

Hello,

I was using 4.0.0a1, and then I have updated sdk to 4.0.0a5.
Do I need to do any code changes with migration to 4.0.0a5
App crashed after a second after this code:

Code: Select all

let media = VLCMedia(url: fileURL) self?.mediaPlayer.media = media self?.mediaPlayer.minimalTimePeriod = 1000 self?.mediaPlayer.timeChangeUpdateInterval = 0.1 self?.mediaPlayer.play()
This is what I see in console after the crash:

[0000000128116580] libvlc demux packetizer: AAC channels: 2 samplerate: 44100
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[VLCMediaPlayer handleEvent:]: unrecognized selector sent to instance 0x600003d0d950'
*** First throw call stack:
(
0 CoreFoundation 0x000000018048d8a8 __exceptionPreprocess + 172
1 libobjc.A.dylib 0x000000018008409c objc_exception_throw + 56
2 CoreFoundation 0x00000001804a26f8 +[NSObject(NSObject) instanceMethodSignatureForSelector:] + 0
3 CoreFoundation 0x00000001804919f8 ___forwarding___ + 1280
4 CoreFoundation 0x0000000180493d1c _CF_forwarding_prep_0 + 92
5 VLCKit 0x000000010ba7f228 HandleWatchTimeUpdate + 208
6 VLCKit 0x000000010bfff194 player_timer_on_update + 152
7 VLCKit 0x000000010c081e84 vlc_player_SendTimerSourceUpdates + 268
8 VLCKit 0x000000010c080ee0 vlc_player_UpdateTimerBestSource + 400
9 VLCKit 0x000000010c080d04 vlc_player_UpdateTimer + 600
10 VLCKit 0x000000010c07c3a8 input_thread_Events + 1584
11 VLCKit 0x000000010c055f54 input_SendEvent + 84
12 VLCKit 0x000000010c055218 input_SendEventTimes + 112
13 VLCKit 0x000000010c05282c EsOutVaPrivControlLocked + 4128
14 VLCKit 0x000000010c051238 EsOutPrivControl + 80
15 VLCKit 0x000000010c062df0 es_out_in_vaPrivControl + 68
16 VLCKit 0x000000010c0635f4 es_out_in_PrivControl + 80
17 VLCKit 0x000000010c062820 CmdExecutePrivControl + 304
18 VLCKit 0x000000010c06171c PrivControlLocked + 220
19 VLCKit 0x000000010c061454 PrivControl + 88
20 VLCKit 0x000000010c06e2dc es_out_vaPrivControl + 64
21 VLCKit 0x000000010c06e260 es_out_PrivControl + 72
22 VLCKit 0x000000010c06ff8c es_out_SetTimes + 92
23 VLCKit 0x000000010c06b0b8 InputSourceStatistics + 236
24 VLCKit 0x000000010c071314 MainLoopStatistics + 80
25 VLCKit 0x000000010c068388 MainLoop + 992
26 VLCKit 0x000000010c065f44 Run + 96
27 libsystem_pthread.dylib 0x000000010780f414 _pthread_start + 104
28 libsystem_pthread.dylib 0x000000010780a5e0 thread_start + 8
)
libc++abi: terminating due to uncaught exception of type NSException

fkuehne
Developer
Developer
Posts: 7264
Joined: 16 Mar 2004 19:37
VLC version: 0.4.6 - present
Operating System: Darwin
Location: Germany
Contact:

Re: VLCKit 4.0.0a5 crash reason: '-[VLCMediaPlayer handleEvent:]: unrecognized selector sent to instance

Postby fkuehne » 23 Aug 2024 21:51

You should do a breakpoint on objc exceptions to see where the problem is.
VideoLAN
Felix Paul Kühne
Medic. VLC developer for appleOS since before you were born.
Blog: https://www.feepk.net

arsalan99
New Cone
New Cone
Posts: 7
Joined: 19 Aug 2024 19:31

Re: VLCKit 4.0.0a5 crash reason: '-[VLCMediaPlayer handleEvent:]: unrecognized selector sent to instance

Postby arsalan99 » 23 Aug 2024 23:13

I tried this, but it doesn't point me on exact line.
It just shows Thread 26: "-[VLCMediaPlayer handleEvent:]: unrecognized selector sent to instance 0x600003d05ef0"

Maybe an issue with handleEvent func? Can you try on your side?

Image

* thread #23, stop reason = hit Objective-C exception
* frame #0: 0x0000000180084064 libobjc.A.dylib`objc_exception_throw
frame #1: 0x00000001804a26f8 CoreFoundation`-[NSObject(NSObject) doesNotRecognizeSelector:] + 340
frame #2: 0x00000001804919f8 CoreFoundation`___forwarding___ + 1280
frame #3: 0x0000000180493d1c CoreFoundation`_CF_forwarding_prep_0 + 92
frame #4: 0x000000010b377228 VLCKit`HandleWatchTimeUpdate(value=0x000000016e986190, opaque=0x0000600003d0ea30) at VLCMediaPlayer.m:124:9
frame #5: 0x000000010b8f7194 VLCKit`player_timer_on_update(point=0x0000000109356f80, data=0x000060000352d080) at media_player.c:2274:5
frame #6: 0x000000010b979e84 VLCKit`vlc_player_SendTimerSourceUpdates(player=0x0000000109356da0, source=0x0000000109356f68, force_update=true, point=0x0000000109356f80) at timer.c:80:13
frame #7: 0x000000010b978ee0 VLCKit`vlc_player_UpdateTimerBestSource(player=0x0000000109356da0, es_source=0x0000000000000000, es_source_is_master=false, point=0x000000016e986528, system_date=18884271623, force_update=true) at timer.c:390:17
frame #8: 0x000000010b978d04 VLCKit`vlc_player_UpdateTimer(player=0x0000000109356da0, es_source=0x0000000000000000, es_source_is_master=false, point=0x000000016e986528, normal_time=1, frame_rate=0, frame_rate_base=0) at timer.c:481:9
frame #9: 0x000000010b9743a8 VLCKit`input_thread_Events(input_thread=0x0000000112816400, event=0x000000016e986660, user_data=0x0000000109c28010) at input.c:956:17
frame #10: 0x000000010b94df54 VLCKit`input_SendEvent(p_input=0x0000000112816400, event=0x000000016e986660) at event.h:35:9
frame #11: 0x000000010b94d218 VLCKit`input_SendEventTimes(p_input=0x0000000112816400, f_position=0.025305068826446758, i_time=205425, i_normal_time=1, i_length=10330641) at event.h:62:5
frame #12: 0x000000010b94a82c VLCKit`EsOutVaPrivControlLocked(p_sys=0x0000000109c08bb0, source=0x0000600002c82c80, query=65552, args="\U00000010") at es_out.c:3873:9
frame #13: 0x000000010b949238 VLCKit`EsOutPrivControl(out=0x0000000109c08d40, source=0x0000000000000000, query=65552, args="\x85\n^\x9b\xac\xd1\xc2?IR\U00000016") at es_out.c:3987:15
frame #14: 0x000000010b95adf0 VLCKit`es_out_in_vaPrivControl(out=0x0000000109c08d40, in=0x0000000000000000, i_query=65552, args="\x85\n^\x9b\xac\xd1\xc2?IR\U00000016") at es_out_timeshift.c:478:12
frame #15: 0x000000010b95b5f4 VLCKit`es_out_in_PrivControl(p_out=0x0000000109c08d40, in=0x0000000000000000, i_query=65552) at es_out_timeshift.c:489:16
frame #16: 0x000000010b95a820 VLCKit`CmdExecutePrivControl(p_sys=0x0000600002975730, p_cmd=0x000000016e986c4b) at es_out_timeshift.c:1894:16
frame #17: 0x000000010b95971c VLCKit`PrivControlLocked(p_tsout=0x0000600002975788, in=0x0000000000000000, i_query=65552, args="\x85\n^\x9b\xac\xd1\xc2?IR\U00000016") at es_out_timeshift.c:769:16
frame #18: 0x000000010b959454 VLCKit`PrivControl(p_tsout=0x0000600002975788, in=0x0000000000000000, i_query=65552, args="\x85\n^\x9b\xac\xd1\xc2?IR\U00000016") at es_out_timeshift.c:828:13
frame #19: 0x000000010b9662dc VLCKit`es_out_vaPrivControl(out=0x0000600002975788, query=65552, args="\x85\n^\x9b\xac\xd1\xc2?IR\U00000016") at es_out.h:125:12
frame #20: 0x000000010b966260 VLCKit`es_out_PrivControl(out=0x0000600002975788, query=65552) at es_out.h:133:18
frame #21: 0x000000010b967f8c VLCKit`es_out_SetTimes(out=0x0000600002975788, f_position=0.14702375017448702, i_time=1462857, i_normal_time=1, i_length=10330641) at es_out.h:276:17
frame #22: 0x000000010b9630b8 VLCKit`InputSourceStatistics(source=0x0000600002c82c80, item=0x0000600003b057a0, out=0x0000600002975788) at input.c:599:5
frame #23: 0x000000010b969314 VLCKit`MainLoopStatistics(p_input=0x0000000112816400) at input.c:609:5
frame #24: 0x000000010b960388 VLCKit`MainLoop(p_input=0x0000000112816400, b_interactive=true) at input.c:708:17
frame #25: 0x000000010b95df44 VLCKit`Run(data=0x0000000112816400) at input.c:420:9
frame #26: 0x000000010710f414 libsystem_pthread.dylib`_pthread_start + 104


fkuehne
Developer
Developer
Posts: 7264
Joined: 16 Mar 2004 19:37
VLC version: 0.4.6 - present
Operating System: Darwin
Location: Germany
Contact:

Re: VLCKit 4.0.0a5 crash reason: '-[VLCMediaPlayer handleEvent:]: unrecognized selector sent to instance

Postby fkuehne » 28 Sep 2024 18:39

We are currently completely reworking the event management in VLCKit v4, so the best is too wait until this is done and the next alpha appears.
VideoLAN
Felix Paul Kühne
Medic. VLC developer for appleOS since before you were born.
Blog: https://www.feepk.net

arsalan99
New Cone
New Cone
Posts: 7
Joined: 19 Aug 2024 19:31

Re: VLCKit 4.0.0a5 crash reason: '-[VLCMediaPlayer handleEvent:]: unrecognized selector sent to instance

Postby arsalan99 » 30 Sep 2024 22:52

Can you please notify me and let me know the version once you will release new alpha, so I can update and test?

Thank you,
Best regards,


Return to “VLC for iOS, iPadOS and Apple TV”

Who is online

Users browsing this forum: No registered users and 7 guests