Skip to content

RCTText.m drawRect #1302

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

Closed
myusuf3 opened this issue May 15, 2015 · 7 comments
Closed

RCTText.m drawRect #1302

myusuf3 opened this issue May 15, 2015 · 7 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@myusuf3
Copy link
Contributor

myusuf3 commented May 15, 2015

My app keeps crashing randomly, I am not even interacting with the UI it just crashes inside drawRect for RCTText.m The page will load up fine work well then bang.

Here is the trace I get.

 *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** NSRunStorage, _NSBlockNumberForIndex(): index (0) beyond array bounds (0)'
*** First throw call stack:
(0x1821e02d8 0x193a040e4 0x1821e0218 0x18ffe3bac 0x18ffd092c 0x18ffd1a8c 0x18ff9e710 0x18ffd4388 0x18ffd61a8 0x1003635e0 0x186ca39cc 0x186596c84 0x186580e04 0x1865803e0 0x18657ff64 0x186560a7c 0x186560734 0x18655febc 0x18655fc3c 0x186559364 0x1821982a4 0x182195230 0x182195610 0x1820c12d4 0x18b8d76fc 0x186c86fac 0x100203c08 0x194082a08)
libc++abi.dylib: terminating with uncaught exception of type NSException
@brentvatne
Copy link
Collaborator

@myusuf3 can you try cleaning the project?

@ide
Copy link
Contributor

ide commented May 15, 2015

Looks like the same problem as #1207.

@brentvatne
Copy link
Collaborator

@ide - agreed, also somewhat related to #749 perhaps

@nicklockwood
Copy link
Contributor

Cc @a2 - I think we either need to introduce some thread locking around our NSTextLayout, or rethink the strategy of sharing it between main & shadow threads.

@myusuf3
Copy link
Contributor Author

myusuf3 commented May 17, 2015

So we have some code that can reproduce this bug fairly reliably and it does point to it being some sort of race condition when updating text on the screen.

Let me know I think I can whip up something fairly quick.

@myusuf3
Copy link
Contributor Author

myusuf3 commented May 17, 2015

@nicklockwood I agree with the rethinking strategy of sharing main and shadow threads. This is currently breaking us and how to turn of code that does the text updating in order to continue app development.

@ide
Copy link
Contributor

ide commented May 28, 2015

Closing this out since 0689c07 hopefully fixes the source of the text crashes. Please open another task if the master branch of React still causes RCTText crashes for you.

@ide ide closed this as completed May 28, 2015
@facebook facebook locked as resolved and limited conversation to collaborators May 29, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

5 participants