Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when passed - in parameter list #4022

Closed
1 task done
xrisk opened this issue Oct 30, 2022 · 2 comments · Fixed by #4032
Closed
1 task done

Crash when passed - in parameter list #4022

xrisk opened this issue Oct 30, 2022 · 2 comments · Fixed by #4032

Comments

@xrisk
Copy link

xrisk commented Oct 30, 2022

System and IINA version:

  • macOS 13.0
  • IINA 1.3.0

Expected behavior:

iina - does not cause crash. If possible, it should try to read input from stdin (equivalent to —stdin flag) for parity with mpv and vlc. At the very least, it should not cause a crash.

Actual behavior:

Causes crash.

Crash report:
{"app_name":"IINA","timestamp":"2022-10-30 20:12:00.00 +0530","app_version":"1.3.0","slice_uuid":"f7a5a99b-6f8a-3f45-b5a3-47523f809c97","build_version":"132","platform":1,"bundleID":"com.colliderli.iina","share_with_app_devs":1,"is_first_party":0,"bug_type":"309","os_version":"macOS 13.0 (22A380)","roots_installed":0,"name":"IINA","incident_id":"1C2219BA-428C-4644-8BC2-2680DB98D75F"}
{
  "uptime" : 64000,
  "procRole" : "Background",
  "version" : 2,
  "userID" : 501,
  "deployVersion" : 210,
  "modelCode" : "MacBookPro18,3",
  "coalitionID" : 1230,
  "osVersion" : {
    "train" : "macOS 13.0",
    "build" : "22A380",
    "releaseType" : "User"
  },
  "captureTime" : "2022-10-30 20:12:00.6265 +0530",
  "incident" : "1C2219BA-428C-4644-8BC2-2680DB98D75F",
  "pid" : 31725,
  "translated" : false,
  "cpuType" : "ARM-64",
  "roots_installed" : 0,
  "bug_type" : "309",
  "procLaunch" : "2022-10-30 20:12:00.5286 +0530",
  "procStartAbsTime" : 1539299812096,
  "procExitAbsTime" : 1539302116005,
  "procName" : "IINA",
  "procPath" : "\/Applications\/IINA.app\/Contents\/MacOS\/IINA",
  "bundleInfo" : {"CFBundleShortVersionString":"1.3.0","CFBundleVersion":"132","CFBundleIdentifier":"com.colliderli.iina"},
  "storeInfo" : {"deviceIdentifierForVendor":"6F45AADE-299B-5292-AF09-76C91C812612","thirdParty":true},
  "parentProc" : "launchd",
  "parentPid" : 1,
  "coalitionName" : "com.googlecode.iterm2",
  "crashReporterKey" : "497F6B5A-4B61-65F9-21D2-094723DFD7AF",
  "responsiblePid" : 1125,
  "responsibleProc" : "iTerm2",
  "wakeTime" : 1173,
  "sleepWakeUUID" : "E6A368D5-F310-455F-A174-D30E09C5A9FF",
  "sip" : "enabled",
  "exception" : {"codes":"0x0000000000000001, 0x0000000102878d08","rawCodes":[1,4337405192],"type":"EXC_BREAKPOINT","signal":"SIGTRAP"},
  "termination" : {"flags":0,"code":5,"namespace":"SIGNAL","indicator":"Trace\/BPT trap: 5","byProc":"exc handler","byPid":31725},
  "os_fault" : {"process":"IINA"},
  "extMods" : {"caller":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"system":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"targeted":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"warnings":0},
  "faultingThread" : 0,
  "threads" : [{"triggered":true,"id":795912,"threadState":{"x":[{"value":65543},{"value":1},{"value":0},{"value":1634625897},{"value":16429131440647569408},{"value":1},{"value":93},{"value":0},{"value":1},{"value":45},{"value":4},{"value":16140901064495857664},{"value":45},{"value":6130197265},{"value":0},{"value":4081219662},{"value":7019094228,"symbolLocation":0,"symbol":"String.index(after:)"},{"value":1935671296},{"value":0},{"value":45},{"value":16212958658533785600},{"value":16212958658533785600},{"value":2},{"value":8326967448,"symbolLocation":0,"symbol":"_swiftEmptyArrayStorage"},{"value":105553125138232},{"value":1},{"value":1},{"value":2},{"value":1}],"flavor":"ARM_THREAD_STATE64","lr":{"value":15091421618167580228},"cpsr":{"value":1610616832},"fp":{"value":6130197744},"sp":{"value":6130197328},"esr":{"value":4060086273,"description":"(Breakpoint) brk 1"},"pc":{"value":4337405192,"matchesCrashFrame":1},"far":{"value":5612073200}},"queue":"com.apple.main-thread","frames":[{"imageOffset":724232,"symbol":"AppDelegate.applicationWillFinishLaunching(_:)","symbolLocation":4408,"imageIndex":0},{"imageOffset":722500,"symbol":"AppDelegate.applicationWillFinishLaunching(_:)","symbolLocation":2676,"imageIndex":0},{"imageOffset":730688,"symbol":"@objc AppDelegate.applicationWillFinishLaunching(_:)","symbolLocation":120,"imageIndex":0},{"imageOffset":484748,"symbol":"__CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__","symbolLocation":148,"imageIndex":1},{"imageOffset":1130612,"symbol":"___CFXRegistrationPost_block_invoke","symbolLocation":88,"imageIndex":1},{"imageOffset":1130428,"symbol":"_CFXRegistrationPost","symbolLocation":440,"imageIndex":1},{"imageOffset":293804,"symbol":"_CFXNotificationPost","symbolLocation":708,"imageIndex":1},{"imageOffset":38700,"symbol":"-[NSNotificationCenter postNotificationName:object:userInfo:]","symbolLocation":88,"imageIndex":2},{"imageOffset":183856,"symbol":"-[NSApplication finishLaunching]","symbolLocation":248,"imageIndex":3},{"imageOffset":183068,"symbol":"-[NSApplication run]","symbolLocation":252,"imageIndex":3},{"imageOffset":16472,"symbol":"NSApplicationMain","symbolLocation":880,"imageIndex":3},{"imageOffset":43840,"symbol":"main","symbolLocation":12,"imageIndex":0},{"imageOffset":24144,"symbol":"start","symbolLocation":2544,"imageIndex":4}]},{"id":795923,"frames":[{"imageOffset":7704,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":5}]},{"id":795924,"frames":[{"imageOffset":7704,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":5}]},{"id":795942,"frames":[{"imageOffset":7704,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":5}]},{"id":795944,"frames":[{"imageOffset":7704,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":5}]}],
  "usedImages" : [
  {
    "source" : "P",
    "arch" : "arm64",
    "base" : 4336680960,
    "CFBundleShortVersionString" : "1.3.0",
    "CFBundleIdentifier" : "com.colliderli.iina",
    "size" : 2326528,
    "uuid" : "f7a5a99b-6f8a-3f45-b5a3-47523f809c97",
    "path" : "\/Applications\/IINA.app\/Contents\/MacOS\/IINA",
    "name" : "IINA",
    "CFBundleVersion" : "132"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6787416064,
    "CFBundleShortVersionString" : "6.9",
    "CFBundleIdentifier" : "com.apple.CoreFoundation",
    "size" : 5079040,
    "uuid" : "f4ff83fc-e62c-30b4-b3a9-876c8a1fd595",
    "path" : "\/System\/Library\/Frameworks\/CoreFoundation.framework\/Versions\/A\/CoreFoundation",
    "name" : "CoreFoundation",
    "CFBundleVersion" : "1953.1"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6803320832,
    "CFBundleShortVersionString" : "6.9",
    "CFBundleIdentifier" : "com.apple.Foundation",
    "size" : 10719232,
    "uuid" : "52b2f83f-586d-32a2-8b66-ce651400ac8c",
    "path" : "\/System\/Library\/Frameworks\/Foundation.framework\/Versions\/C\/Foundation",
    "name" : "Foundation",
    "CFBundleVersion" : "1953.1"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6840496128,
    "CFBundleShortVersionString" : "6.9",
    "CFBundleIdentifier" : "com.apple.AppKit",
    "size" : 15761408,
    "uuid" : "af9f6891-70ad-3c26-af08-b747344892d2",
    "path" : "\/System\/Library\/Frameworks\/AppKit.framework\/Versions\/C\/AppKit",
    "name" : "AppKit",
    "CFBundleVersion" : "2299"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6783688704,
    "size" : 566448,
    "uuid" : "1f56ab4e-f398-3a9c-bfba-fbbd17808963",
    "path" : "\/usr\/lib\/dyld",
    "name" : "dyld"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6787002368,
    "size" : 53244,
    "uuid" : "886caca0-5762-3640-8db2-3fa3b911c062",
    "path" : "\/usr\/lib\/system\/libsystem_pthread.dylib",
    "name" : "libsystem_pthread.dylib"
  }
],
  "sharedCache" : {
  "base" : 6783041536,
  "size" : 3403612160,
  "uuid" : "5667eb2d-1398-3b38-afff-a929572d4b88"
},
  "vmSummary" : "ReadOnly portion of Libraries: Total=1.2G resident=0K(0%) swapped_out_or_unallocated=1.2G(100%)\nWritable regions: Total=1.1G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=1.1G(100%)\n\n                                VIRTUAL   REGION \nREGION TYPE                        SIZE    COUNT (non-coalesced) \n===========                     =======  ======= \nActivity Tracing                   256K        1 \nColorSync                          528K       24 \nCoreGraphics                        16K        1 \nKernel Alloc Once                   32K        1 \nMALLOC                           201.3M       31 \nMALLOC guard page                  192K       10 \nMALLOC_MEDIUM (reserved)         480.0M        4         reserved VM address space (unallocated)\nMALLOC_NANO (reserved)           384.0M        1         reserved VM address space (unallocated)\nSTACK GUARD                       56.1M        5 \nStack                             10.1M        5 \nVM_ALLOCATE                         32K        2 \n__AUTH                             954K      241 \n__AUTH_CONST                      17.8M      437 \n__CTF                               756        1 \n__DATA                            16.3M      492 \n__DATA_CONST                      21.0M      502 \n__DATA_DIRTY                      1128K      152 \n__FONT_DATA                        2352        1 \n__LINKEDIT                       772.2M       64 \n__OBJC_CONST                      2218K      200 \n__OBJC_RO                         65.1M        1 \n__OBJC_RW                         1981K        1 \n__TEXT                           422.3M      523 \ndyld private memory                256K        1 \nmapped file                      152.0M       11 \nshared memory                      848K       13 \n===========                     =======  ======= \nTOTAL                              2.5G     2725 \nTOTAL, minus reserved VM space     1.7G     2725 \n",
  "legacyInfo" : {
  "threadTriggered" : {
    "queue" : "com.apple.main-thread"
  }
},
  "trialInfo" : {
  "rollouts" : [
    {
      "rolloutId" : "6112e3d2fc54bc3389840661",
      "factorPackIds" : {
        "SIRI_TEXT_TO_SPEECH" : "635966b0892de80b72cc9d46"
      },
      "deploymentId" : 240000212
    },
    {
      "rolloutId" : "60356660bbe37970735c5624",
      "factorPackIds" : {

      },
      "deploymentId" : 240000027
    }
  ],
  "experiments" : [

  ]
}
}

Steps to reproduce:

  1. Run iina -
  • MPV does not have this problem.

How often does this happen?

Always

@low-batt
Copy link
Contributor

Crash due to string index out of bounds in AppDelegate.applicationWillFinishLaunching :

if arg.first == "-" {
  if arg[arg.index(after: arg.startIndex)] == "-" {

@low-batt
Copy link
Contributor

IINA 1.3.2 contains the fix for this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants