Skip to content

[SR-8528] Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'The data couldn’t be read because it isn’t in the correct format.' #3648

Open
@swift-ci

Description

@swift-ci
Previous ID SR-8528
Radar https://bugreport.apple.com/web/?problemID=43234279
Original Reporter eneko (JIRA User)
Type Bug
Environment

Swift 4.1.2, Swift 4.2
macOS 10.13.6

Additional Detail from JIRA
Votes 0
Component/s Foundation
Labels Bug, Codable
Assignee None
Priority Medium

md5: 01f15baed4797624272d6706ec2e24ce

Issue Description:

While using `NSKeyedUnarchiver` with `Codable` I found the swift-only method `

decodeTopLevelDecodable` does not properly catch decoding exceptions, as documented.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions