Skip to content

separating accessibilityUnit from accessibilityMinutes and accessibilityHours - #4

Draft
fabOnReact wants to merge 6 commits into
tts-span-accessibility-unit-cpp-settingsfrom
tts-span-additional-props
Draft

separating accessibilityUnit from accessibilityMinutes and accessibilityHours#4
fabOnReact wants to merge 6 commits into
tts-span-accessibility-unit-cpp-settingsfrom
tts-span-additional-props

Conversation

@fabOnReact

Copy link
Copy Markdown
Owner

The changes will crash the app at startup with the following stack trace

Related: react#35130 (comment) (was solved by modyfing the file and then running the artifacts)

Related PR #3
This functionalities will be part of future PR

full log

11-14 21:26:04.564 19462 19462 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
11-14 21:26:04.564 19462 19462 F DEBUG : Build fingerprint: 'Redmi/camellian_id/camellian:11/RP1A.200720.011/V12.5.4.0.RKSIDXM:user/release-keys'
11-14 21:26:04.564 19462 19462 F DEBUG : Revision: '0'
11-14 21:26:04.564 19462 19462 F DEBUG : ABI: 'arm64'
11-14 21:26:04.565 19462 19462 F DEBUG : Timestamp: 2022-11-14 21:26:04+0100
11-14 21:26:04.565 19462 19462 F DEBUG : pid: 19337, tid: 19423, name: mqt_js >>> com.facebook.react.uiapp <<<
11-14 21:26:04.565 19462 19462 F DEBUG : uid: 10417
11-14 21:26:04.565 19462 19462 F DEBUG : signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
11-14 21:26:04.565 19462 19462 F DEBUG : Abort message: '/Users/fabriziobertoglio/Sourcecode/opensource/react-native/ReactCommon/react/renderer/core/RawValue.h:271: function castValue: assertion failed (dynamic.isObject())'
11-14 21:26:04.565 19462 19462 F DEBUG : x0 0000000000000000 x1 0000000000004bdf x2 0000000000000006 x3 0000007b7e4e8fd0
11-14 21:26:04.565 19462 19462 F DEBUG : x4 0000007b7e4e8a60 x5 0000007b7e4e8a60 x6 0000007b7e4e8a60 x7 0000000000000000
11-14 21:26:04.565 19462 19462 F DEBUG : x8 00000000000000f0 x9 0000007c972bf718 x10 ffffff80fffffbdf x11 0000000000000001
11-14 21:26:04.565 19462 19462 F DEBUG : x12 000000001de49168 x13 0000000000000001 x14 000000000013a000 x15 0000000000000000
11-14 21:26:04.565 19462 19462 F DEBUG : x16 0000007c9738f948 x17 0000007c9736eb90 x18 0000007b7da42000 x19 0000000000004b89
11-14 21:26:04.565 19462 19462 F DEBUG : x20 0000000000004bdf x21 00000000ffffffff x22 0000007c13c46359 x23 0000000000000002
11-14 21:26:04.565 19462 19462 F DEBUG : x24 0000007c13c260a7 x25 0000000000000001 x26 0000007c13c3d037 x27 0000007c14235000
11-14 21:26:04.565 19462 19462 F DEBUG : x28 b400007c9a4ae360 x29 0000007b7e4e9050
11-14 21:26:04.565 19462 19462 F DEBUG : lr 0000007c973228c8 sp 0000007b7e4e8fb0 pc 0000007c973228f8 pst 0000000000001000
11-14 21:26:04.681 19462 19462 F DEBUG : backtrace:
11-14 21:26:04.681 19462 19462 F DEBUG : #00 pc 00000000000898f8 /apex/com.android.runtime/lib64/bionic/libc.so (abort+168) (BuildId: 91daf2d5bf0aef9792c0820dfdc3c79e)
11-14 21:26:04.681 19462 19462 F DEBUG : #01 pc 0000000000552284 /apex/com.android.art/lib64/libart.so (art::Runtime::Abort(char const*)+2260) (BuildId: 372a904938922ad5207bc369223ccd45)
11-14 21:26:04.681 19462 19462 F DEBUG : #02 pc 0000000000013990 /system/lib64/libbase.so (android::base::SetAborter(std::__1::function<void (char const*)>&&)::$_3::__invoke(char const*)+76) (BuildId: 40363036c1f5a305d00fe1d058a86ccb)
11-14 21:26:04.681 19462 19462 F DEBUG : #03 pc 0000000000006e58 /system/lib64/liblog.so (__android_log_assert+336) (BuildId: a258efec13e9100f9a53e795c419da98)
11-14 21:26:04.681 19462 19462 F DEBUG : #04 pc 0000000000000728 /data/app/~~CKf-utu26a69kjr__380jA==/com.facebook.react.uiapp-iW5nq9fgff1KQOWeC701DQ==/lib/arm64/libreact_debug.so (react_native_assert_fail+104) (BuildId: 3ff5096a1517e0c6)
11-14 21:26:04.681 19462 19462 F DEBUG : #05 pc 00000000000b83a8 /data/app/~~CKf-utu26a69kjr__380jA==/com.facebook.react.uiapp-iW5nq9fgff1KQOWeC701DQ==/lib/arm64/librrc_view.so (folly::F14FastMap<std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, folly::HeterogeneousAccessHash<std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, void>, folly::HeterogeneousAccessEqualTo<std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, void>, std::__ndk1::allocator<std::__ndk1::pair<std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > > > > facebook::react::RawValue::castValue<std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > >(folly::dynamic const&, folly::F14FastMap<std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, folly::HeterogeneousAccessHash<std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, void>, folly::HeterogeneousAccessEqualTo<std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, void>, std::__ndk1::allocator<std::__ndk1::pair<std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > > > >*)+88) (BuildId: c526f14cf8933b15)

@github-actions

github-actionsBot commented Nov 14, 2022

Copy link
Copy Markdown
Fails
🚫

❗ Base Branch - The base branch for this PR is something other than main or a -stable branch. Are you sure you want to target something other than the main branch?

🚫

📋 Missing Changelog - Can you add a Changelog? To do so, add a "## Changelog" section to your PR description. A changelog entry has the following format: [CATEGORY] [TYPE] - Message.

DetailsCATEGORY may be:
  • General
  • iOS
  • Android
  • JavaScript
  • Internal (for changes that do not need to be called out in the release notes)

TYPE may be:

  • Added, for new features.
  • Changed, for changes in existing functionality.
  • Deprecated, for soon-to-be removed features.
  • Removed, for now removed features.
  • Fixed, for any bug fixes.
  • Security, in case of vulnerabilities.

MESSAGE may answer "what and why" on a feature level. Use this to briefly tell React Native users about notable changes.

Warnings
⚠️📋 Missing Test Plan - Can you add a Test Plan? To do so, add a "## Test Plan" section to your PR description. A Test Plan lets us know how these changes were tested.
⚠️📋 Missing Summary - Can you add a Summary? To do so, add a "## Summary" section to your PR description. This is a good place to explain the motivation for making this change.
⚠️

Libraries/Components/View/ViewPropTypes.js#L13 - Libraries/Components/View/ViewPropTypes.js line 13 – Requires should be sorted alphabetically (lint/sort-imports)

⚠️

Libraries/Components/View/ViewPropTypes.js#L30 - Libraries/Components/View/ViewPropTypes.js line 30 – 'AccessibilityUnit' is defined but never used. (no-unused-vars)

⚠️

packages/rn-tester/js/examples/Accessibility/AccessibilityExample.js#L1535 - packages/rn-tester/js/examples/Accessibility/AccessibilityExample.js line 1535 – 'pressed' is assigned a value but never used. (no-unused-vars)

⚠️

packages/rn-tester/js/examples/Accessibility/AccessibilityExample.js#L1535 - packages/rn-tester/js/examples/Accessibility/AccessibilityExample.js line 1535 – 'setPressed' is assigned a value but never used. (no-unused-vars)

Generated by 🚫 dangerJS against b7332ee

@fabOnReactfabOnReact changed the title Tts span additional propsseparating accessibilityUnit from accessibilityMinutes and accessibilityHoursNov 14, 2022
fabOnReact added a commit that referenced this pull request Nov 15, 2022
## Summary
Adds the accessibilityUnit to fabric CPP API (part of PR react#35130 Adding support for Android Accessibility TtsSpan API)
The TtsSpan API now supports verbatim, date, and fraction but may not work with other span types like phone numbers, currency, time, measure, and money.
An explanation of the use case is as follows:
- Time is spelled 1 0 3 0 instead of ten thirty
- The developer does not have the option to specify if 10m stands for 10 meters or 10 miles, or 10 minutes
- Phone numbers, for example, 33312344, are not yet supported
Implementing the above functionality requires adding a new prop to the react-native API responsible for managing attributes of nested Text. - Java and CPP TextAttributes manage the functionality.
- Nested Text does not correspond to a Widget on Android but an Android TextView Span. The spans are updated based on a caching mechanism that re-renders the Android TextView only if specific attributes are updated.
The updates are triggered only if the Text or Paragraph Text attributes change.
- An example of Text attributes is accessibilityRole, font-weight, and backgroundColor.
- An example of Paragraph attributes is textBreakstrategy. They are updated with different mechanisms because they may change the paragraph layout.
These mappings are configured in Java, CPP, and Javascript.
As this and PR [react#33468](react#33468) require changes to the text attributes, the below work was needed:
- issue documented in PR [react#33468 (comment)](react#33468 (comment)) and PR [react#35130 (comment)](react#35130 (comment)). The CPP changes for react#35130 are moved to a separate PR ([fabriziobertoglio1987#2](#2)). The RNTester App would crash without a clear stack trace on startup after making changes to CPP. This was later fixed by adding the CPP headers to the prefab library rrc_view (see this [comment](react#35130 (comment))).
- Adding the CPP configurations (see [fabriziobertoglio1987#2](https://github.com/fabriziobertoglio1987/react-- native/pull/2)) required extensive troubleshooting and analysis
Related: PR #4 - separating accessibilityUnit from accessibilityMinutes and accessibilityHours
fabOnReact pushed a commit that referenced this pull request May 23, 2025
…tion for existing view (react#51294)
Summary:
Pull Request resolved: react#51294
changelog: [internal]
Fix a crash where a node that is supposed to be culled doesn't get visited because culling context is not updated.
The differentiator would generate a create instruction for a view that already exists.
Stack trace for the crash:
```
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
* frame #0: 0x0000000111740874 libsystem_kernel.dylib`__pthread_kill + 8
frame #1: 0x00000001117aa2ec libsystem_pthread.dylib`pthread_kill + 264
frame #2: 0x0000000180171ea8 libsystem_c.dylib`abort + 100
frame #3: 0x00000001802b0144 libc++abi.dylib`abort_message + 128
frame #4: 0x000000018029fe4c libc++abi.dylib`demangling_terminate_handler() + 296
frame #5: 0x000000018006f220 libobjc.A.dylib`_objc_terminate() + 124
frame #6: 0x00000001375d1964 INFRAFramework`meta_terminate() + 5468
frame #7: 0x00000001802af570 libc++abi.dylib`std::__terminate(void (*)()) + 12
frame #8: 0x00000001802b2498 libc++abi.dylib`__cxxabiv1::failed_throw(__cxxabiv1::__cxa_exception*) + 32
frame #9: 0x00000001802b2478 libc++abi.dylib`__cxa_throw + 88
frame #10: 0x0000000180093904 libobjc.A.dylib`objc_exception_throw + 384
frame react#11: 0x0000000180e6999c Foundation`-[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 268
frame react#12: 0x000000031a3bcfc8 XPLAT_6_Framework`-[RCTComponentViewRegistry dequeueComponentViewWithComponentHandle:tag:] + 528
frame react#13: 0x000000031a3ccdec XPLAT_6_Framework`RCTPerformMountInstructions(std::__1::vector<facebook::react::ShadowViewMutation, std::__1::allocator<facebook::react::ShadowViewMutation>> const&, RCTComponentViewRegistry*, RCTMountingTransactionObserverCoordinator&, int) + 356
frame react#14: 0x000000031a3ccc7c XPLAT_6_Framework`-[RCTMountingManager performTransaction:]::$_1::operator()(facebook::react::MountingTransaction const&, facebook::react::SurfaceTelemetry const&) const + 80
frame react#15: 0x000000031a3ccc20 XPLAT_6_Framework`decltype(std::declval<-[RCTMountingManager performTransaction:]::$_1&>()(std::declval<facebook::react::MountingTransaction const&>(), std::declval<facebook::react::SurfaceTelemetry const&>())) std::__1::__invoke[abi:ne190102]<-[RCTMountingManager performTransaction:]::$_1&, facebook::react::MountingTransaction const&, facebook::react::SurfaceTelemetry const&>(-[RCTMountingManager performTransaction:]::$_1&, facebook::react::MountingTransaction const&, facebook::react::SurfaceTelemetry const&) + 40
frame react#16: 0x000000031a3ccbc8 XPLAT_6_Framework`void std::__1::__invoke_void_return_wrapper<void, true>::__call[abi:ne190102]<-[RCTMountingManager performTransaction:]::$_1&, facebook::react::MountingTransaction const&, facebook::react::SurfaceTelemetry const&>(-[RCTMountingManager performTransaction:]::$_1&, facebook::react::MountingTransaction const&, facebook::react::SurfaceTelemetry const&) + 40
frame react#17: 0x000000031a3ccb94 XPLAT_6_Framework`std::__1::__function::__alloc_func<-[RCTMountingManager performTransaction:]::$_1, std::__1::allocator<-[RCTMountingManager performTransaction:]::$_1>, void (facebook::react::MountingTransaction const&, facebook::react::SurfaceTelemetry const&)>::operator()[abi:ne190102](facebook::react::MountingTransaction const&, facebook::react::SurfaceTelemetry const&) + 44
frame react#18: 0x000000031a3cba1c XPLAT_6_Framework`std::__1::__function::__func<-[RCTMountingManager performTransaction:]::$_1, std::__1::allocator<-[RCTMountingManager performTransaction:]::$_1>, void (facebook::react::MountingTransaction const&, facebook::react::SurfaceTelemetry const&)>::operator()(facebook::react::MountingTransaction const&, facebook::react::SurfaceTelemetry const&) + 44
frame react#20: 0x000000032f219804 XPLAT_1_Framework`std::__1::function<void (facebook::react::MountingTransaction const&, facebook::react::SurfaceTelemetry const&)>::operator()(this=0x000000016d4f0c78, __arg=0x000000016d4f0a10, __arg=0x000000016d4f0978) const at function.h:989:10
frame react#21: 0x000000032f219668 XPLAT_1_Framework`facebook::react::TelemetryController::pullTransaction(this=0x00000003f4680f00, willMount=0x000000016d4f0c98, doMount=0x000000016d4f0c78, didMount=0x000000016d4f0c58) const at TelemetryController.cpp:39:3
frame react#22: 0x000000031a3c5b28 XPLAT_6_Framework`-[RCTMountingManager performTransaction:] + 544
frame react#23: 0x000000031a3c5864 XPLAT_6_Framework`-[RCTMountingManager initiateTransaction:] + 456
frame react#24: 0x000000031a3c5240 XPLAT_6_Framework`__42-[RCTMountingManager scheduleTransaction:]_block_invoke + 308
frame react#25: 0x0000000131f81b84 BOTTOMFramework`__RCTExecuteOnMainQueue_block_invoke + 40
frame react#26: 0x000000018017c788 libdispatch.dylib`_dispatch_call_block_and_release + 24
frame react#27: 0x0000000180197278 libdispatch.dylib`_dispatch_client_callout + 12
frame react#28: 0x00000001801b2fcc libdispatch.dylib`_dispatch_main_queue_drain.cold.7 + 24
frame react#29: 0x000000018018c1c4 libdispatch.dylib`_dispatch_main_queue_drain + 1184
frame react#30: 0x000000018018bd14 libdispatch.dylib`_dispatch_main_queue_callback_4CF + 40
frame react#31: 0x0000000180427fec CoreFoundation`__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
frame react#32: 0x00000001804229f8 CoreFoundation`__CFRunLoopRun + 1920
frame react#33: 0x0000000180421e3c CoreFoundation`CFRunLoopRunSpecific + 536
frame react#34: 0x0000000190f62d00 GraphicsServices`GSEventRunModal + 164
frame react#35: 0x0000000185bcec98 UIKitCore`-[UIApplication _run] + 796
frame react#36: 0x0000000185bd3064 UIKitCore`UIApplicationMain + 124
frame react#37: 0x0000000115fbf0bc PRODUCTFramework`main + 200
frame react#38: 0x00000001114293d8 dyld_sim`start_sim + 20
frame react#39: 0x0000000111506b4c dyld`start + 6000
```
Reviewed By: rubennorte
Differential Revision: D74654157
fbshipit-source-id: 9181bcd28524c71d0ca4620bd630dc0baa172386
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@fabOnReact