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
I agree to follow the Code of Conduct that this project adheres to.
I have searched the issue tracker for a bug report that matches the one I want to file, without success.
Electron Version
29.1.1
What operating system are you using?
Other Linux
Operating System Version
Linux archlinux 6.7.9-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 08 Mar 2024 01:59:01 +0000 x86_64 GNU/Linux, KDE Plasma 6 Wayland
What arch are you using?
x64
Last Known Working Electron version
I checked as far back as Electron 17 and could not find a version that does not crash (could not get Wayland to work properly on older versions for unrelated reasons)
Expected Behavior
screen.getCursorScreenPoint() should not segfault if called before a BrowserWindow is created. If it is not possible to implement then it should throw a JavaScript error and the documentation should be updated accordingly.
Actual Behavior
When I run the gist below with --ozone-platform-hint=wayland in Electron 29.1.1, the app dies with Segmentation fault (core dumped). gdb gives me this back trace at the segfault:
#0 ui::WaylandWindow::GetBoundsInDIP (this=0x0) at ../../ui/ozone/platform/wayland/host/wayland_window.cc:429
#1 0x0000555558491b92 in ui::WaylandScreen::GetCursorScreenPoint (this=0x3a380004ec10) at ../../ui/ozone/platform/wayland/host/wayland_screen.cc:400
#2 0x00005555579745fd in base::RepeatingCallback<gfx::Point (electron::api::Screen*, v8::Isolate*)>::Run(electron::api::Screen*, v8::Isolate*) const & (
this=0x7fffffffd030, args=0x3a38002fc000, args=0x3a38002fc000) at ../../base/functional/callback.h:344
#3 gin::internal::Invoker<std::__Cr::integer_sequence<unsigned long, 0ul, 1ul>, electron::api::Screen*, v8::Isolate*>::DispatchToCallback<gfx::Point>(base::RepeatingCallback<gfx::Point (electron::api::Screen*, v8::Isolate*)>) (callback=..., this=<optimized out>) at ../../gin/function_template.h:225
#4 gin::internal::Dispatcher<gfx::Point (electron::api::Screen*, v8::Isolate*)>::DispatchToCallbackImpl(gin::Arguments*) (args=0x7fffffffd080)
at ../../gin/function_template.h:264
#5 0x0000555557974488 in gin::internal::Dispatcher<gfx::Point (electron::api::Screen*, v8::Isolate*)>::DispatchToCallback(v8::FunctionCallbackInfo<v8::Value> const&) (info=...) at ../../gin/function_template.h:270
#6 0x000055555754a207 in Builtins_CallApiCallbackGeneric ()
#7 0x00007fffffffd110 in ?? ()
#8 0x00007fffffffd148 in ?? ()
#9 0x0000000000000000 in ?? ()
There is no crash when running under Xwayland (without --ozone-platform-hint=wayland)
Preflight Checklist
Electron Version
29.1.1
What operating system are you using?
Other Linux
Operating System Version
Linux archlinux 6.7.9-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 08 Mar 2024 01:59:01 +0000 x86_64 GNU/Linux, KDE Plasma 6 Wayland
What arch are you using?
x64
Last Known Working Electron version
I checked as far back as Electron 17 and could not find a version that does not crash (could not get Wayland to work properly on older versions for unrelated reasons)
Expected Behavior
screen.getCursorScreenPoint() should not segfault if called before a BrowserWindow is created. If it is not possible to implement then it should throw a JavaScript error and the documentation should be updated accordingly.
Actual Behavior
When I run the gist below with
--ozone-platform-hint=wayland
in Electron 29.1.1, the app dies withSegmentation fault (core dumped)
. gdb gives me this back trace at the segfault:There is no crash when running under Xwayland (without --ozone-platform-hint=wayland)
Testcase Gist URL
https://gist.github.com/GarboMuffin/f1bfbf78b5e05d27a9bd30a6e18204a9
Additional Information
This is the same issue as #35471
The text was updated successfully, but these errors were encountered: