Skip to content

iOS 18.4 crash for a certain picture-in-picture workflow. #9061

@trungmnguyen

Description

@trungmnguyen

Description

The issue relating to the order of toggling full screen of a video and combining with picture-in-picture button. The browser app crashes in a certain workflow.

Reduced test case

https://videojs.com/

Steps to reproduce

I tried the workflow in videojs website:

  1. Open videojs.com > Open the video in full screen > toggle full screen mode > select picture-in-picture mode. (CRASH)
  2. Open videojs.com > Open the video in picture-in-picture mode (OK)
  3. Open videojs.com > Open the video in full screen > select picture-in-picture mode (OK).

Errors

I got this exception from Apple's crash log.

"exception" : {"codes":"0x0000000000000000, 0x0000000000000000","rawCodes":[0,0],"type":"EXC_CRASH","signal":"SIGABRT"},
"termination" : {"flags":0,"code":6,"namespace":"SIGNAL","indicator":"Abort trap: 6","byProc":"MobileSafari","byPid":438},
"asi" : {"libsystem_c.dylib":["abort() called"]},
"exceptionReason" : {"arguments":["-[__NSPlaceholderArray initWithObjects:count:]","0"],"format_string":"*** %s: attempt to insert nil object from objects[%lu]","name":"NSInvalidArgumentException","type":"objc-exception","composed_message":"*** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[0]","class":"NSException"},
"lastExceptionBacktrace" : [{"imageOffset":1155820,"symbol":"__exceptionPreprocess","symbolLocation":164,"imageIndex":8},{"imageOffset":203388,"symbol":"objc_exception_throw","symbolLocation":88,"imageIndex":7},{"imageOffset":101236,"symbol":"-[__NSPlaceholderArray initWithObjects:count:]","symbolLocation":620,"imageIndex":8},{"imageOffset":106232,"symbol":"+[NSArray arrayWithObjects:count:]","symbolLocation":40,"imageIndex":8},{"imageOffset":48379468,"symbol":"WebCore::VideoPresentationInterfaceIOS::setupFullscreen(WebCore::FloatRect const&, WebCore::FloatSize const&, UIView*, unsigned int, bool, bool, bool)","symbolLocation":1164,"imageIndex":9},{"imageOffset":48368916,"symbol":"WebCore::VideoPresentationInterfaceAVKitLegacy::setupFullscreen(WebCore::FloatRect const&, WebCore::FloatSize const&, UIView*, unsigned int, bool, bool, bool)","symbolLocation":152,"imageIndex":9},{"imageOffset":7062688,"symbol":"WebKit::VideoPresentationManagerProxy::setupFullscreenWithID(WTF::ObjectIdentifierGeneric<WebCore::MediaPlayerClientIdentifierType, WTF::ObjectIdentifierMainThreadAccessTraits, unsigned long long>, unsigned int, WebCore::FloatRect const&, WebCore::FloatSize const&, WebCore::FloatSize const&, float, unsigned int, bool, bool, bool)","symbolLocation":604,"imageIndex":10},{"imageOffset":5024824,"symbol":"WebKit::VideoPresentationManagerProxy::didReceiveMessage(IPC::Connection&, IPC::Decoder&)","symbolLocation":1512,"imageIndex":10},{"imageOffset":102800,"symbol":"IPC::MessageReceiverMap::dispatchMessage(IPC::Connection&, IPC::Decoder&)","symbolLocation":236,"imageIndex":10},{"imageOffset":1297112,"symbol":"WebKit::WebProcessProxy::dispatchMessage(IPC::Connection&, IPC::Decoder&)","symbolLocation":40,"imageIndex":10},{"imageOffset":1295176,"symbol":"WebKit::WebProcessProxy::didReceiveMessage(IPC::Connection&, IPC::Decoder&)","symbolLocation":1764,"imageIndex":10},{"imageOffset":92432,"symbol":"IPC::Connection::dispatchMessage(WTF::UniqueRefIPC::Decoder)","symbolLocation":268,"imageIndex":10},{"imageOffset":91408,"symbol":"IPC::Connection::dispatchIncomingMessages()","symbolLocation":716,"imageIndex":10},{"imageOffset":2198540,"symbol":"WTF::RunLoop::performWork()","symbolLocation":524,"imageIndex":11},{"imageOffset":2197984,"symbol":"WTF::RunLoop::performWork(void*)","symbolLocation":36,"imageIndex":11},{"imageOffset":470244,"symbol":"CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION","symbolLocation":28,"imageIndex":8},{"imageOffset":470136,"symbol":"__CFRunLoopDoSource0","symbolLocation":172,"imageIndex":8},{"imageOffset":465504,"symbol":"__CFRunLoopDoSources0","symbolLocation":332,"imageIndex":8},{"imageOffset":461884,"symbol":"__CFRunLoopRun","symbolLocation":840,"imageIndex":8},{"imageOffset":612096,"symbol":"CFRunLoopRunSpecific","symbolLocation":572,"imageIndex":8},{"imageOffset":4496,"symbol":"GSEventRunModal","symbolLocation":168,"imageIndex":12},{"imageOffset":3972564,"symbol":"-[UIApplication _run]","symbolLocation":816,"imageIndex":13},{"imageOffset":3964932,"symbol":"UIApplicationMain","symbolLocation":336,"imageIndex":13},{"imageOffset":297216,"symbol":"MobileSafariUIMain","symbolLocation":1968,"imageIndex":14},{"imageOffset":68312,"symbol":"start","symbolLocation":5964,"imageIndex":15}],
"faultingThread" : 0,

What version of Video.js are you using?

n/a

Video.js plugins used.

No response

What browser(s) including version(s) does this occur with?

n/a

What OS(es) and version(s) does this occur with?

n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs: triageThis issue needs to be reviewed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions