-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[ASTextNode] ASTextKitAttributes.h line 28 crash when setting an attributed string. #1594
Comments
@klivin: Do you know what iOS versions this is occurring on? There are some known issues in iOS 7 and iOS 8 text API. Can you check if this is also occurring at the same frequency on iOS 9 or if there are a disproportionate number on older versions? |
@appleguy You think this is more related to the locking issues in |
@klivin Two things:
|
@klivin Hey, Can you please update us on this issue? Do you still see crashes in your app after using the latest release? Thanks! |
@klivin: I'm going to close this thread given the amount of time since it's been active. However, if you still see this crash, could you re-open this issue and let us know? Thanks! |
@hannahmbanana @maicki @appleguy Thanks, and sorry for the delay on the update here. Yes you guys must have fixed the locking issue as the crash has gone away in the most recent release using the master branch at the time. I believe this was fixed on master 3-4 weeks ago. This is probably appropriate for another place, and I'll create a new issue - I have been having a general issue with ASTextNode around auto-scale text. I am setting the text with variable length text, and am trying to use the pointSizeScaleFactors to achieve an auto-scale of the text. I am seeing that the entire text node size changes, I want the size of the text node to stay fixed and the text size to grow/shrink to fit. I am trying using layoutSpecThatFits to specify the text node size, but the text node size appears to be determined by the text length, not the layout spec. |
Here's link to new issue, thanks! |
Hi, I am getting a frequent crash in our production app when an attributed string is set on an ASText Node. Are there any thoughts on what I could check on the attributed string to make sure this is not happening? I have a hunch that there is some unhandled Hebrew text being set in the attributed string, but I have not been able to reproduce the issue in development. Below are the stack traces:
Stack trace:
Crashed: org.AsyncDisplayKit.ASDisplayLayer.displayQueue
0 libobjc.A.dylib 0x1995b80b0 objc_retain + 16
1 libobjc.A.dylib 0x1995b8128 objc_storeStrong + 44
2 jswipe 0x1002fe688 -ASTextKitRenderer initWithTextKitAttributes:constrainedSize:
3 jswipe 0x10030208c -ASTextNode _rendererWithBounds:
4 jswipe 0x100302da0 -ASTextNode drawRect:withParameters:isCancelled:isRasterizing:
5 jswipe 0x1002bb958 __90-[ASDisplayNode(AsyncDisplay) _displayBlockWithAsynchronous:isCancelledBlock:rasterizing:]_block_invoke.70 (ASDisplayNode+AsyncDisplay.mm:286)
6 jswipe 0x10030c39c __71-[_ASAsyncTransaction addOperationWithBlock:priority:queue:completion:]_block_invoke (_ASAsyncTransaction.mm:405)
7 jswipe 0x10030b70c ___ZN23ASAsyncTransactionQueue9GroupImpl8scheduleElPU28objcproto17OS_dispatch_queue8NSObjectU13block_pointerFvvE_block_invoke (_ASAsyncTransaction.mm:236)
8 libdispatch.dylib 0x199db16e8 _dispatch_call_block_and_release + 24
9 libdispatch.dylib 0x199db16a8 _dispatch_client_callout + 16
10 libdispatch.dylib 0x199dbbf7c _dispatch_async_redirect_invoke + 1920
11 libdispatch.dylib 0x199db16a8 _dispatch_client_callout + 16
12 libdispatch.dylib 0x199dbfb40 _dispatch_root_queue_drain + 2140
13 libdispatch.dylib 0x199dbf2dc _dispatch_worker_thread3 + 112
14 libsystem_pthread.dylib 0x199fc5470 _pthread_wqthread + 1092
15 libsystem_pthread.dylib 0x199fc5020 start_wqthread + 4
Here's the main thread stack leading to crash:
com.apple.main-thread
0 libsystem_kernel.dylib 0x199efef90 psynch_mutexwait + 8
1 libsystem_pthread.dylib 0x199fca39c _pthread_mutex_lock_wait + 96
2 jswipe 0x1002a218c ASDN::Mutex::lock() (ASThread.h:124)
3 jswipe 0x1003022d4 -ASTextNode _invalidateRenderer
4 jswipe 0x100302b0c -ASTextNode setAttributedString:
5 jswipe 0x1000c9af0 specialized ContentNode.primaryAttributedString.setter (ContentNode.swift:17)
6 jswipe 0x1000c8818 ContentNode.primaryAttributedString.setter (ContentNode.swift)
7 jswipe 0x10010da30 specialized CircleProfileImageNode.setContentText(String, secondaryText : String?) -> () (SwipeCellSubviews.swift:46)
8 jswipe 0x10010a9a0 CircleProfileImageNode.setContentText(String, secondaryText : String?) -> () (SwipeCellSubviews.swift:29)
9 jswipe 0x100134208 SwipeCell.(refreshCellData() -> ()).(closure #1) (SwipeCell.swift:173)
10 jswipe 0x100140d50 partial apply for thunk (SMLUser.swift)
11 libdispatch.dylib 0x199db16e8 _dispatch_call_block_and_release + 24
12 libdispatch.dylib 0x199db16a8 _dispatch_client_callout + 16
13 libdispatch.dylib 0x199db6db0 _dispatch_main_queue_callback_4CF + 1844
14 CoreFoundation 0x1840ac1f8 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 12
15 CoreFoundation 0x1840aa060 __CFRunLoopRun + 1628
16 CoreFoundation 0x183fd8ca0 CFRunLoopRunSpecific + 384
17 GraphicsServices 0x18f55c088 GSEventRunModal + 180
18 UIKit 0x1896f0ffc UIApplicationMain + 204
19 jswipe 0x100044a8c main (main.m:17)
20 libdyld.dylib 0x199de28b8 start + 4
The text was updated successfully, but these errors were encountered: