-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Open
Description
What did you do?
json["datas"]
What did you expect to happen?
json["datas"]
What actually happened instead?
Crashed: com.apple.main-thread
0 SwiftyJSON 0xc260 specialized Sequence.forEach(_:) + 392 (<compiler-generated>:392)
1 SwiftyJSON 0xb644 unwrap(_:) + 269 (SwiftyJSON.swift:269)
2 SwiftyJSON 0xb578 unwrap(_:) + 265 (SwiftyJSON.swift:265)
3 SwiftyJSON 0xc2c0 specialized Sequence.forEach(_:) + 270 (SwiftyJSON.swift:270)
4 SwiftyJSON 0xb644 unwrap(_:) + 269 (SwiftyJSON.swift:269)
5 SwiftyJSON 0x8cf8 JSON.object.setter + 226 (SwiftyJSON.swift:226)
6 SwiftyJSON 0x19bcc specialized JSON.init(jsonObject:) + 141 (SwiftyJSON.swift:141)
7 SwiftyJSON 0xf8a0 JSON.subscript.getter + 114 (SwiftyJSON.swift:114)
8 SwiftyJSON 0xb27c JSON.subscript.getter + 420 (SwiftyJSON.swift:420)
9 Lanren 0xeee160 closure #1 in PrimitiveSequence<>.throwServiceError() + 75 (RxSwift+Extension.swift:75)
10 RxSwift 0x744c0 partial apply for thunk for @escaping @callee_guaranteed (@in_guaranteed A.PrimitiveSequenceType.Element) -> (@owned PrimitiveSequence<SingleTrait, A1>, @error @owned Error) + 24
11 RxSwift 0x74464 partial apply for thunk for @escaping @callee_guaranteed (@in_guaranteed A.PrimitiveSequenceType.Element) -> (@owned PrimitiveSequence<SingleTrait, A1>, @error @owned Error) + 12
12 RxSwift 0x4ccbc FlatMapSink.performMap(_:) + 32
13 RxSwift 0x4cc0c FlatMapSink.performMap(_:) + 12
14 RxSwift 0x4c470 MergeSink.on(_:) + 443 (Merge.swift:443)
15 RxSwift 0x4d47c protocol witness for ObserverType.on(_:) in conformance MergeSink<A, B, C> + 20 (<compiler-generated>:20)
16 RxSwift 0x75504 Sink.forwardOn(_:) + 35 (Sink.swift:35)
17 RxSwift 0x29ac4 AnonymousObservableSink.on(_:) + 50 (Create.swift:50)
18 RxSwift 0x29c28 protocol witness for ObserverType.on(_:) in conformance AnonymousObservableSink<A> + 20 (<compiler-generated>:20)
19 RxSwift 0x6774 partial apply for implicit closure #2 in implicit closure #1 in AnyObserver.init<A>(_:) + 29 (AnyObserver.swift:29)
20 RxSwift 0x6230 AnyObserver.on(_:) + 37 (AnyObserver.swift:37)
21 RxSwift 0x729e8 closure #1 in closure #1 in static PrimitiveSequenceType<>.create(subscribe:) + 35 (Single.swift:35)
22 Moya 0x16420 partial apply for thunk for @escaping @callee_guaranteed (@in_guaranteed Result<Response, Error>) -> () + 56 (<compiler-generated>:56)
23 Moya 0x15a1c closure #1 in closure #1 in Reactive<A>.request(_:callbackQueue:) + 26 (MoyaProvider+Rx.swift:26)
24 Moya 0x10960 closure #1 in MoyaProvider.requestNormal(_:callbackQueue:progress:completion:) + 30 (MoyaProvider+Internal.swift:30)
25 Moya 0x112cc closure #1 in closure #2 in MoyaProvider.requestNormal(_:callbackQueue:progress:completion:) + 66 (MoyaProvider+Internal.swift:66)
26 Moya 0x13fc4 closure #2 in MoyaProvider.sendAlamofireRequest<A>(_:target:callbackQueue:progress:completion:) + 287 (MoyaProvider+Internal.swift:287)
27 Moya 0x1504c partial apply for closure #2 in MoyaProvider.sendAlamofireRequest<A>(_:target:callbackQueue:progress:completion:) + 120 (<compiler-generated>:120)
28 Moya 0xc9a0 closure #1 in DataRequest.response(callbackQueue:completionHandler:) + 344
29 Moya 0xd298 partial apply for closure #2 in DataRequest.response(callbackQueue:completionHandler:) + 16 (<compiler-generated>:16)
30 Alamofire 0xb1424 partial apply for specialized closure #2 in closure #2 in closure #3 in closure #1 in DownloadRequest._response<A>(queue:responseSerializer:completionHandler:) + 48
31 Alamofire 0x45988 thunk for @escaping @callee_guaranteed @Sendable () -> () + 28 (<compiler-generated>:28)
32 libdispatch.dylib 0x1e68 _dispatch_call_block_and_release + 32
33 libdispatch.dylib 0x3a2c _dispatch_client_callout + 20
34 libdispatch.dylib 0x11f48 _dispatch_main_queue_drain + 928
35 libdispatch.dylib 0x11b98 _dispatch_main_queue_callback_4CF + 44
36 CoreFoundation 0x522f0 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
37 CoreFoundation 0xc1f4 __CFRunLoopRun + 2532
38 CoreFoundation 0x1f6b8 CFRunLoopRunSpecific + 600
39 GraphicsServices 0x1374 GSEventRunModal + 164
40 UIKitCore 0x513e88 -[UIApplication _run] + 1100
41 UIKitCore 0x2955ec UIApplicationMain + 364
42 libswiftUIKit.dylib 0x30ecc UIApplicationMain(_:_:_:_:) + 104
43 Lanren 0xb3750 main + 4364007248 (AppDelegate.swift:4364007248)
44 ??? 0x106851ce4 (缺少)
Environment
List the software versions you're using:
- SwiftyJSON: 5.0.0
- Xcode Version: *15 * (Open Xcode; In menubar: Xcode > About Xcode)
- Swift Version: 5.9 (Open Xcode Preferences; Components > Toolchains. If none, use
Xcode Default.)
Please also mention which package manager you used and its version. Delete the
other package managers in this list:
- Cocoapods: 1.13.0 (Use
pod --versionin Terminal) - Carthage: ?.? (Use
carthage versionin Terminal) - Swift Package Manager ?.?.? (swiftpm-???) (Use
swift build --versionin Terminal)
Project that demonstrates the issue
Please link to a project we can download that reproduces the issue. Feel free
to delete this section if it's not relevant to the issue (eg - feature request).
The project should be short, self-contained, and correct example.
Metadata
Metadata
Assignees
Labels
No labels