You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At an indeterminate time after successful startup and load AvaloniaCefBrowser, an Avalonia UI app running on Linux (Ubuntu 22.04 and 24.04), crashes with the following stack trace:
Thread 1 "Xilium.CefGlue." received signal SIGSEGV, Segmentation fault.
0x0000555555dadea0 in ?? ()
(gdb) bt
#0 0x0000555555dadea0 in ?? ()
#1 0x00007fff746f8aab in hb_face_t::reference_table (tag=<optimized out>, this=<optimized out>)
at ../src/hb-face.hh:79
#2 hb_face_reference_table (face=<optimized out>, tag=<optimized out>) at ../src/hb-face.cc:411
#3 0x00007fff7474b3ab in hb_sanitize_context_t::reference_table<OT::Layout::GSUB> (
tableTag=1196643650, face=0x555555daffd0, this=0x7fffffff7420) at ../src/hb-sanitize.hh:500
#4 OT::GSUBGPOS::accelerator_t<OT::Layout::GSUB>::accelerator_t (this=<optimized out>,
face=<optimized out>, this=<optimized out>, face=<optimized out>)
at ../src/OT/Layout/GPOS/../../../hb-ot-layout-gsubgpos.hh:4757
#5 0x00007fff7473cce3 in OT::GSUB_accelerator_t::GSUB_accelerator_t (face=0x555555daffd0,
this=0x555555e52cc0) at ../src/OT/Layout/GSUB/GSUB.hh:55
--Type <RET> for more, q to quit, c to continue without paging--
#6 hb_lazy_loader_t<OT::GSUB_accelerator_t, hb_face_lazy_loader_t<OT::GSUB_accelerator_t, 25u>, hb_face_t, 25u, OT::GSUB_accelerator_t>::create (data=<optimized out>) at ../src/hb-machinery.hh:258
#7 hb_data_wrapper_t<hb_face_t, 25u>::call_create<OT::GSUB_accelerator_t, hb_face_lazy_loader_t<OT::GSUB_accelerator_t, 25u> > (this=<optimized out>) at ../src/hb-machinery.hh:158
#8 hb_lazy_loader_t<OT::GSUB_accelerator_t, hb_face_lazy_loader_t<OT::GSUB_accelerator_t, 25u>, hb_face_t, 25u, OT::GSUB_accelerator_t>::get_stored (this=<optimized out>) at ../src/hb-machinery.hh:221
#9 hb_lazy_loader_t<OT::GSUB_accelerator_t, hb_face_lazy_loader_t<OT::GSUB_accelerator_t, 25u>, hb_face_t, 25u, OT::GSUB_accelerator_t>::get (this=<optimized out>) at ../src/hb-machinery.hh:245
#10 hb_lazy_loader_t<OT::GSUB_accelerator_t, hb_face_lazy_loader_t<OT::GSUB_accelerator_t, 25u>, hb_face_t, 25u, OT::GSUB_accelerator_t>::operator-> (this=<optimized out>) at ../src/hb-machinery.hh:205
#11 get_gsubgpos_table (face=0x555555db8d30, table_tag=<optimized out>) at ../src/hb-ot-layout.cc:421
#12 0x00007fff7473e483 in hb_ot_layout_table_find_feature_variations (face=<optimized out>, table_tag=<optimized out>,
coords=0x0, num_coords=0, variations_index=0x7fffffff75fc) at ../src/hb-ot-layout.cc:1445
#13 0x00007fff74781a10 in hb_ot_shape_plan_key_t::init (num_coords=0, coords=0x0, face=0x555555db8d30,
this=0x7fffffff75fc) at ../src/hb-ot-shape.hh:45
#14 hb_shape_plan_key_t::init (this=0x7fffffff75d0, copy=<optimized out>, face=0x555555db8d30, props=<optimized out>,
user_features=<optimized out>, num_user_features=0, coords=0x0, num_coords=0, shaper_list=0x0)
at ../src/hb-shape-plan.cc:92
#15 0x00007fff7478b728 in hb_shape_plan_create_cached2 (face=0x555555db8d30, props=0x555555e7a2c0, user_features=0x0,
num_user_features=0, coords=0x0, num_coords=0, shaper_list=0x0) at ../src/hb-shape-plan.cc:536
#16 0x00007fff74250627 in hb_shape_full ()
I compiled the CefGlue.Demo.Avalonia project and running it.
The exception is caught at Font.ShapeText first. The App come from CefGlue
Just running the CefGlue.Demo.Avalonia project on Ubuntu 24.04
Expected behavior
I'd expect the app to be stable and not crash with this exception intermittently.
Avalonia version
11.0.4 ~11.2
OS
Linux
Additional context
I try to ShapeText by self at the Startup before Loading CefGlue. The problems fixed.
public override void OnFrameworkInitializationCompleted()
{
FixShapeTextCrash();
...
}
private static void FixShapeTextCrash()
{
var text = "FixedShapeTextCrashBug\t";
var options = new TextShaperOptions(Typeface.Default.GlyphTypeface, 12, 0, CultureInfo.CurrentCulture, 100);
var shapedBuffer = TextShaper.Current.ShapeText(text.AsMemory().Slice(6), options);
}
However, I try to trace the stack, It seem access a wild callback pointer that register from hb_face_create_for_tables in Face's construct.
hb_blob_t *reference_table (hb_tag_t tag) const
{
hb_blob_t *blob;
if (unlikely (!reference_table_func))
return hb_blob_get_empty ();
blob = reference_table_func (/*Oh, well.*/const_cast<hb_face_t *> (this), tag, user_data); // crash on this
if (unlikely (!blob))
return hb_blob_get_empty ();
return blob;
}
If I don't load the CefGlue, It seems does not access the hb_face_t::reference_table, so it does not access the reference_table_func callback and able to Shape Text.
The text was updated successfully, but these errors were encountered:
Describe the bug
At an indeterminate time after successful startup and load AvaloniaCefBrowser, an Avalonia UI app running on Linux (Ubuntu 22.04 and 24.04), crashes with the following stack trace:
I compiled the CefGlue.Demo.Avalonia project and running it.
The exception is caught at Font.ShapeText first. The App come from CefGlue
the clrstack
To Reproduce
Expected behavior
I'd expect the app to be stable and not crash with this exception intermittently.
Avalonia version
11.0.4 ~11.2
OS
Linux
Additional context
I try to ShapeText by self at the Startup before Loading CefGlue. The problems fixed.
However, I try to trace the stack, It seem access a wild callback pointer that register from hb_face_create_for_tables in Face's construct.
If I don't load the CefGlue, It seems does not access the hb_face_t::reference_table, so it does not access the reference_table_func callback and able to Shape Text.
The text was updated successfully, but these errors were encountered: