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

Investigate and possibly fix warnings about _UITextMagnifiedLoupeView #127

Open
DominikBucher12 opened this issue Jan 17, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@DominikBucher12
Copy link
Collaborator

DominikBucher12 commented Jan 17, 2024

When selecting current position in the rich text editor, there is this warning:

Error: this application, or a library it uses, has passed an invalid numeric value (NaN, or not-a-number) to CoreGraphics API and this value is being ignored. Please fix this problem.

When adding CG_NUMERICS_SHOW_BACKTRACE Environment variable to the scheme, we can see that _UITextMagnifiedLoupeView which is Apples private API for Showing the magnified loop when changing caret position, causes this break in layoutSubviews.

I strongly believe we do nothing wrong and this is Apple bug

This is just a warning, but it causes some performance issues, the only thing we can do in here is either call with Apple and do some swizzling magic, or swizzle magically on our own to try fix this :D

@danielsaidi do we actually care or is this freezer? :D

Backtrace:
  <CGPathAddLineToPoint+88>
   <+[UIBezierPath _continuousRoundedRectBezierPath:withRoundedCorners:cornerRadii:segments:smoothPillShapes:]+1140>
    <+[UIBezierPath _continuousRoundedRectBezierPath:withRoundedCorners:cornerRadius:segments:]+180>
     <+[UIBezierPath _roundedRectBezierPath:withRoundedCorners:cornerRadius:segments:legacyCorners:]+340>
      <-[_UITextMagnifiedLoupeView layoutSubviews]+1252>
       <-[UIView(CALayerDelegate) layoutSublayersOfLayer:]+1492>
        <_ZN2CA5Layer16layout_if_neededEPNS_11TransactionE+440>
         <_ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE+124>
          <_ZN2CA7Context18commit_transactionEPNS_11TransactionEdPd+460>
           <_ZN2CA11Transaction6commitEv+652>
            <_ZN2CA7Display11DisplayLink14dispatch_itemsEyyy+1296>
             <_ZN2CA7Display11DisplayLink8callbackEP15_CADisplayTimeryyybPv+632>
              <_ZL22display_timer_callbackP12__CFMachPortPvlS1_+336>
               <__CFMachPortPerform+172>
                <__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__+56>
                 <__CFRunLoopDoSource1+496>
                  <__CFRunLoopRun+2176>
                   <CFRunLoopRunSpecific+572>
                    <GSEventRunModal+160>
                     <-[UIApplication _run]+868>
                      <UIApplicationMain+124>
                       <OUTLINED_FUNCTION_70+500>
                        <OUTLINED_FUNCTION_70+148>
                         <OUTLINED_FUNCTION_2+92>
                          <$s4Demo0A3AppV5$mainyyFZ+40>
                           <main+12>
                            104b85558
                             104572058                              dc75000000000000
@danielsaidi
Copy link
Owner

Great find! I mean, let's keep it and who knows, perhaps someone manages to find out how to fix it 🤞

@danielsaidi danielsaidi added the bug Something isn't working label Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants