Uploaded image for project: 'Swift'
  1. Swift
  2. SR-2417

Crash in IndexPath._unconditionallyBridgeFromObjectiveC in UICollectionView

    XMLWordPrintable

    Details

      Description

      I get the crash in

      func collectionView(_ collectionView: UICollectionView, canFocusItemAt indexPath: IndexPath) -> Bool

      libswiftFoundation.dylib`static Foundation.IndexPath.unconditionallyBridgeFromObjectiveC (Swift.Optional<_ObjC.NSIndexPath>) -> Foundation.IndexPath:
      0x10deeb490 <+0>: pushq %rbp
      0x10deeb491 <+1>: movq %rsp, %rbp
      0x10deeb494 <+4>: pushq %r14
      0x10deeb496 <+6>: pushq %rbx
      0x10deeb497 <+7>: movq %rdi, %rbx
      0x10deeb49a <+10>: testq %rbx, %rbx
      0x10deeb49d <+13>: je 0x10deeb4ba ; <+42>
      0x10deeb49f <+15>: movq %rbx, %rdi
      0x10deeb4a2 <+18>: callq 0x10df181b0 ; function signature specialization <Arg[0] = Owned To Guaranteed, Arg[1] = Dead> of Foundation.IndexPath.init (nsIndexPath : __ObjC.NSIndexPath) -> Foundation.IndexPath
      0x10deeb4a7 <+23>: movq %rax, %r14
      0x10deeb4aa <+26>: movq %rbx, %rdi
      0x10deeb4ad <+29>: callq 0x10df61c1e ; symbol stub for: objc_release
      0x10deeb4b2 <+34>: movq %r14, %rax
      0x10deeb4b5 <+37>: popq %rbx
      0x10deeb4b6 <+38>: popq %r14
      0x10deeb4b8 <+40>: popq %rbp
      0x10deeb4b9 <+41>: retq
      -> 0x10deeb4ba <+42>: ud2
      0x10deeb4bc <+44>: nopl (%rax)

      <redacted>`@objc ViewController.collectionView(UICollectionView, canFocusItemAt : IndexPath) -> Bool:
      0x109e533d0 <+0>: pushq %rbp
      0x109e533d1 <+1>: movq %rsp, %rbp
      0x109e533d4 <+4>: subq $0x50, %rsp
      0x109e533d8 <+8>: movq %rdi, %rax
      0x109e533db <+11>: movq %rax, %r8
      0x109e533de <+14>: shrq $0x3, %r8
      0x109e533e2 <+18>: movabsq $0x100000000000, %r9 ; imm = 0x100000000000
      0x109e533ec <+28>: orq %r9, %r8
      0x109e533ef <+31>: cmpb $0x0, (%r8)
      0x109e533f3 <+35>: movq %rdi, -0x8(%rbp)
      0x109e533f7 <+39>: movq %rsi, -0x10(%rbp)
      0x109e533fb <+43>: movq %rdx, -0x18(%rbp)
      0x109e533ff <+47>: movq %rcx, -0x20(%rbp)
      0x109e53403 <+51>: movq %rax, -0x28(%rbp)
      0x109e53407 <+55>: je 0x109e53412 ; <+66> at CategoryViewController.swift
      0x109e53409 <+57>: movq -0x28(%rbp), %rdi
      0x109e5340d <+61>: callq 0x109e8e2be ; symbol stub for: __asan_report_load8
      0x109e53412 <+66>: movq 0x51d1f(%rip), %rax ; (void *)0x000000010dbd8cf0: swift_isaMask
      0x109e53419 <+73>: shrq $0x3, %rax
      0x109e5341d <+77>: movabsq $0x100000000000, %rcx ; imm = 0x100000000000
      0x109e53427 <+87>: orq %rcx, %rax
      0x109e5342a <+90>: movq -0x28(%rbp), %rcx
      0x109e5342e <+94>: movq (%rcx), %rdx
      0x109e53431 <+97>: cmpb $0x0, (%rax)
      0x109e53434 <+100>: movq %rdx, -0x30(%rbp)
      0x109e53438 <+104>: je 0x109e53446 ; <+118> at CategoryViewController.swift
      0x109e5343a <+106>: movq 0x51cf7(%rip), %rdi ; (void *)0x000000010dbd8cf0: swift_isaMask
      0x109e53441 <+113>: callq 0x109e8e2be ; symbol stub for: __asan_report_load8
      0x109e53446 <+118>: movq -0x18(%rbp), %rdi
      0x109e5344a <+122>: callq 0x109e8e294 ; symbol stub for: objc_retain
      0x109e5344f <+127>: movq -0x20(%rbp), %rdi
      0x109e53453 <+131>: movq %rax, -0x38(%rbp)
      0x109e53457 <+135>: callq 0x109e8e294 ; symbol stub for: objc_retain
      0x109e5345c <+140>: movq -0x8(%rbp), %rdi
      0x109e53460 <+144>: movq %rax, -0x40(%rbp)
      0x109e53464 <+148>: callq 0x109e8e294 ; symbol stub for: objc_retain
      0x109e53469 <+153>: movq -0x20(%rbp), %rdi
      0x109e5346d <+157>: movq %rax, -0x48(%rbp)
      0x109e53471 <+161>: callq 0x109e8e390 ; symbol stub for: static Foundation.IndexPath.unconditionallyBridgeFromObjectiveC (Swift.Optional<_ObjC.NSIndexPath>) -> Foundation.IndexPath
      0x109e53476 <+166>: movq -0x18(%rbp), %rdi
      0x109e5347a <+170>: movq %rax, %rsi
      0x109e5347d <+173>: movq -0x8(%rbp), %rdx
      0x109e53481 <+177>: callq 0x109e53390 ; <redacted>.ViewController.collectionView (__ObjC.UICollectionView, canFocusItemAt : Foundation.IndexPath) -> Swift.Bool at CategoryViewController.swift:66
      0x109e53486 <+182>: movq -0x8(%rbp), %rdi
      0x109e5348a <+186>: movb %al, -0x49(%rbp)
      0x109e5348d <+189>: callq 0x109e8e28e ; symbol stub for: objc_release
      0x109e53492 <+194>: movb -0x49(%rbp), %al
      0x109e53495 <+197>: movzbl %al, %edi
      0x109e53498 <+200>: callq 0x109e8e396 ; symbol stub for: ObjectiveC._convertBoolToObjCBool (Swift.Bool) -> ObjectiveC.ObjCBool
      0x109e5349d <+205>: andb $0x1, %al
      0x109e5349f <+207>: movzbl %al, %eax
      0x109e534a2 <+210>: addq $0x50, %rsp
      0x109e534a6 <+214>: popq %rbp
      0x109e534a7 <+215>: req

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              JonasBoberg Jonas Boberg
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: