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

Line Chart crashes when upgrading from 3.2.1 to 3.2.2 or greater #4060

Closed
pepejeria opened this issue Jul 4, 2019 · 1 comment
Closed

Line Chart crashes when upgrading from 3.2.1 to 3.2.2 or greater #4060

pepejeria opened this issue Jul 4, 2019 · 1 comment

Comments

@pepejeria
Copy link

pepejeria commented Jul 4, 2019

What did you do?

ℹ Updated Charts library to 3.2.2. Same issue with 3.3.0

What did you expect to happen?

ℹ The app to run as usual

What happened instead?

ℹ App crashed

Charts Environment

Charts version/Branch/Commit Number:
**Xcode version: 10.2.1
**Swift version: 5
**Platform(s) running Charts: iOS

Crash log:

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000001
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Segmentation fault: 11
Termination Reason:    Namespace SIGNAL, Code 0xb
Terminating Process:   exc handler [6022]

VM Regions Near 0x1:
--> 
    __TEXT                 0000000102260000-00000001027dd000 [ 5620K] r-x/rwx SM=COW  /Users/USER/Library/Developer/CoreSimulator/Devices/B66D46B2-802A-4EEE-8B2E-FEFE57F35D2A/data/Containers/Bundle/Application/FB3808AD-94E0-4F76-A4A3-A8B860F076AF/SomeApp.app/SomeApp

Application Specific Information:
CoreSimulator 587.35 - Device: iPhone Xʀ (B66D46B2-802A-4EEE-8B2E-FEFE57F35D2A) - Runtime: iOS 12.2 (16E226) - DeviceType: iPhone Xʀ

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libobjc.A.dylib               	0x0000000108ade927 objc_retain + 7
1   org.cocoapods.Charts          	0x0000000104b1a9c5 ChartLimitLine.lineColor.getter + 101
2   com.someapp.SomeApp.Debug	0x000000010238fd85 RankingChartController.setupLineChartData(for:) + 3653 (RankingChartController.swift:141)
3   com.someapp.SomeApp.Debug	0x000000010238ee31 RankingChartController.setupUserData() + 3585 (RankingChartController.swift:122)
4   com.someapp.SomeApp.Debug	0x000000010238de98 closure #1 in RankingChartController.setupUsers() + 504 (RankingChartController.swift:92)
5   com.someapp.SomeApp.Debug	0x0000000102391b9c partial apply for closure #1 in RankingChartController.setupUsers() + 12
6   com.someapp.SomeApp.Debug	0x0000000102337f8f thunk for @escaping @callee_guaranteed (@guaranteed [User]) -> () + 15
7   com.someapp.SomeApp.Debug	0x0000000102391bf1 partial apply for thunk for @escaping @callee_guaranteed (@guaranteed [User]) -> () + 17
8   org.cocoapods.RxSwift         	0x00000001078db4d7 closure #1 in ObservableType.subscribe(onNext:onError:onCompleted:onDisposed:) + 775 (ObservableType+Extensions.swift:65)
9   org.cocoapods.RxSwift         	0x00000001078db8e7 partial apply for closure #1 in ObservableType.subscribe(onNext:onError:onCompleted:onDisposed:) + 103
10  org.cocoapods.RxSwift         	0x0000000107804b8f AnonymousObserver.onCore(_:) + 95 (AnonymousObserver.swift:22)
11  org.cocoapods.RxSwift         	0x00000001078e38be ObserverBase.on(_:) + 254 (ObserverBase.swift:17)
12  org.cocoapods.RxSwift         	0x00000001078e3b95 protocol witness for ObserverType.on(_:) in conformance ObserverBase<A> + 21
13  org.cocoapods.RxSwift         	0x0000000107806363 partial apply + 83
14  org.cocoapods.RxSwift         	0x000000010780e86c thunk for @escaping @callee_guaranteed (@in_guaranteed Event<A>) -> () + 12
15  org.cocoapods.RxSwift         	0x000000010792d976 thunk for @escaping @callee_guaranteed (@in_guaranteed Event<A>) -> ()partial apply + 54
16  org.cocoapods.RxSwift         	0x000000010780ee5c thunk for @escaping @callee_guaranteed (@in_guaranteed Event<A>) -> (@out ()) + 12
17  org.cocoapods.RxSwift         	0x00000001078114c0 thunk for @escaping @callee_guaranteed (@in_guaranteed Event<A>) -> (@out ())partial apply + 32
18  org.cocoapods.RxSwift         	0x0000000107810bee dispatch<A>(_:_:) + 606 (Bag+Rx.swift:14)
19  org.cocoapods.RxSwift         	0x0000000107927fca ShareReplay1WhileConnectedConnection.on(_:) + 138 (ShareReplayScope.swift:187)
20  org.cocoapods.RxSwift         	0x00000001079299c0 protocol witness for ObserverType.on(_:) in conformance ShareReplay1WhileConnectedConnection<A> + 16
21  org.cocoapods.RxSwift         	0x00000001078e114e closure #1 in ObserveOnSerialDispatchQueueSink.init(scheduler:observer:cancel:) + 782 (ObserveOn.swift:186)
22  org.cocoapods.RxSwift         	0x00000001078e340c partial apply for closure #1 in ObserveOnSerialDispatchQueueSink.init(scheduler:observer:cancel:) + 12
23  org.cocoapods.RxSwift         	0x00000001078e190f thunk for @escaping @callee_guaranteed (@guaranteed ObserveOnSerialDispatchQueueSink<A>, @in_guaranteed Event<A.Element>) -> (@out Disposable) + 191
24  org.cocoapods.RxSwift         	0x00000001078e32d1 partial apply for thunk for @escaping @callee_guaranteed (@guaranteed ObserveOnSerialDispatchQueueSink<A>, @in_guaranteed Event<A.Element>) -> (@out Disposable) + 33
25  org.cocoapods.RxSwift         	0x00000001078b7c06 MainScheduler.scheduleInternal<A>(_:action:) + 502 (MainScheduler.swift:63)
26  org.cocoapods.RxSwift         	0x000000010792584e SerialDispatchQueueScheduler.schedule<A>(_:action:) + 62 (SerialDispatchQueueScheduler.swift:101)
27  org.cocoapods.RxSwift         	0x00000001078e1804 ObserveOnSerialDispatchQueueSink.onCore(_:) + 1076 (ObserveOn.swift:195)
28  org.cocoapods.RxSwift         	0x00000001078e38be ObserverBase.on(_:) + 254 (ObserverBase.swift:17)
29  org.cocoapods.RxSwift         	0x00000001078e3b95 protocol witness for ObserverType.on(_:) in conformance ObserverBase<A> + 21
30  org.cocoapods.RxSwift         	0x0000000107817bb2 BehaviorSubject._synchronized_subscribe<A>(_:) + 1506 (BehaviorSubject.swift:128)
31  org.cocoapods.RxSwift         	0x000000010781759c BehaviorSubject.subscribe<A>(_:) + 124 (BehaviorSubject.swift:112)
32  org.cocoapods.RxSwift         	0x00000001078e2790 ObserveOnSerialDispatchQueue.run<A>(_:cancel:) + 480 (ObserveOn.swift:222)
33  org.cocoapods.RxSwift         	0x00000001078f3ee8 closure #1 in Producer.subscribe<A>(_:) + 312 (Producer.swift:26)
34  org.cocoapods.RxSwift         	0x00000001078f3ffc partial apply for closure #1 in Producer.subscribe<A>(_:) + 44
35  org.cocoapods.RxSwift         	0x000000010788aa5c thunk for @escaping @callee_guaranteed () -> (@out Disposable) + 12
36  org.cocoapods.RxSwift         	0x00000001078f4061 partial apply for thunk for @escaping @callee_guaranteed () -> (@out Disposable) + 17
37  org.cocoapods.RxSwift         	0x000000010787644f CurrentThreadScheduler.schedule<A>(_:action:) + 399 (CurrentThreadScheduler.swift:101)
38  org.cocoapods.RxSwift         	0x00000001078f3797 Producer.subscribe<A>(_:) + 903 (Producer.swift:24)
39  org.cocoapods.RxSwift         	0x0000000107928ba1 ShareReplay1WhileConnectedConnection.connect() + 145 (ShareReplayScope.swift:207)
40  org.cocoapods.RxSwift         	0x0000000107929df7 ShareReplay1WhileConnected.subscribe<A>(_:) + 775 (ShareReplayScope.swift:288)
41  org.cocoapods.RxSwift         	0x00000001078dafd5 ObservableType.subscribe(onNext:onError:onCompleted:onDisposed:) + 1701 (ObservableType+Extensions.swift:80)
42  org.cocoapods.RxCocoa         	0x00000001075478b4 SharedSequenceConvertibleType<>.drive(onNext:onCompleted:onDisposed:) + 596 (Driver+Subscription.swift:118)
43  com.someapp.SomeApp.Debug	0x000000010238c9bd RankingChartController.setupUsers() + 637 (RankingChartController.swift:86)
44  com.someapp.SomeApp.Debug	0x000000010238ab3a RankingChartController.viewDidLoad() + 106 (RankingChartController.swift:45)
45  com.someapp.SomeApp.Debug	0x000000010238ca94 @objc RankingChartController.viewDidLoad() + 36
46  com.apple.UIKitCore           	0x00000001120d543b -[UIViewController loadViewIfRequired] + 1183
47  com.apple.UIKitCore           	0x00000001120d5868 -[UIViewController view] + 27
48  com.apple.UIKitCore           	0x000000011286eb81 __67-[UIStoryboardEmbedSegueTemplate newDefaultPerformHandlerForSegue:]_block_invoke + 180
49  com.apple.UIKitCore           	0x0000000112870b9f -[UIStoryboardSegueTemplate _performWithDestinationViewController:sender:] + 276
50  com.apple.UIKitCore           	0x0000000112870a5d -[UIStoryboardSegueTemplate _perform:] + 82
51  com.apple.UIKitCore           	0x0000000112870d1f -[UIStoryboardSegueTemplate perform:] + 157
52  com.apple.UIKitCore           	0x00000001120d5227 -[UIViewController loadViewIfRequired] + 651
53  com.apple.UIKitCore           	0x0000000112039004 -[UINavigationController _updateScrollViewFromViewController:toViewController:] + 68
54  com.apple.UIKitCore           	0x00000001120392f7 -[UINavigationController _startTransition:fromViewController:toViewController:] + 146
55  com.apple.UIKitCore           	0x000000011203a3b5 -[UINavigationController _startDeferredTransitionIfNeeded:] + 896
56  com.apple.UIKitCore           	0x000000011203b6a7 -[UINavigationController __viewWillLayoutSubviews] + 150
57  com.apple.UIKitCore           	0x000000011201c38d -[UILayoutContainerView layoutSubviews] + 217
58  com.apple.UIKitCore           	0x0000000112ba59c1 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1417
59  com.apple.QuartzCore          	0x0000000107354eae -[CALayer layoutSublayers] + 173
60  com.apple.QuartzCore          	0x0000000107359b88 CA::Layer::layout_if_needed(CA::Transaction*) + 396
61  com.apple.QuartzCore          	0x0000000107365ee4 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 72
62  com.apple.QuartzCore          	0x00000001072d53aa CA::Context::commit_transaction(CA::Transaction*) + 328
63  com.apple.QuartzCore          	0x000000010730c584 CA::Transaction::commit() + 608
64  com.apple.UIKitCore           	0x00000001126f0ccb __34-[UIApplication _firstCommitBlock]_block_invoke_2 + 128
65  com.apple.CoreFoundation      	0x000000010948faec __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
66  com.apple.CoreFoundation      	0x000000010948f2b0 __CFRunLoopDoBlocks + 336
67  com.apple.CoreFoundation      	0x0000000109489b34 __CFRunLoopRun + 1252
68  com.apple.CoreFoundation      	0x0000000109489302 CFRunLoopRunSpecific + 626
69  com.apple.GraphicsServices    	0x000000010cdcc2fe GSEventRunModal + 65
70  com.apple.UIKitCore           	0x00000001126d7ba2 UIApplicationMain + 140
71  com.someapp.SomeApp.Debug	0x00000001023a27ab main + 75 (AppDelegate.swift:18)
72  libdyld.dylib   

Line in code that crashes:

        let chartDataSet = LineChartDataSet(dataEntries)
->    chartDataSet.mode = .horizontalBezier

Commenting that line out will the crash occur here instead:

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   ???                           	0x0000000000000028 0 + 40
1   org.cocoapods.Charts          	0x0000000105f62f6b ComponentBase.isEnabled.getter + 43 (ComponentBase.swift:36)

@pepejeria pepejeria changed the title Line Chart crashes when upgrading from 3.2.1 to 3.3.0 Line Chart crashes when upgrading from 3.2.1 to 3.2.2 or greater Jul 4, 2019
@pepejeria
Copy link
Author

Ok, this was fixed using this constructor instead:
let chartDataSet = LineChartDataSet(entries: dataEntries, label: nil)

Xcode suggested to user the other constructor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant