Coder Social home page Coder Social logo

Crash report about runestone HOT 17 CLOSED

simonbs avatar simonbs commented on May 20, 2024
Crash report

from runestone.

Comments (17)

Blankwonder avatar Blankwonder commented on May 20, 2024 1

Just released a TestFlight build, which was built with the Runestone main branch. I will get back to you a couple of days later.

from runestone.

Blankwonder avatar Blankwonder commented on May 20, 2024 1

@simonbs That's great. I will release a test build a few hours later.

from runestone.

simonbs avatar simonbs commented on May 20, 2024 1

@Blankwonder That's great! Last time you uploaded a new build the issues seemed to arrive fairly quickly.

I'll close the issue and consider the crash fixed but please don't hesitate to open an issue again if you still see the crashes. You can just open one referring to this issue if that happens.

Thanks a lot for reporting the issue, for testing the changes in your app, and for providing feedback along the way πŸ™Œ

from runestone.

simonbs avatar simonbs commented on May 20, 2024

@Blankwonder Thanks for reporting this! Based on the stack trace it looks like the issue may have been introduced in version 0.2.1 of the framework. I'll have a look at it right away.

Based on the stack trace and the theory that this issue was introduced in 0.2.1, it should only occur when inputting marked text, such as Korean characters. Does your app happen to be popular in regions where marked text is common? Knowing whether that's the case or not may help me verify if the issue could be related to the recent changes to Runestone.

from runestone.

Blankwonder avatar Blankwonder commented on May 20, 2024

@simonbs It's correct. My users are likely to input Chinese characters.

from runestone.

simonbs avatar simonbs commented on May 20, 2024

@Blankwonder Thanks for the prompt reply! That's very helpful. I'll have a look at what's going on.

from runestone.

simonbs avatar simonbs commented on May 20, 2024

I've been unable to reproduce this issue but if the assumption that the issue was introduced in 0.2.1 is correct, then I think it'll be resolved by the changes in #149. I'm thinking that the with the changes in 0.2.1, Runestone would sometimes end in a state where the selected range was invalid. That should no longer be possible in #149.

I'd like to stress that I take this issue very seriously. I've spent a lot of time ensuring proper support for inputting marked text but the APIs to support this are awful and likely buggy as outlined in #129. Knowing very little about how marked text is supposed to work, as I have very little experience with it, I think the current implementation works as expected but of course it shouldn't cause the app to crash. That needs to be fixed ASAP.

I'd greatly appreciate if you'll take the current main branch for a spin, and possibly adopt it in your app, possibly in a future TestFlight build, and let me know if the problem persists. Unfortunately, I don't have a large user base inputting Chinese characters so I struggle to get the proper data and stress test this as long as I'm unable to reproduce the issue.

from runestone.

simonbs avatar simonbs commented on May 20, 2024

@Blankwonder Thanks you so much! Looking forward to hear from you.

from runestone.

Blankwonder avatar Blankwonder commented on May 20, 2024

Just received a crash report from the latest build. (Xcode is so buggy. Please confirm whether I built it with the correct branch.)

Thread 0 - (TH_STATE_RUNNING)
0  CoreFoundation     ___exceptionPreprocess
1  libobjc.A.dylib    _objc_exception_throw
2  CoreFoundation     __CFThrowFormattedException
3  CoreFoundation     _mutateError
4  CoreFoundation     -[__NSCFString replaceCharactersInRange:withString:]
5  Surge-iOS          StringView.replaceText(in:with:) (StringView.swift:67:24)
6  Surge-iOS          TextInputView.replaceText(in:with:selectedRangeAfterUndo:undoActionName:) (TextInputView.swift:1115:45)
7  Surge-iOS          TextInputView.setMarkedText(_:selectedRange:) (TextInputView.swift:1297:9)
8  Surge-iOS          @objc TextInputView.setMarkedText(_:selectedRange:) (<compiler-generated>)
9  UIKitCore          <redacted>
10 UIKitCore          <redacted>
11 UIKitCore          <redacted>
12 UIKitCore          <redacted>
13 UIKitCore          <redacted>
14 UIKitCore          <redacted>
15 UIKitCore          <redacted>
16 UIKitCore          <redacted>
17 UIKitCore          <redacted>
18 UIKitCore          <redacted>
19 UIKitCore          <redacted>
20 UIKitCore          <redacted>
21 UIKitCore          <redacted>
22 UIKitCore          <redacted>
23 CoreFoundation     ___CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__
24 CoreFoundation     ____CFXRegistrationPost_block_invoke
25 CoreFoundation     __CFXRegistrationPost
26 CoreFoundation     __CFXNotificationPost
27 Foundation         -[NSNotificationCenter postNotificationName:object:userInfo:]
28 UIKitCore          <redacted>
29 UIKitCore          _UIScenePerformActionsWithLifecycleActionMask
30 UIKitCore          <redacted>
31 UIKitCore          <redacted>
32 UIKitCore          <redacted>
33 UIKitCore          <redacted>
34 UIKitCore          <redacted>
35 UIKitCore          <redacted>
36 UIKitCore          _UISceneSettingsDiffActionPerformChangesWithTransitionContextAndCompletion
37 UIKitCore          <redacted>
38 UIKitCore          <redacted>
39 UIKitCore          <redacted>
40 UIKitCore          <redacted>
41 UIKitCore          <redacted>
42 FrontBoardServices -[FBSScene updater:didUpdateSettings:withDiff:transitionContext:completion:]
43 FrontBoardServices ___94-[FBSWorkspaceScenesClient _queue_updateScene:withSettings:diff:transitionContext:completion:]_block_invoke_2
44 FrontBoardServices -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:]
45 FrontBoardServices ___94-[FBSWorkspaceScenesClient _queue_updateScene:withSettings:diff:transitionContext:completion:]_block_invoke
46 libdispatch.dylib  __dispatch_client_callout
47 libdispatch.dylib  __dispatch_block_invoke_direct
48 FrontBoardServices __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__
49 FrontBoardServices -[FBSSerialQueue _targetQueue_performNextIfPossible]
50 FrontBoardServices -[FBSSerialQueue _performNextFromRunLoopSource]
51 CoreFoundation     ___CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
52 CoreFoundation     ___CFRunLoopDoSource0
53 CoreFoundation     ___CFRunLoopDoSources0
54 CoreFoundation     ___CFRunLoopRun
55 CoreFoundation     _CFRunLoopRunSpecific
56 GraphicsServices   _GSEventRunModal
57 UIKitCore          <redacted>
58 UIKitCore          UIApplicationMain
59 Surge-iOS          main (main.m:14:16)
60 dyld               <redacted>

from runestone.

simonbs avatar simonbs commented on May 20, 2024

Thanks for following up. I hoped to look into this today but ended up looking at another issue instead. I hope to get around to it tomorrow.

from runestone.

simonbs avatar simonbs commented on May 20, 2024

Still planning to look into this issue soon.

(Xcode is so buggy. Please confirm whether I built it with the correct branch.)

I'm not sure I can do that from your stack trace. To be sure that you're building with the correct version of Runestone, you may want to ask Swift Package Manager to pin against this commit, reset your package cache, and then update the Runestone package in Xcode.

from runestone.

simonbs avatar simonbs commented on May 20, 2024

@Blankwonder Long shot but here goes: Can we get more information on how to reproduce this, possibly from a support ticket you might have going with your one of your users? I'm hoping this bug is simple to fix once it can be reproduced but I struggle to do so.

from runestone.

Blankwonder avatar Blankwonder commented on May 20, 2024

Sorry. I haven't received any related tickets from users. But I just tried randomly typing Chinese and got another crash after a double tap. πŸ˜‚

Thread 0 name:   Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libsystem_platform.dylib      	       0x1fdf7daf0 _platform_memmove + 544
1   CoreFoundation                	       0x1b1a752e8 __CFStringCreateImmutableFunnel3 + 2744
2   CoreFoundation                	       0x1b1a85068 CFStringCreateWithSubstring + 648
3   CoreFoundation                	       0x1b1a88dbc -[__NSCFString substringWithRange:] + 164
4   DataDetectorsUI               	       0x1ca8158f0 -[DDContextMenuAction initWithRVItem:] + 488
5   DataDetectorsUI               	       0x1ca8175a0 +[DDRevealBridge updatedTextInteractionMenuElements:withRVItem:view:context:] + 412
6   UIKitCore                     	       0x1b4a4029c -[_UIContextMenuInteractionBasedTextContextInteraction _editMenuForSuggestedActions:rvItem:isEditMenu:] + 1104
7   UIKitCore                     	       0x1b4a40e30 -[_UIContextMenuInteractionBasedTextContextInteraction _editMenuForCurrentSelectionWithSuggestedActions:isEditMenu:] + 696
8   UIKitCore                     	       0x1b4a40af8 -[_UIContextMenuInteractionBasedTextContextInteraction _querySelectionCommandsForConfiguration:suggestedActions:completionHandler:] + 448
9   UIKitCore                     	       0x1b4a40840 -[_UIContextMenuInteractionBasedTextContextInteraction _editMenuInteraction:menuForConfiguration:suggestedActions:completionHandler:] + 140
10  UIKitCore                     	       0x1b4b84fc4 -[UIEditMenuInteraction _prepareMenuAtLocation:configuration:completionHandler:] + 280
11  UIKitCore                     	       0x1b4b837b0 -[UIEditMenuInteraction presentEditMenuWithConfiguration:] + 224
12  UIKitCore                     	       0x1b4a40f4c -[_UIContextMenuInteractionBasedTextContextInteraction presentSelectionCommandsWithConfiguration:] + 80
13  UIKitCore                     	       0x1b4a705c4 -[UITextSelectionView _showCommandsWithReplacements:isForContextMenu:forDictation:arrowDirection:] + 940
14  UIKitCore                     	       0x1b4a701b0 __77-[UITextSelectionView _showCommandsWithReplacements:forDictation:afterDelay:]_block_invoke + 228
15  UIKitCore                     	       0x1b4a700a0 -[UITextSelectionView _showCommandsWithReplacements:forDictation:afterDelay:] + 332
16  UIKitCore                     	       0x1b3db34a8 __51-[UITextSelectionView deferredUpdateSelectionRects]_block_invoke + 32
17  CoreFoundation                	       0x1b1a82070 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 36
18  CoreFoundation                	       0x1b1a0a690 __CFRunLoopDoObservers + 532
19  CoreFoundation                	       0x1b1a6be9c __CFRunLoopRun + 808
20  CoreFoundation                	       0x1b1a711e4 CFRunLoopRunSpecific + 612
21  GraphicsServices              	       0x1ea6b3368 GSEventRunModal + 164
22  UIKitCore                     	       0x1b3f21c48 -[UIApplication _run] + 888
23  UIKitCore                     	       0x1b3f218ac UIApplicationMain + 340
24  Surge-iOS                     	       0x100591144 main + 96
25  dyld                          	       0x1cfcb7948 start + 2504

from runestone.

simonbs avatar simonbs commented on May 20, 2024

@Blankwonder Thanks for trying to reproduce this. I'm unsure if the last stack trace you've posted is related to the other stack traces. The two first stack traces both include setMarkedText(_:selectedRange) but the last one don't. However, it includes references to the standard UIEditMenuInteraction whereas the two first don't.

Since the third stack trace includes references to UIEditMenuInteraction, I assume you're testing on iOS 16. Do you happen to have any data on which devices the other stack traces are coming from? Is it iPhones or iPads? And which version of iOS/iPadOS are they running?

I'm asking all these (possibly) annoying questions because I've been trying to reproduce the issue for quite a while but I haven't seen it once. I'd like to understand scenarios it's happening in better.

from runestone.

Blankwonder avatar Blankwonder commented on May 20, 2024

Oh, sorry for not mentioning it early. I checked the crash collect system. 21 crash reports, and they are all from iOS 16. And all from iPhone

from runestone.

simonbs avatar simonbs commented on May 20, 2024

@Blankwonder I was able to reproduce the issue you describe where double tapping to select text may cause a crash. This seemed to only happen on iOS 16. It should be fixed in #157, which was just merged into development.

After having looked into this, I would no longer be surprised if the root cause for the issue your users are seeing is the same as the one causing a crash when double tapping to select text.

Would you mind making a build of your app with the most recent changes on the main branch?

from runestone.

Blankwonder avatar Blankwonder commented on May 20, 2024

Good news. I haven't received any new crashes in the last 48 hours.

from runestone.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.