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

[SR-11966] URLSession crashes when downloading a file through a custom URLProtocol that doesn't not set temporaryFileURL #3367

Open
hartbit opened this issue Dec 18, 2019 · 1 comment

Comments

@hartbit
Copy link
Collaborator

hartbit commented Dec 18, 2019

Previous ID SR-11966
Radar rdar://problem/58455063
Original Reporter @hartbit
Type Bug
Additional Detail from JIRA
Votes 0
Component/s Foundation
Labels Bug
Assignee None
Priority Medium

md5: 495a72f4070039b867907de2eb63aa84

Issue Description:

Contrary to Darwin Foundation, CLF URLSession crashes when downloading a file through a custom URLProtocol and no temporaryFileURL property is set:

Fatal error: Unexpectedly found nil while unwrapping an Optional value: file /home/buildnode/jenkins/workspace/oss-swift-package-linux-ubuntu-18_04/swift-corelibs-foundation/Foundation/URLSession/URLSessionTask.swift, line 855
Current stack trace:
0    libswiftCore.so                    0x00007f5026d40ec0 swift_reportError + 50
1    libswiftCore.so                    0x00007f5026db2940 _swift_stdlib_reportFatalErrorInFile + 115
2    libswiftCore.so                    0x00007f5026ac5755 <unavailable> + 1382229
3    libswiftCore.so                    0x00007f5026ac5277 <unavailable> + 1380983
4    libswiftCore.so                    0x00007f5026ac4f43 <unavailable> + 1380163
5    libswiftCore.so                    0x00007f5026ac48b0 _assertionFailure(_:_:file:line:flags:) + 525
6    libFoundationNetworking.so         0x00007f5025f670e6 <unavailable> + 1384678
7    libFoundation.so                   0x00007f5025998b8c <unavailable> + 7748492
8    libFoundation.so                   0x00007f50259b11e1 <unavailable> + 7848417
9    libFoundation.so                   0x00007f5025998cdc <unavailable> + 7748828
10   libFoundation.so                   0x00007f50259a2f70 BlockOperation.main() + 1196
11   libFoundation.so                   0x00007f50259aaf10 OperationQueue._execute(_:) + 519
12   libFoundation.so                   0x00007f502599db00 Operation.start() + 2150
13   libFoundation.so                   0x00007f50259a9fd0 OperationQueue._schedule(_:) + 237
14   libFoundation.so                   0x00007f50259ae939 <unavailable> + 7838009
15   libFoundation.so                   0x00007f50255e27a0 <unavailable> + 3856288
16   libdispatch.so                     0x00007f5025009605 <unavailable> + 214533
17   libdispatch.so                     0x00007f5025002e8b <unavailable> + 188043
18   libdispatch.so                     0x00007f5025003b6a <unavailable> + 191338
19   libdispatch.so                     0x00007f502500b993 <unavailable> + 223635
20   libpthread.so.0                    0x00007f502675c6db <unavailable> + 30427
21   libc.so.6                          0x00007f5023e0b850 clone + 63
Exited with signal code 4
@beccadax
Copy link
Contributor

beccadax commented Jan 9, 2020

@swift-ci create

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants