Skip to content

DateFormatter crash on Windows #5202

Open
@stevenbrix

Description

@stevenbrix

After updating to a recent swift toolchain, we've noticed a new crash in our app using the following DateFormatter

let formatter = DateFormatter(dateFormat: "yyyy-MM-dd-HH-mm-ss-SSS")
formatter.locale = .init(identifier: "en_US_POSIX")
formatter.calendar = .sharedGregorian
0   Foundation.dll                  0x7ffbe99e85fa      NSTimeZone.default.setter
1   Foundation.dll                  0x7ffbe9940dd0      NSCalendar.gregorianStartDate.getter
2   Foundation.dll                  0x7ffbe99430d9      Calendar._bridgeToObjectiveC
3   Foundation.dll                  0x7ffbe98d7669      DateFormatter.Style.rawValue.getter
4   Foundation.dll                  0x7ffbe98d741b      DateFormatter.init
5   Foundation.dll                  0x7ffbe98ddf48      DateFormatter.string
FAILED_INSTRUCTION_ADDRESS: 
Foundation!Foundation::_cfObject.get+9a [D:\r\_work\swift-build\swift-build\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSTimeZone.swift @ 226]
00007ffe`079885fa ??              ???

FAULTING_SOURCE_LINE:  D:\r\_work\swift-build\swift-build\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSTimeZone.swift

FAULTING_SOURCE_FILE:  D:\r\_work\swift-build\swift-build\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSTimeZone.swift

FAULTING_SOURCE_LINE_NUMBER:  226

FAULTING_SOURCE_CODE:  
No source found for 'D:\r\_work\swift-build\swift-build\SourceCache\swift-corelibs-foundation\Sources\Foundation\NSTimeZone.swift'

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions