Skip to content
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

Support tizen 4.0 #23

Conversation

xiaowei-guan
Copy link

  1. Add build arg(tizen-sdk-4) for tizen4.0.
  2. Because Tizen4 only support ecore_wl, but tizen5,tizen6 only support ecore_wl2. so implement tizen_render_ecore_wl for tizen4 and tizen_render_ecore_wl2 for tizen5 and tizen6.
  3. std::thread will block on tizen 4.0, replace with ecore_thread_run.

How to download tizen4.0 dependency?

./build-rootfs.py \
--arch x86 \
--base-repo http://download.tizen.org/snapshots/tizen/4.0-base/latest/repos/emulator32/packages \
--unified-repo http://download.tizen.org/snapshots/tizen/4.0-unified/latest/repos/standard/packages

./build-rootfs.py \
--arch arm \
--base-repo http://download.tizen.org/snapshots/tizen/4.0-base/latest/repos/arm/packages \
--unified-repo http://download.tizen.org/snapshots/tizen/4.0-unified/latest/repos/standard/packages

How to build flutter tizen4.0 engine?

flutter/tools/gn \
--target-os linux \
--linux-cpu x86 \
--target-toolchain `pwd`/tizen_tools/toolchains \
--target-sysroot `pwd`/tizen_tools/sysroot/x86 \
--target-triple i586-tizen-linux-gnueabi \
--runtime-mode debug \
--embedder-for-target \
--tizen-sdk-4 \
--build-tizen-shell

1.Add build arg(tizen-sdk-4) for tizen4.0.
2.Because Tizen4 only support ecore_wl, but tizen5,tizen6 only
support ecore_wl2. so implement tizen_render_ecore_wl for tizen4
and tizen_render_ecore_wl2 for tizen5 and tizen6.
@xiaowei-guan xiaowei-guan requested a review from a team January 12, 2021 03:10
@swift-kim
Copy link
Member

Do we need different binaries for Tizen 4.0 and Tizen 6.0 or is the engine built for Tizen 4.0 still compatible with Tizen 6.0?

@xiaowei-guan
Copy link
Author

Do we need different binaries for Tizen 4.0 and Tizen 6.0 or is the engine built for Tizen 4.0 still compatible with Tizen 6.0?

We need different binaries for Tizen4.0 and Tizen6.0.

1.I checked with EFL team, they thought ttizen5 tizen6 not support ecore_wl. and I try run ecore_wl on tizen6, but fail.So Tizen4.0 only support ecore_wl, tizen 5, tizen6 only support ecore_wl2.
2. when build Flutter engine with tizen4.0, tizen4.0 not support ecore_wl2. so we can't build ecore_wl and ecore_wl2 together.

@swift-kim
Copy link
Member

Thanks. Then we'll have to discuss in more detail about how an app should target different platform versions.

  1. Two different tpks per app
    • Galaxy Store Seller Portal doesn't support uploading multiple tpks built for multiple Tizen versions.
  2. Single tpk containing two different engines
    • The .NET app host can handle this case but the code gets a little bit more complicated.
    • The app size gets larger.
  3. Common engine + two Tizen embedders (the way we used before)
    • Similar to 2 but smaller app size.
  4. Any other way
    • Some magic support library?

The issue can be discussed later after this PR is reviewed and merged.

Copy link
Member

@swift-kim swift-kim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job!

Additionally you can remove the line

// Copyright 2013 The Flutter Authors. All rights reserved.

if you didn't copy any code from the flutter engine in that specific file.

shell/platform/tizen/BUILD.gn Outdated Show resolved Hide resolved
#define EMBEDDER_TIZEN_RENDERER_H

#include <EGL/egl.h>
class TizenRenderer {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use more line breaks

  • between #include and class
  • between functions in implementation files
  • at EOF

Comment on lines 265 to 281
EGLint configAttribs[] = {EGL_SURFACE_TYPE,
EGL_WINDOW_BIT,
EGL_RED_SIZE,
8,
EGL_GREEN_SIZE,
8,
EGL_BLUE_SIZE,
8,
EGL_ALPHA_SIZE,
EGL_DONT_CARE,
EGL_RENDERABLE_TYPE,
EGL_OPENGL_ES2_BIT,
EGL_SAMPLE_BUFFERS,
EGL_DONT_CARE,
EGL_SAMPLES,
EGL_DONT_CARE,
EGL_NONE};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may temporarily disable the formatter to make the code look better. For example:

// clang-format off
EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
EGL_RED_SIZE, 8,
EGL_GREEN_SIZE, 8,
EGL_BLUE_SIZE, 8,
EGL_ALPHA_SIZE, 8,
EGL_DEPTH_SIZE, 0,
EGL_STENCIL_SIZE, 0,
EGL_NONE, // termination sentinel
// clang-format on

egl_surface_ = eglCreateWindowSurface(egl_display_, egl_config_,
GetEGLNativeWindowType(), ptr);
if (egl_surface_ == EGL_NO_SURFACE) {
FT_LOGE("eglCreateWindowSurface is Failed");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a nitpick.

Suggested change
FT_LOGE("eglCreateWindowSurface is Failed");
FT_LOGE("eglCreateWindowSurface failed");

"is failed" appears not only here but throughout this file.

shell/platform/tizen/tizen_renderer.cc Outdated Show resolved Hide resolved
Comment on lines 397 to 399
"EGL_CONTEXT_LOST : If a power management event has occurred. The "
"application must destroy all contexts and reinitialise OpenGL ES "
"state and objects to continue rendering\n");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"EGL_CONTEXT_LOST : If a power management event has occurred. The "
"application must destroy all contexts and reinitialise OpenGL ES "
"state and objects to continue rendering\n");
"EGL_CONTEXT_LOST : A power management event has occurred. The "
"application must destroy all contexts and reinitialise OpenGL ES "
"state and objects to continue rendering\n");

Also do you have any sources for these error strings? I'm asking because different sources state different error reasons for the same error codes. I referred to the latest EGL specification: https://www.khronos.org/registry/EGL/specs/eglspec.1.5.pdf

@bbrto21
Copy link

bbrto21 commented Jan 13, 2021

Do we need different binaries for Tizen 4.0 and Tizen 6.0 or is the engine built for Tizen 4.0 still compatible with Tizen 6.0?

We need different binaries for Tizen4.0 and Tizen6.0.

1.I checked with EFL team, they thought ttizen5 tizen6 not support ecore_wl. and I try run ecore_wl on tizen6, but fail.So Tizen4.0 only support ecore_wl, tizen 5, tizen6 only support ecore_wl2.
2. when build Flutter engine with tizen4.0, tizen4.0 not support ecore_wl2. so we can't build ecore_wl and ecore_wl2 together.

@xiaowei-guan
Have you considered Evas GL? I'm not sure, but I think it could be an alternative.

Copy link

@bbrto21 bbrto21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@xuelian-bai
Copy link

Do we need different binaries for Tizen 4.0 and Tizen 6.0 or is the engine built for Tizen 4.0 still compatible with Tizen 6.0?

We need different binaries for Tizen4.0 and Tizen6.0.
1.I checked with EFL team, they thought ttizen5 tizen6 not support ecore_wl. and I try run ecore_wl on tizen6, but fail.So Tizen4.0 only support ecore_wl, tizen 5, tizen6 only support ecore_wl2.
2. when build Flutter engine with tizen4.0, tizen4.0 not support ecore_wl2. so we can't build ecore_wl and ecore_wl2 together.

@xiaowei-guan
Have you considered Evas GL? I'm not sure, but I think it could be an alternative.

In my opinion, evas GL is set of APIs to wrap GLES APIs, so it lack features like event handler, interface with e20(not sure), etc, so it will make our application more complicated, simmilar solution may include SDL.

@xuelian-bai
Copy link

Thanks. Then we'll have to discuss in more detail about how an app should target different platform versions.

  1. Two different tpks per app

    • Galaxy Store Seller Portal doesn't support uploading multiple tpks built for multiple Tizen versions.
  2. Single tpk containing two different engines

    • The .NET app host can handle this case but the code gets a little bit more complicated.
    • The app size gets larger.
  3. Common engine + two Tizen embedders (the way we used before)

    • Similar to 2 but smaller app size.
  4. Any other way

    • Some magic support library?

The issue can be discussed later after this PR is reviewed and merged.

I prefer option 3, but, from this point of view, maybe use evasGL or SDL will be a good option.

@xiaowei-guan
Copy link
Author

xiaowei-guan commented Jan 13, 2021

Thanks. Then we'll have to discuss in more detail about how an app should target different platform versions.

  1. Two different tpks per app

    • Galaxy Store Seller Portal doesn't support uploading multiple tpks built for multiple Tizen versions.
  2. Single tpk containing two different engines

    • The .NET app host can handle this case but the code gets a little bit more complicated.
    • The app size gets larger.
  3. Common engine + two Tizen embedders (the way we used before)

    • Similar to 2 but smaller app size.
  4. Any other way

    • Some magic support library?

The issue can be discussed later after this PR is reviewed and merged.

I prefer option 3, but, from this point of view, maybe use evasGL or SDL will be a good option.

we can try use evasGL.

1.If create tdm vblank failed, need destory vblank or tdm client.
2.Before request vblank, need check the thread is marked pending
cancellation.
@bwikbs
Copy link
Member

bwikbs commented Jan 14, 2021

we can try use evasGL.

Are you doing this? I'm also trying to figure out if this approach works properly.., but I can't skia initialized at first stage.
So.. I'm thinking about seeing this more.

@bbrto21
Copy link

bbrto21 commented Jan 14, 2021

we can try use evasGL.

Are you doing this? I'm also trying to figure out if this approach works properly.., but I can't skia initialized at first stage.
So.. I'm thinking about seeing this more.

@bwikbs
Could you create an issue on this and share your progress?

@xiaowei-guan
Copy link
Author

we can try use evasGL.

Are you doing this? I'm also trying to figure out if this approach works properly.., but I can't skia initialized at first stage.
So.. I'm thinking about seeing this more.

No,I just learned about EvasGL, we think EvasGL is a better choice. could you share your progress?

@bbrto21
Copy link

bbrto21 commented Jan 22, 2021

@xiaowei-guan
Is this PR ready to be merged?

@swift-kim
Copy link
Member

I'm going to test on a real device today but it looks good.

@xiaowei-guan
Copy link
Author

@xiaowei-guan
Is this PR ready to be merged?

Waiting a few minutes. I am submiting code for screen rotations.

@swift-kim swift-kim merged commit d28275e into flutter-tizen:flutter-1.22-candidate.12-tizen Jan 22, 2021
swift-kim added a commit that referenced this pull request Feb 15, 2021
* Fix memory corruption issue (#2)
* Exit application method is replaced by 'ui_app_exit' (#3)
* Fix launch failure in sleep mode (#4)
* Fix scorll issue (#6)
* Changed EGL settings to support more Tizen devices (#5)
* Add touch events of platform view channel for tizen (#8)
* Resize egl window when software keyboard is shown (#7)
* Fix texture being not released issue (#9)
* Remove tizen_tools dependency and update BUILD.gn (#11)
* Refactor tizen surface (#10)
* Fix a crash in stop phase of Tizen engine (#12)
* Fix a crash during app shutdown (#13)
* Fix a crash when TizenVsyncWaiter is destroyed. (#15)
* Implement key events for tizen webview (#14)
* Change method name starting with lower case (#16)
* Remove not used code (#18)
* Introduce assertion macros (#17)
* Minor update to Misc (#19)
* Add azure-pipelines.yml (#20)
* Clean-up channel view resource upon exiting app (#22)
* Call a method to set imf_context in platform view channel (#24)
* Support Tizen 4.0 (#23)
* Fix a focused platform view bug (#27)
* Support screen rotations for Tizen 4.0 and Tizen 6.0 (#28)
* Separate the embedder from the engine (#29)
* Add profile build to the CI script (#30)
* Share egl context to egl resource context (#31)
* Implement message queue to handle vblank request (#32)
* Fix a platform view bug (#33)
* Convert timestamp to correct unit (#35)
* Send locales to flutter including default locale (#38)
* Enable FontConfig to improve font fallbacks (#40)

Co-authored-by: Xiaowei Guan <xiaowei.guan@samsung.com>
Co-authored-by: MuHong Byun <mh.byun@samsung.com>
Co-authored-by: Boram Bae <boram21.bae@samsung.com>
Co-authored-by: Seungsoo Lee <seungsoo47.lee@samsung.com>
Co-authored-by: Hakkyu Kim <43136596+HakkyuKim@users.noreply.github.com>
swift-kim added a commit that referenced this pull request Feb 15, 2021
* Fix memory corruption issue (#2)
* Exit application method is replaced by 'ui_app_exit' (#3)
* Fix launch failure in sleep mode (#4)
* Fix scorll issue (#6)
* Changed EGL settings to support more Tizen devices (#5)
* Add touch events of platform view channel for tizen (#8)
* Resize egl window when software keyboard is shown (#7)
* Fix texture being not released issue (#9)
* Remove tizen_tools dependency and update BUILD.gn (#11)
* Refactor tizen surface (#10)
* Fix a crash in stop phase of Tizen engine (#12)
* Fix a crash during app shutdown (#13)
* Fix a crash when TizenVsyncWaiter is destroyed. (#15)
* Implement key events for tizen webview (#14)
* Change method name starting with lower case (#16)
* Remove not used code (#18)
* Introduce assertion macros (#17)
* Minor update to Misc (#19)
* Add azure-pipelines.yml (#20)
* Clean-up channel view resource upon exiting app (#22)
* Call a method to set imf_context in platform view channel (#24)
* Support Tizen 4.0 (#23)
* Fix a focused platform view bug (#27)
* Support screen rotations for Tizen 4.0 and Tizen 6.0 (#28)
* Separate the embedder from the engine (#29)
* Add profile build to the CI script (#30)
* Share egl context to egl resource context (#31)
* Implement message queue to handle vblank request (#32)
* Fix a platform view bug (#33)
* Convert timestamp to correct unit (#35)
* Send locales to flutter including default locale (#38)
* Enable FontConfig to improve font fallbacks (#40)

Co-authored-by: Xiaowei Guan <xiaowei.guan@samsung.com>
Co-authored-by: MuHong Byun <mh.byun@samsung.com>
Co-authored-by: Boram Bae <boram21.bae@samsung.com>
Co-authored-by: Seungsoo Lee <seungsoo47.lee@samsung.com>
Co-authored-by: Hakkyu Kim <43136596+HakkyuKim@users.noreply.github.com>
swift-kim added a commit that referenced this pull request Mar 10, 2021
* Fix memory corruption issue (#2)
* Exit application method is replaced by 'ui_app_exit' (#3)
* Fix launch failure in sleep mode (#4)
* Fix scorll issue (#6)
* Changed EGL settings to support more Tizen devices (#5)
* Add touch events of platform view channel for tizen (#8)
* Resize egl window when software keyboard is shown (#7)
* Fix texture being not released issue (#9)
* Remove tizen_tools dependency and update BUILD.gn (#11)
* Refactor tizen surface (#10)
* Fix a crash in stop phase of Tizen engine (#12)
* Fix a crash during app shutdown (#13)
* Fix a crash when TizenVsyncWaiter is destroyed. (#15)
* Implement key events for tizen webview (#14)
* Change method name starting with lower case (#16)
* Remove not used code (#18)
* Introduce assertion macros (#17)
* Minor update to Misc (#19)
* Add azure-pipelines.yml (#20)
* Clean-up channel view resource upon exiting app (#22)
* Call a method to set imf_context in platform view channel (#24)
* Support Tizen 4.0 (#23)
* Fix a focused platform view bug (#27)
* Support screen rotations for Tizen 4.0 and Tizen 6.0 (#28)
* Separate the embedder from the engine (#29)
* Add profile build to the CI script (#30)
* Share egl context to egl resource context (#31)
* Implement message queue to handle vblank request (#32)
* Fix a platform view bug (#33)
* Convert timestamp to correct unit (#35)
* Send locales to flutter including default locale (#38)
* Enable FontConfig to improve font fallbacks (#40)

Co-authored-by: Xiaowei Guan <xiaowei.guan@samsung.com>
Co-authored-by: MuHong Byun <mh.byun@samsung.com>
Co-authored-by: Boram Bae <boram21.bae@samsung.com>
Co-authored-by: Seungsoo Lee <seungsoo47.lee@samsung.com>
Co-authored-by: Hakkyu Kim <43136596+HakkyuKim@users.noreply.github.com>
@xiaowei-guan xiaowei-guan deleted the support_tizen4.0_2 branch June 3, 2021 09:47
swift-kim added a commit that referenced this pull request Jun 7, 2021
* Fix memory corruption issue (#2)
* Exit application method is replaced by 'ui_app_exit' (#3)
* Fix launch failure in sleep mode (#4)
* Fix scorll issue (#6)
* Changed EGL settings to support more Tizen devices (#5)
* Add touch events of platform view channel for tizen (#8)
* Resize egl window when software keyboard is shown (#7)
* Fix texture being not released issue (#9)
* Remove tizen_tools dependency and update BUILD.gn (#11)
* Refactor tizen surface (#10)
* Fix a crash in stop phase of Tizen engine (#12)
* Fix a crash during app shutdown (#13)
* Fix a crash when TizenVsyncWaiter is destroyed. (#15)
* Implement key events for tizen webview (#14)
* Change method name starting with lower case (#16)
* Remove not used code (#18)
* Introduce assertion macros (#17)
* Minor update to Misc (#19)
* Add azure-pipelines.yml (#20)
* Clean-up channel view resource upon exiting app (#22)
* Call a method to set imf_context in platform view channel (#24)
* Support Tizen 4.0 (#23)
* Fix a focused platform view bug (#27)
* Support screen rotations for Tizen 4.0 and Tizen 6.0 (#28)
* Separate the embedder from the engine (#29)
* Add profile build to the CI script (#30)
* Share egl context to egl resource context (#31)
* Implement message queue to handle vblank request (#32)
* Fix a platform view bug (#33)
* Convert timestamp to correct unit (#35)
* Send locales to flutter including default locale (#38)
* Enable FontConfig to improve font fallbacks (#40)

Co-authored-by: Xiaowei Guan <xiaowei.guan@samsung.com>
Co-authored-by: MuHong Byun <mh.byun@samsung.com>
Co-authored-by: Boram Bae <boram21.bae@samsung.com>
Co-authored-by: Seungsoo Lee <seungsoo47.lee@samsung.com>
Co-authored-by: Hakkyu Kim <43136596+HakkyuKim@users.noreply.github.com>
swift-kim added a commit that referenced this pull request Sep 27, 2021
* Fix memory corruption issue (#2)
* Exit application method is replaced by 'ui_app_exit' (#3)
* Fix launch failure in sleep mode (#4)
* Fix scorll issue (#6)
* Changed EGL settings to support more Tizen devices (#5)
* Add touch events of platform view channel for tizen (#8)
* Resize egl window when software keyboard is shown (#7)
* Fix texture being not released issue (#9)
* Remove tizen_tools dependency and update BUILD.gn (#11)
* Refactor tizen surface (#10)
* Fix a crash in stop phase of Tizen engine (#12)
* Fix a crash during app shutdown (#13)
* Fix a crash when TizenVsyncWaiter is destroyed. (#15)
* Implement key events for tizen webview (#14)
* Change method name starting with lower case (#16)
* Remove not used code (#18)
* Introduce assertion macros (#17)
* Minor update to Misc (#19)
* Add azure-pipelines.yml (#20)
* Clean-up channel view resource upon exiting app (#22)
* Call a method to set imf_context in platform view channel (#24)
* Support Tizen 4.0 (#23)
* Fix a focused platform view bug (#27)
* Support screen rotations for Tizen 4.0 and Tizen 6.0 (#28)
* Separate the embedder from the engine (#29)
* Add profile build to the CI script (#30)
* Share egl context to egl resource context (#31)
* Implement message queue to handle vblank request (#32)
* Fix a platform view bug (#33)
* Convert timestamp to correct unit (#35)
* Send locales to flutter including default locale (#38)
* Enable FontConfig to improve font fallbacks (#40)

Co-authored-by: Xiaowei Guan <xiaowei.guan@samsung.com>
Co-authored-by: MuHong Byun <mh.byun@samsung.com>
Co-authored-by: Boram Bae <boram21.bae@samsung.com>
Co-authored-by: Seungsoo Lee <seungsoo47.lee@samsung.com>
Co-authored-by: Hakkyu Kim <43136596+HakkyuKim@users.noreply.github.com>
swift-kim added a commit that referenced this pull request Nov 14, 2021
* Fix memory corruption issue (#2)
* Exit application method is replaced by 'ui_app_exit' (#3)
* Fix launch failure in sleep mode (#4)
* Fix scorll issue (#6)
* Changed EGL settings to support more Tizen devices (#5)
* Add touch events of platform view channel for tizen (#8)
* Resize egl window when software keyboard is shown (#7)
* Fix texture being not released issue (#9)
* Remove tizen_tools dependency and update BUILD.gn (#11)
* Refactor tizen surface (#10)
* Fix a crash in stop phase of Tizen engine (#12)
* Fix a crash during app shutdown (#13)
* Fix a crash when TizenVsyncWaiter is destroyed. (#15)
* Implement key events for tizen webview (#14)
* Change method name starting with lower case (#16)
* Remove not used code (#18)
* Introduce assertion macros (#17)
* Minor update to Misc (#19)
* Add azure-pipelines.yml (#20)
* Clean-up channel view resource upon exiting app (#22)
* Call a method to set imf_context in platform view channel (#24)
* Support Tizen 4.0 (#23)
* Fix a focused platform view bug (#27)
* Support screen rotations for Tizen 4.0 and Tizen 6.0 (#28)
* Separate the embedder from the engine (#29)
* Add profile build to the CI script (#30)
* Share egl context to egl resource context (#31)
* Implement message queue to handle vblank request (#32)
* Fix a platform view bug (#33)
* Convert timestamp to correct unit (#35)
* Send locales to flutter including default locale (#38)
* Enable FontConfig to improve font fallbacks (#40)

Co-authored-by: Xiaowei Guan <xiaowei.guan@samsung.com>
Co-authored-by: MuHong Byun <mh.byun@samsung.com>
Co-authored-by: Boram Bae <boram21.bae@samsung.com>
Co-authored-by: Seungsoo Lee <seungsoo47.lee@samsung.com>
Co-authored-by: Hakkyu Kim <43136596+HakkyuKim@users.noreply.github.com>
swift-kim added a commit that referenced this pull request Dec 9, 2021
* Fix memory corruption issue (#2)
* Exit application method is replaced by 'ui_app_exit' (#3)
* Fix launch failure in sleep mode (#4)
* Fix scorll issue (#6)
* Changed EGL settings to support more Tizen devices (#5)
* Add touch events of platform view channel for tizen (#8)
* Resize egl window when software keyboard is shown (#7)
* Fix texture being not released issue (#9)
* Remove tizen_tools dependency and update BUILD.gn (#11)
* Refactor tizen surface (#10)
* Fix a crash in stop phase of Tizen engine (#12)
* Fix a crash during app shutdown (#13)
* Fix a crash when TizenVsyncWaiter is destroyed. (#15)
* Implement key events for tizen webview (#14)
* Change method name starting with lower case (#16)
* Remove not used code (#18)
* Introduce assertion macros (#17)
* Minor update to Misc (#19)
* Add azure-pipelines.yml (#20)
* Clean-up channel view resource upon exiting app (#22)
* Call a method to set imf_context in platform view channel (#24)
* Support Tizen 4.0 (#23)
* Fix a focused platform view bug (#27)
* Support screen rotations for Tizen 4.0 and Tizen 6.0 (#28)
* Separate the embedder from the engine (#29)
* Add profile build to the CI script (#30)
* Share egl context to egl resource context (#31)
* Implement message queue to handle vblank request (#32)
* Fix a platform view bug (#33)
* Convert timestamp to correct unit (#35)
* Send locales to flutter including default locale (#38)
* Enable FontConfig to improve font fallbacks (#40)

Co-authored-by: Xiaowei Guan <xiaowei.guan@samsung.com>
Co-authored-by: MuHong Byun <mh.byun@samsung.com>
Co-authored-by: Boram Bae <boram21.bae@samsung.com>
Co-authored-by: Seungsoo Lee <seungsoo47.lee@samsung.com>
Co-authored-by: Hakkyu Kim <43136596+HakkyuKim@users.noreply.github.com>
swift-kim added a commit that referenced this pull request Dec 17, 2021
* Fix memory corruption issue (#2)
* Exit application method is replaced by 'ui_app_exit' (#3)
* Fix launch failure in sleep mode (#4)
* Fix scorll issue (#6)
* Changed EGL settings to support more Tizen devices (#5)
* Add touch events of platform view channel for tizen (#8)
* Resize egl window when software keyboard is shown (#7)
* Fix texture being not released issue (#9)
* Remove tizen_tools dependency and update BUILD.gn (#11)
* Refactor tizen surface (#10)
* Fix a crash in stop phase of Tizen engine (#12)
* Fix a crash during app shutdown (#13)
* Fix a crash when TizenVsyncWaiter is destroyed. (#15)
* Implement key events for tizen webview (#14)
* Change method name starting with lower case (#16)
* Remove not used code (#18)
* Introduce assertion macros (#17)
* Minor update to Misc (#19)
* Add azure-pipelines.yml (#20)
* Clean-up channel view resource upon exiting app (#22)
* Call a method to set imf_context in platform view channel (#24)
* Support Tizen 4.0 (#23)
* Fix a focused platform view bug (#27)
* Support screen rotations for Tizen 4.0 and Tizen 6.0 (#28)
* Separate the embedder from the engine (#29)
* Add profile build to the CI script (#30)
* Share egl context to egl resource context (#31)
* Implement message queue to handle vblank request (#32)
* Fix a platform view bug (#33)
* Convert timestamp to correct unit (#35)
* Send locales to flutter including default locale (#38)
* Enable FontConfig to improve font fallbacks (#40)

Co-authored-by: Xiaowei Guan <xiaowei.guan@samsung.com>
Co-authored-by: MuHong Byun <mh.byun@samsung.com>
Co-authored-by: Boram Bae <boram21.bae@samsung.com>
Co-authored-by: Seungsoo Lee <seungsoo47.lee@samsung.com>
Co-authored-by: Hakkyu Kim <43136596+HakkyuKim@users.noreply.github.com>
swift-kim added a commit that referenced this pull request Feb 7, 2022
* Fix memory corruption issue (#2)
* Exit application method is replaced by 'ui_app_exit' (#3)
* Fix launch failure in sleep mode (#4)
* Fix scorll issue (#6)
* Changed EGL settings to support more Tizen devices (#5)
* Add touch events of platform view channel for tizen (#8)
* Resize egl window when software keyboard is shown (#7)
* Fix texture being not released issue (#9)
* Remove tizen_tools dependency and update BUILD.gn (#11)
* Refactor tizen surface (#10)
* Fix a crash in stop phase of Tizen engine (#12)
* Fix a crash during app shutdown (#13)
* Fix a crash when TizenVsyncWaiter is destroyed. (#15)
* Implement key events for tizen webview (#14)
* Change method name starting with lower case (#16)
* Remove not used code (#18)
* Introduce assertion macros (#17)
* Minor update to Misc (#19)
* Add azure-pipelines.yml (#20)
* Clean-up channel view resource upon exiting app (#22)
* Call a method to set imf_context in platform view channel (#24)
* Support Tizen 4.0 (#23)
* Fix a focused platform view bug (#27)
* Support screen rotations for Tizen 4.0 and Tizen 6.0 (#28)
* Separate the embedder from the engine (#29)
* Add profile build to the CI script (#30)
* Share egl context to egl resource context (#31)
* Implement message queue to handle vblank request (#32)
* Fix a platform view bug (#33)
* Convert timestamp to correct unit (#35)
* Send locales to flutter including default locale (#38)
* Enable FontConfig to improve font fallbacks (#40)

Co-authored-by: Xiaowei Guan <xiaowei.guan@samsung.com>
Co-authored-by: MuHong Byun <mh.byun@samsung.com>
Co-authored-by: Boram Bae <boram21.bae@samsung.com>
Co-authored-by: Seungsoo Lee <seungsoo47.lee@samsung.com>
Co-authored-by: Hakkyu Kim <43136596+HakkyuKim@users.noreply.github.com>
swift-kim added a commit that referenced this pull request Feb 11, 2022
* Fix memory corruption issue (#2)
* Exit application method is replaced by 'ui_app_exit' (#3)
* Fix launch failure in sleep mode (#4)
* Fix scorll issue (#6)
* Changed EGL settings to support more Tizen devices (#5)
* Add touch events of platform view channel for tizen (#8)
* Resize egl window when software keyboard is shown (#7)
* Fix texture being not released issue (#9)
* Remove tizen_tools dependency and update BUILD.gn (#11)
* Refactor tizen surface (#10)
* Fix a crash in stop phase of Tizen engine (#12)
* Fix a crash during app shutdown (#13)
* Fix a crash when TizenVsyncWaiter is destroyed. (#15)
* Implement key events for tizen webview (#14)
* Change method name starting with lower case (#16)
* Remove not used code (#18)
* Introduce assertion macros (#17)
* Minor update to Misc (#19)
* Add azure-pipelines.yml (#20)
* Clean-up channel view resource upon exiting app (#22)
* Call a method to set imf_context in platform view channel (#24)
* Support Tizen 4.0 (#23)
* Fix a focused platform view bug (#27)
* Support screen rotations for Tizen 4.0 and Tizen 6.0 (#28)
* Separate the embedder from the engine (#29)
* Add profile build to the CI script (#30)
* Share egl context to egl resource context (#31)
* Implement message queue to handle vblank request (#32)
* Fix a platform view bug (#33)
* Convert timestamp to correct unit (#35)
* Send locales to flutter including default locale (#38)
* Enable FontConfig to improve font fallbacks (#40)

Co-authored-by: Xiaowei Guan <xiaowei.guan@samsung.com>
Co-authored-by: MuHong Byun <mh.byun@samsung.com>
Co-authored-by: Boram Bae <boram21.bae@samsung.com>
Co-authored-by: Seungsoo Lee <seungsoo47.lee@samsung.com>
Co-authored-by: Hakkyu Kim <43136596+HakkyuKim@users.noreply.github.com>
swift-kim added a commit that referenced this pull request May 12, 2022
* Fix memory corruption issue (#2)
* Exit application method is replaced by 'ui_app_exit' (#3)
* Fix launch failure in sleep mode (#4)
* Fix scorll issue (#6)
* Changed EGL settings to support more Tizen devices (#5)
* Add touch events of platform view channel for tizen (#8)
* Resize egl window when software keyboard is shown (#7)
* Fix texture being not released issue (#9)
* Remove tizen_tools dependency and update BUILD.gn (#11)
* Refactor tizen surface (#10)
* Fix a crash in stop phase of Tizen engine (#12)
* Fix a crash during app shutdown (#13)
* Fix a crash when TizenVsyncWaiter is destroyed. (#15)
* Implement key events for tizen webview (#14)
* Change method name starting with lower case (#16)
* Remove not used code (#18)
* Introduce assertion macros (#17)
* Minor update to Misc (#19)
* Add azure-pipelines.yml (#20)
* Clean-up channel view resource upon exiting app (#22)
* Call a method to set imf_context in platform view channel (#24)
* Support Tizen 4.0 (#23)
* Fix a focused platform view bug (#27)
* Support screen rotations for Tizen 4.0 and Tizen 6.0 (#28)
* Separate the embedder from the engine (#29)
* Add profile build to the CI script (#30)
* Share egl context to egl resource context (#31)
* Implement message queue to handle vblank request (#32)
* Fix a platform view bug (#33)
* Convert timestamp to correct unit (#35)
* Send locales to flutter including default locale (#38)
* Enable FontConfig to improve font fallbacks (#40)

Co-authored-by: Xiaowei Guan <xiaowei.guan@samsung.com>
Co-authored-by: MuHong Byun <mh.byun@samsung.com>
Co-authored-by: Boram Bae <boram21.bae@samsung.com>
Co-authored-by: Seungsoo Lee <seungsoo47.lee@samsung.com>
Co-authored-by: Hakkyu Kim <43136596+HakkyuKim@users.noreply.github.com>
swift-kim added a commit that referenced this pull request Aug 5, 2022
* Fix memory corruption issue (#2)
* Exit application method is replaced by 'ui_app_exit' (#3)
* Fix launch failure in sleep mode (#4)
* Fix scorll issue (#6)
* Changed EGL settings to support more Tizen devices (#5)
* Add touch events of platform view channel for tizen (#8)
* Resize egl window when software keyboard is shown (#7)
* Fix texture being not released issue (#9)
* Remove tizen_tools dependency and update BUILD.gn (#11)
* Refactor tizen surface (#10)
* Fix a crash in stop phase of Tizen engine (#12)
* Fix a crash during app shutdown (#13)
* Fix a crash when TizenVsyncWaiter is destroyed. (#15)
* Implement key events for tizen webview (#14)
* Change method name starting with lower case (#16)
* Remove not used code (#18)
* Introduce assertion macros (#17)
* Minor update to Misc (#19)
* Add azure-pipelines.yml (#20)
* Clean-up channel view resource upon exiting app (#22)
* Call a method to set imf_context in platform view channel (#24)
* Support Tizen 4.0 (#23)
* Fix a focused platform view bug (#27)
* Support screen rotations for Tizen 4.0 and Tizen 6.0 (#28)
* Separate the embedder from the engine (#29)
* Add profile build to the CI script (#30)
* Share egl context to egl resource context (#31)
* Implement message queue to handle vblank request (#32)
* Fix a platform view bug (#33)
* Convert timestamp to correct unit (#35)
* Send locales to flutter including default locale (#38)
* Enable FontConfig to improve font fallbacks (#40)

Co-authored-by: Xiaowei Guan <xiaowei.guan@samsung.com>
Co-authored-by: MuHong Byun <mh.byun@samsung.com>
Co-authored-by: Boram Bae <boram21.bae@samsung.com>
Co-authored-by: Seungsoo Lee <seungsoo47.lee@samsung.com>
Co-authored-by: Hakkyu Kim <43136596+HakkyuKim@users.noreply.github.com>
swift-kim pushed a commit that referenced this pull request Sep 1, 2022
swift-kim added a commit that referenced this pull request Sep 1, 2022
* Fix memory corruption issue (#2)
* Exit application method is replaced by 'ui_app_exit' (#3)
* Fix launch failure in sleep mode (#4)
* Fix scorll issue (#6)
* Changed EGL settings to support more Tizen devices (#5)
* Add touch events of platform view channel for tizen (#8)
* Resize egl window when software keyboard is shown (#7)
* Fix texture being not released issue (#9)
* Remove tizen_tools dependency and update BUILD.gn (#11)
* Refactor tizen surface (#10)
* Fix a crash in stop phase of Tizen engine (#12)
* Fix a crash during app shutdown (#13)
* Fix a crash when TizenVsyncWaiter is destroyed. (#15)
* Implement key events for tizen webview (#14)
* Change method name starting with lower case (#16)
* Remove not used code (#18)
* Introduce assertion macros (#17)
* Minor update to Misc (#19)
* Add azure-pipelines.yml (#20)
* Clean-up channel view resource upon exiting app (#22)
* Call a method to set imf_context in platform view channel (#24)
* Support Tizen 4.0 (#23)
* Fix a focused platform view bug (#27)
* Support screen rotations for Tizen 4.0 and Tizen 6.0 (#28)
* Separate the embedder from the engine (#29)
* Add profile build to the CI script (#30)
* Share egl context to egl resource context (#31)
* Implement message queue to handle vblank request (#32)
* Fix a platform view bug (#33)
* Convert timestamp to correct unit (#35)
* Send locales to flutter including default locale (#38)
* Enable FontConfig to improve font fallbacks (#40)

Co-authored-by: Xiaowei Guan <xiaowei.guan@samsung.com>
Co-authored-by: MuHong Byun <mh.byun@samsung.com>
Co-authored-by: Boram Bae <boram21.bae@samsung.com>
Co-authored-by: Seungsoo Lee <seungsoo47.lee@samsung.com>
Co-authored-by: Hakkyu Kim <43136596+HakkyuKim@users.noreply.github.com>
JSUYA pushed a commit to JSUYA/engine that referenced this pull request Aug 23, 2024
The culprit test asks different threads to access some stack variables, but the stack might return earlier than the threads' completion. This PR fixes it by adding latches.

This test, despite being possibly fine for now, consistently triggers the following asan error when I make some unrelated trivial changes.

The thrown error:
<details>
<pre>
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from EmbedderTest
[ RUN      ] EmbedderTest.EmbedderThreadHostUseCustomThreadConfig
=================================================================
==14398==ERROR: AddressSanitizer: stack-use-after-scope on address 0x00031833b530 at pc 0x00013248d543 bp 0x000318740390 sp 0x00031873fb58
WRITE of size 4 at 0x00031833b530 thread T2
    #0 0x13248d542 in pthread_getschedparam+0x3d2 (libclang_rt.asan_osx_dynamic.dylib:x86_64+0x2c542)
    flutter-tizen#1 0x100577671 in flutter::testing::EmbedderTest_EmbedderThreadHostUseCustomThreadConfig_Test::TestBody()::$_0::operator()() const+0x1a1 (embedder_unittests:x86_64+0x10030b671)
    flutter-tizen#2 0x1005774a2 in decltype(std::declval<flutter::testing::EmbedderTest_EmbedderThreadHostUseCustomThreadConfig_Test::TestBody()::$_0&>()()) std::_fl::__invoke[abi:v15000]<flutter::testing::EmbedderTest_EmbedderThreadHostUseCustomThreadConfig_Test::TestBody()::$_0&>(flutter::testing::EmbedderTest_EmbedderThreadHostUseCustomThreadConfig_Test::TestBody()::$_0&)+0x22 (embedder_unittests:x86_64+0x10030b4a2)
    flutter-tizen#3 0x100577402 in void std::_fl::__invoke_void_return_wrapper<void, true>::__call<flutter::testing::EmbedderTest_EmbedderThreadHostUseCustomThreadConfig_Test::TestBody()::$_0&>(flutter::testing::EmbedderTest_EmbedderThreadHostUseCustomThreadConfig_Test::TestBody()::$_0&)+0x22 (embedder_unittests:x86_64+0x10030b402)
    flutter-tizen#4 0x1005773ba in std::_fl::__function::__alloc_func<flutter::testing::EmbedderTest_EmbedderThreadHostUseCustomThreadConfig_Test::TestBody()::$_0, std::_fl::allocator<flutter::testing::EmbedderTest_EmbedderThreadHostUseCustomThreadConfig_Test::TestBody()::$_0>, void ()>::operator()[abi:v15000]()+0x2a (embedder_unittests:x86_64+0x10030b3ba)
    flutter-tizen#5 0x1005734f6 in std::_fl::__function::__func<flutter::testing::EmbedderTest_EmbedderThreadHostUseCustomThreadConfig_Test::TestBody()::$_0, std::_fl::allocator<flutter::testing::EmbedderTest_EmbedderThreadHostUseCustomThreadConfig_Test::TestBody()::$_0>, void ()>::operator()()+0x26 (embedder_unittests:x86_64+0x1003074f6)
    flutter-tizen#6 0x10066a525 in std::_fl::__function::__value_func<void ()>::operator()[abi:v15000]() const+0x105 (embedder_unittests:x86_64+0x1003fe525)
    flutter-tizen#7 0x10066a3f2 in std::_fl::function<void ()>::operator()() const+0x22 (embedder_unittests:x86_64+0x1003fe3f2)
    flutter-tizen#8 0x100c229dc in fml::MessageLoopImpl::FlushTasks(fml::FlushType)+0x37c (embedder_unittests:x86_64+0x1009b69dc)
    flutter-tizen#9 0x100c22577 in fml::MessageLoopImpl::RunExpiredTasksNow()+0x27 (embedder_unittests:x86_64+0x1009b6577)
    flutter-tizen#10 0x100c8aa2f in fml::MessageLoopDarwin::OnTimerFire(__CFRunLoopTimer*, fml::MessageLoopDarwin*)+0x2f (embedder_unittests:x86_64+0x100a1ea2f)
    flutter-tizen#11 0x7ff817b54508 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__+0x13 (CoreFoundation:x86_64+0x97508)
    flutter-tizen#12 0x7ff817b540b8 in __CFRunLoopDoTimer+0x310 (CoreFoundation:x86_64+0x970b8)
    flutter-tizen#13 0x7ff817b53ce9 in __CFRunLoopDoTimers+0x11c (CoreFoundation:x86_64+0x96ce9)
    flutter-tizen#14 0x7ff817b380ac in __CFRunLoopRun+0x83b (CoreFoundation:x86_64+0x7b0ac)
    flutter-tizen#15 0x7ff817b372a8 in CFRunLoopRunSpecific+0x22c (CoreFoundation:x86_64+0x7a2a8)
    flutter-tizen#16 0x100c8b155 in fml::MessageLoopDarwin::Run()+0x305 (embedder_unittests:x86_64+0x100a1f155)
    flutter-tizen#17 0x100c223d0 in fml::MessageLoopImpl::DoRun()+0x150 (embedder_unittests:x86_64+0x1009b63d0)
    flutter-tizen#18 0x100c1f1fa in fml::MessageLoop::Run()+0x2a (embedder_unittests:x86_64+0x1009b31fa)
    flutter-tizen#19 0x100c7baa4 in fml::Thread::Thread(std::_fl::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0::operator()() const+0x194 (embedder_unittests:x86_64+0x100a0faa4)
    flutter-tizen#20 0x100c7b8e2 in decltype(std::declval<fml::Thread::Thread(std::_fl::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0&>()()) std::_fl::__invoke[abi:v15000]<fml::Thread::Thread(std::_fl::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0&>(fml::Thread::Thread(std::_fl::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0&)+0x22 (embedder_unittests:x86_64+0x100a0f8e2)
    flutter-tizen#21 0x100c7b842 in void std::_fl::__invoke_void_return_wrapper<void, true>::__call<fml::Thread::Thread(std::_fl::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0&>(fml::Thread::Thread(std::_fl::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0&)+0x22 (embedder_unittests:x86_64+0x100a0f842)
    flutter-tizen#22 0x100c7b7fa in std::_fl::__function::__alloc_func<fml::Thread::Thread(std::_fl::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0, std::_fl::allocator<fml::Thread::Thread(std::_fl::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0>, void ()>::operator()[abi:v15000]()+0x2a (embedder_unittests:x86_64+0x100a0f7fa)
    flutter-tizen#23 0x100c77ad6 in std::_fl::__function::__func<fml::Thread::Thread(std::_fl::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0, std::_fl::allocator<fml::Thread::Thread(std::_fl::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0>, void ()>::operator()()+0x26 (embedder_unittests:x86_64+0x100a0bad6)
    flutter-tizen#24 0x10066a525 in std::_fl::__function::__value_func<void ()>::operator()[abi:v15000]() const+0x105 (embedder_unittests:x86_64+0x1003fe525)
    flutter-tizen#25 0x10066a3f2 in std::_fl::function<void ()>::operator()() const+0x22 (embedder_unittests:x86_64+0x1003fe3f2)
    flutter-tizen#26 0x100c75388 in fml::ThreadHandle::ThreadHandle(std::_fl::function<void ()>&&)::$_0::operator()(void*) const+0xe8 (embedder_unittests:x86_64+0x100a09388)
    flutter-tizen#27 0x100c75227 in fml::ThreadHandle::ThreadHandle(std::_fl::function<void ()>&&)::$_0::__invoke(void*)+0xc7 (embedder_unittests:x86_64+0x100a09227)
    flutter-tizen#28 0x1324b3e76 in asan_thread_start(void*)+0x46 (libclang_rt.asan_osx_dynamic.dylib:x86_64+0x52e76)
    flutter-tizen#29 0x7ff817a5c18a in _pthread_start+0x62 (libsystem_pthread.dylib:x86_64+0x618a)
    flutter-tizen#30 0x7ff817a57ae2 in thread_start+0xe (libsystem_pthread.dylib:x86_64+0x1ae2)

Address 0x00031833b530 is located in stack of thread T0 at offset 144 in frame
    #0 0x1002d051f in flutter::testing::EmbedderTest_EmbedderThreadHostUseCustomThreadConfig_Test::TestBody()+0xf (embedder_unittests:x86_64+0x10006451f)

  This frame has 12 object(s):
    [32, 40) 'thread_host' (line 3445)
    [64, 112) 'ref.tmp' (line 3446)
    [144, 148) 'ui_policy' (line 3449) <== Memory access at offset 144 is inside this variable
    [160, 168) 'ui_param' (line 3450)
    [192, 200) 'ref.tmp2' (line 3452)
    [224, 272) 'ref.tmp5' (line 3452)
    [304, 320) 'agg.tmp'
    [336, 340) 'io_policy' (line 3458)
    [352, 360) 'io_param' (line 3459)
    [384, 392) 'ref.tmp6' (line 3460)
    [416, 464) 'ref.tmp10' (line 3460)
    [496, 512) 'agg.tmp11'
HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork
      (longjmp and C++ exceptions *are* supported)
SUMMARY: AddressSanitizer: stack-use-after-scope (libclang_rt.asan_osx_dynamic.dylib:x86_64+0x2c542) in pthread_getschedparam+0x3d2
Shadow bytes around the buggy address:
  0x00031833b280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x00031833b300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x00031833b380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x00031833b400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x00031833b480: 00 00 00 00 f1 f1 f1 f1 00 f2 f2 f2 f8 f8 f8 f8
=>0x00031833b500: f8 f8 f2 f2 f2 f2[f8]f2 f8 f2 f2 f2 f8 f2 f2 f2
  0x00031833b580: f8 f8 f8 f8 f8 f8 f2 f2 f2 f2 00 00 f2 f2 f8 f2
  0x00031833b600: f8 f2 f2 f2 f8 f2 f2 f2 f8 f8 f8 f8 f8 f8 f2 f2
  0x00031833b680: f2 f2 00 00 f3 f3 f3 f3 00 00 00 00 00 00 00 00
  0x00031833b700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x00031833b780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
Thread T2 created by T0 here:
    #0 0x1324ae92d in pthread_create+0x5d (libclang_rt.asan_osx_dynamic.dylib:x86_64+0x4d92d)
    flutter-tizen#1 0x100c73901 in fml::ThreadHandle::ThreadHandle(std::_fl::function<void ()>&&)+0x401 (embedder_unittests:x86_64+0x100a07901)
    flutter-tizen#2 0x100c73cca in fml::ThreadHandle::ThreadHandle(std::_fl::function<void ()>&&)+0x2a (embedder_unittests:x86_64+0x100a07cca)
    flutter-tizen#3 0x100c748c9 in std::_fl::__unique_if<fml::ThreadHandle>::__unique_single std::_fl::make_unique[abi:v15000]<fml::ThreadHandle, fml::Thread::Thread(std::_fl::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0>(fml::Thread::Thread(std::_fl::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0&&)+0x149 (embedder_unittests:x86_64+0x100a088c9)
    flutter-tizen#4 0x100c74335 in fml::Thread::Thread(std::_fl::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)+0x255 (embedder_unittests:x86_64+0x100a08335)
    flutter-tizen#5 0x100c746b2 in fml::Thread::Thread(std::_fl::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)+0x32 (embedder_unittests:x86_64+0x100a086b2)
    flutter-tizen#6 0x106ee0b1a in std::_fl::__unique_if<fml::Thread>::__unique_single std::_fl::make_unique[abi:v15000]<fml::Thread, std::_fl::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig&>(std::_fl::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig&)+0x4a (embedder_unittests:x86_64+0x106c74b1a)
    flutter-tizen#7 0x106ee08e8 in flutter::ThreadHost::CreateThread(flutter::ThreadHost::Type, std::_fl::optional<fml::Thread::ThreadConfig>, flutter::ThreadHost::ThreadHostConfig const&) const+0x1b8 (embedder_unittests:x86_64+0x106c748e8)
    flutter-tizen#8 0x106ee1466 in flutter::ThreadHost::ThreadHost(flutter::ThreadHost::ThreadHostConfig const&)+0x2f6 (embedder_unittests:x86_64+0x106c75466)
    flutter-tizen#9 0x106ee19ca in flutter::ThreadHost::ThreadHost(flutter::ThreadHost::ThreadHostConfig const&)+0x2a (embedder_unittests:x86_64+0x106c759ca)
    flutter-tizen#10 0x100b6f730 in flutter::EmbedderThreadHost::CreateEngineManagedThreadHost(std::_fl::function<void (fml::Thread::ThreadConfig const&)> const&)+0x3a0 (embedder_unittests:x86_64+0x100903730)
    flutter-tizen#11 0x100b6e51c in flutter::EmbedderThreadHost::CreateEmbedderOrEngineManagedThreadHost(FlutterCustomTaskRunners const*, std::_fl::function<void (fml::Thread::ThreadConfig const&)> const&)+0xcc (embedder_unittests:x86_64+0x10090251c)
    flutter-tizen#12 0x1002d0748 in flutter::testing::EmbedderTest_EmbedderThreadHostUseCustomThreadConfig_Test::TestBody()+0x238 (embedder_unittests:x86_64+0x100064748)
    flutter-tizen#13 0x1089ce93b in void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*)+0x21b (embedder_unittests:x86_64+0x10876293b)
    flutter-tizen#14 0x108955bdf in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*)+0x2cf (embedder_unittests:x86_64+0x1086e9bdf)
    flutter-tizen#15 0x108955755 in testing::Test::Run()+0x3a5 (embedder_unittests:x86_64+0x1086e9755)
    flutter-tizen#16 0x108957b23 in testing::TestInfo::Run()+0x593 (embedder_unittests:x86_64+0x1086ebb23)
    flutter-tizen#17 0x10895a8f2 in testing::TestSuite::Run()+0x6e2 (embedder_unittests:x86_64+0x1086ee8f2)
    flutter-tizen#18 0x108977d7a in testing::internal::UnitTestImpl::RunAllTests()+0xb9a (embedder_unittests:x86_64+0x10870bd7a)
    flutter-tizen#19 0x1089ee88b in bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*)+0x21b (embedder_unittests:x86_64+0x10878288b)
    flutter-tizen#20 0x1089770ac in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*)+0x2cc (embedder_unittests:x86_64+0x10870b0ac)
    flutter-tizen#21 0x108976c3b in testing::UnitTest::Run()+0x28b (embedder_unittests:x86_64+0x10870ac3b)
    flutter-tizen#22 0x1083e45e2 in RUN_ALL_TESTS()+0x22 (embedder_unittests:x86_64+0x1081785e2)
    flutter-tizen#23 0x1083e43c8 in main+0x6e8 (embedder_unittests:x86_64+0x1081783c8)
    flutter-tizen#24 0x213ff0365  (<unknown module>)

==14398==ABORTING
[1]    14398 abort      ../out/host_debug_unopt/embedder_unittests 
</pre>
</details>

The changes I made (isolated from a larger change, therefore it doesn't seem reasonable by itself):
```diff
 // shell/common/platform_view.cc, L33

 void PlatformView::DispatchPointerDataPacket(
     std::unique_ptr<PointerDataPacket> packet) {
-  delegate_.OnPlatformViewDispatchPointerDataPacket(
-      pointer_data_packet_converter_.Convert(std::move(packet)));
+  delegate_.OnPlatformViewDispatchPointerDataPacket(std::move(packet));
 }
```

Base engine rev: de2a73c

Environment: Macbook with M1 Max Chip, OS 14.4.1

Compiling with:
```
./engine/src/flutter/tools/gn --goma --unoptimized --asan --xcode-symlinks
./depot_tools/ninja -j200 -C ./engine/src/out/host_debug_unopt
./out/host_debug_unopt/embedder_unittests
```

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
Sign up for free to 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.

5 participants