-
Notifications
You must be signed in to change notification settings - Fork 6k
[Linux][a11y] implement AtkText::get_text/string_at_offset() #38144
[Linux][a11y] implement AtkText::get_text/string_at_offset() #38144
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Linux Unopt CI job failed because of indirect memory leaks. I can reproduce the fontconfig leaks with: #include <cairo/cairo.h>
#include <fontconfig/fontconfig.h>
#include <pango/pango.h>
#include <pango/pangocairo.h>
int main()
{
PangoFontMap* font_map = pango_cairo_font_map_get_default();
PangoContext* context = pango_font_map_create_context(font_map);
pango_context_set_base_dir(context, PANGO_DIRECTION_LTR);
PangoLayout* layout = pango_layout_new(context);
pango_layout_set_text(layout, "Lorem ipsum dolor sit amet.", -1);
gint n_attrs = 0;
pango_layout_get_log_attrs_readonly(layout, &n_attrs);
g_object_unref(context);
g_object_unref(layout);
//cairo_debug_reset_static_data(); // cairo-hash.c:217: _cairo_hash_table_destroy: Assertion `hash_table->live_entries == 0' failed.
//FcFini(); // fccache.c:801: FcCacheFini: Assertion `fcCacheChains[i] == NULL' failed.
}
|
Was this leak related to the patch? |
Yeah, the leak is related to this patch. An indirect dependency (libfontconfig) leaks some static data that I didn't find a way to reset. |
If its static data in a third party dependency, we can add it to the list of suppressions to work around it. The suppressions list is at lsan_suppressions.txt here. Let's add a suppression and move on. |
The suppressions seemed to have worked but the test failure seems related to the patch. |
@chinmaygarde could it be that the CI is missing libfontconfig debug symbols? The tests are passing locally with the same build flags and sanitizers and with
If I uninstall
|
Not sure. cc @cbracken might know. |
@chinmaygarde @cbracken @jason-simmons Do we know why fontconfig is dynamically linked? Looks like we're DEPSing it in here https://github.com/flutter/engine/blob/main/DEPS#L578. |
I think the TL;DR is that what's going on is a static allocation in libfontconfig that's being caught by asan, but because it's not built with debug symbols availabole, we're unable to filter it out in our allow-list. If we're building fontconfig ourselves, then we can probably just update build flags for the debug build, assuming we're not running sanitisers on non-debug builds. |
Are we building it ourselves? I don't see build rules for it. |
cc @cbracken. This seems to have been blocked for a while. I am not sure how to make progress here. Can you please take a look at this when you get a chance please? |
Closing as stale. |
Testing if #40725 helped |
I don't think it did. Can we asses the scope of the leak and suppress it and investigate in a followup? |
libfontconfig is now dynamically linked but debug symbols are still not there so suppressing Fc* symbols wouldn't work. I came across this in build/sanitizers/lsan_suppressions.cc which doesn't need debug symbols. // False positives in libfontconfig. http://crbug.com/39050
"leak:libfontconfig\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
re-lgtm!
…128460) flutter/engine@4f4486b...1089ce6 2023-06-07 jonahwilliams@google.com [Impeller] Add buffer to texture blit for Vulkan. (flutter/engine#41706) 2023-06-07 chris@bracken.jp [macOS] Add platformview creation parameter support (flutter/engine#42607) 2023-06-07 30870216+gaaclarke@users.noreply.github.com [Impeller] Added a switch to turn on vulkan (flutter/engine#42585) 2023-06-07 skia-flutter-autoroll@skia.org Roll ANGLE from f8220fa3a729 to 15a29438b099 (1 revision) (flutter/engine#42627) 2023-06-07 jacksongardner@google.com Bump Chrome version to 114 for testing (flutter/engine#42623) 2023-06-07 skia-flutter-autoroll@skia.org Roll Skia from d607cbb0db78 to 773765ca1dd2 (7 revisions) (flutter/engine#42624) 2023-06-07 jpnurmi@gmail.com [Linux][a11y] implement AtkText::get_text/string_at_offset() (flutter/engine#38144) 2023-06-07 skia-flutter-autoroll@skia.org Roll ANGLE from 176989ad00cc to f8220fa3a729 (1 revision) (flutter/engine#42621) 2023-06-07 skia-flutter-autoroll@skia.org Roll Skia from ee90e9ae2e62 to d607cbb0db78 (1 revision) (flutter/engine#42618) 2023-06-07 skia-flutter-autoroll@skia.org Roll ANGLE from 1ad4ae4d63bf to 176989ad00cc (1 revision) (flutter/engine#42617) 2023-06-07 dkwingsmt@users.noreply.github.com Revert "[Android] Return keyboard pressed state" (flutter/engine#42616) 2023-06-07 skia-flutter-autoroll@skia.org Roll Skia from bde894438f29 to ee90e9ae2e62 (1 revision) (flutter/engine#42614) 2023-06-07 skia-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from lpbkSRJBMkPs0FM7_... to sEHtHM1iFt79roP-x... (flutter/engine#42613) 2023-06-07 skia-flutter-autoroll@skia.org Roll Skia from cd3e1665dcd1 to bde894438f29 (1 revision) (flutter/engine#42612) 2023-06-07 skia-flutter-autoroll@skia.org Roll ANGLE from 16841d6256da to 1ad4ae4d63bf (1 revision) (flutter/engine#42611) 2023-06-07 bdero@google.com [Impeller] Reland 2: Add Impeller Metal support in the embedder API (#42411) (flutter/engine#42597) 2023-06-07 skia-flutter-autoroll@skia.org Roll Skia from a01f49f539ab to cd3e1665dcd1 (1 revision) (flutter/engine#42610) 2023-06-07 skia-flutter-autoroll@skia.org Roll Fuchsia Mac SDK from atrYtfHWi2cmV9B_C... to ojwVlxZWrbsG4WGSE... (flutter/engine#42609) 2023-06-07 skia-flutter-autoroll@skia.org Roll Skia from 521b8c4bb011 to a01f49f539ab (4 revisions) (flutter/engine#42608) 2023-06-07 skia-flutter-autoroll@skia.org Roll Skia from cef18d10b363 to 521b8c4bb011 (1 revision) (flutter/engine#42605) Also rolling transitive DEPS: fuchsia/sdk/core/linux-amd64 from lpbkSRJBMkPs to sEHtHM1iFt79 fuchsia/sdk/core/mac-amd64 from atrYtfHWi2cm to ojwVlxZWrbsG If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC jacksongardner@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
This PR implements
AtkText::get_string_at_offset()
(and the deprecatedAtkText::get_text_at_offset()
still used by e.g. Orca) forFlAccessibleTextField
to allow Orca to read out loud the current character while moving the text cursor around.Before (unmute to hear the screen reader)
textfield-a11y-before.webm
After (unmute to hear the screen reader)
textfield-a11y-after.webm
Fixes: flutter/flutter#113049
Pre-launch Checklist
///
).