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

Crash in storeEnumTagSinglePayload

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Medium
    • Resolution: Duplicate
    • Component/s: Compiler
    • Environment:

      Swift 4.1.2

      Description

      In production I have quite a few crashes with varying backtraces, but all crashing at this point:

      swift::metadataimpl::NonFixedValueWitnesses<swift::metadataimpl::NonFixedOpaqueExistentialBox, true>::storeEnumTagSinglePayload(swift::OpaqueValue*, int, unsigned int, swift::TargetMetadata<swift::InProcess> const*) + 20
      

      I cannot reproduce it locally.
      Attached there is the code that seems to be affected (cannot be run by itself). Crashes happen in different UICollectionView delegate/datasource callbacks. All the crashes seem to point to the method WHCollectionViewSectionsModel.sectionModelAtSectionIndex(_ section: Int), even though in different crash reports, some of the methods in between do not show up.

      Example:

      Crashed: com.apple.main-thread
      EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000105174008
      specialized WHCollectionViewSectionsModel.dequeueAndConfigureCell(collectionView:indexPath:)
      0  libswiftCore.dylib             0x10285e734 swift::metadataimpl::NonFixedValueWitnesses<swift::metadataimpl::NonFixedOpaqueExistentialBox, true>::storeEnumTagSinglePayload(swift::OpaqueValue*, int, unsigned int, swift::TargetMetadata<swift::InProcess> const*) + 20
      1  willhaben                      0x1004e2c9c specialized WHCollectionViewSectionsModel.dequeueAndConfigureCell(collectionView:indexPath:) (WHCollectionViewModel.swift:103)
      2  willhaben                      0x100376770 @objc CollectionViewFlowLayoutDataSourceAndDelegate.collectionView(_:cellForItemAt:) (CollectionViewFlowLayoutDataSourceAndDelegate.swift)
      3  UIKit                          0x19a2e44a8 -[UICollectionView _createPreparedCellForItemAtIndexPath:withLayoutAttributes:applyAttributes:isFocused:notify:] + 448
      4  UIKit                          0x199a59b6c -[UICollectionView _updateVisibleCellsNow:] + 3828
      5  UIKit                          0x199a545c0 -[UICollectionView layoutSubviews] + 288
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mikeash Mike Ash
              Reporter:
              fabb Fabian Ehrentraud
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: