Skip to content

Conversation

@JSUYA
Copy link
Member

@JSUYA JSUYA commented Jul 21, 2022

DestorySurface is called more than once depending on the situation.
Add nullcheck to avoid destroying already destroyed evas_gl_ again.

related issue : #319

@swift-kim
Copy link
Member

How about setting evas_gl_ to nullptr and checking it before performing the destruction?

@swift-kim
Copy link
Member

~TizenRendererEgl failed after applying this patch. Can be reproduced in the same way as #319.

* thread #1, name = 'Runner.dll', stop reason = signal SIGABRT
  * frame #0: 0xb779ea49 [vdso]`__kernel_vsyscall + 9
    frame #1: 0xb72ad166 libc.so.6`__GI_raise + 214
    frame #2: 0xb72943ce libc.so.6`__GI_abort + 281
    frame #3: 0xb729429e libc.so.6`__assert_fail_base.cold + 17
    frame #4: 0xb72a4d06 libc.so.6`__GI___assert_fail + 86
    frame #5: 0xa82f0f47 libtpl-egl.so.1`___lldb_unnamed_symbol39$$libtpl-egl.so.1 + 1735
    frame #6: 0xa82eb692 libtpl-egl.so.1`___lldb_unnamed_symbol7$$libtpl-egl.so.1 + 146
    frame #7: 0xa82eb32e libtpl-egl.so.1`tpl_object_unreference + 94
    frame #8: 0xa834ac6d libEGL.so`___lldb_unnamed_symbol245$$libEGL.so + 109
    frame #9: 0xa834a28f libEGL.so`___lldb_unnamed_symbol210$$libEGL.so + 47
    frame #10: 0xa8348538 libEGL.so`___lldb_unnamed_symbol175$$libEGL.so + 72
    frame #11: 0xa8349251 libEGL.so`yagl_resource_release + 33
    frame #12: 0xa834a381 libEGL.so`___lldb_unnamed_symbol213$$libEGL.so + 33
    frame #13: 0xa833f6c6 libEGL.so`eglDestroySurface + 230
    frame #14: 0xa7794144 libflutter_tizen.so`flutter::TizenRendererEgl::DestroySurface() + 68
    frame #15: 0xa779376a libflutter_tizen.so`flutter::TizenRendererEgl::~TizenRendererEgl() + 42
    frame #16: 0xa7786d73 libflutter_tizen.so`flutter::FlutterTizenEngine::~FlutterTizenEngine() + 99
    frame #17: 0xa77870f2 libflutter_tizen.so`flutter::FlutterTizenEngine::~FlutterTizenEngine() + 34
    frame #18: 0xa778aa65 libflutter_tizen.so`flutter::FlutterTizenView::~FlutterTizenView() + 181
    frame #19: 0xa778aa92 libflutter_tizen.so`flutter::FlutterTizenView::~FlutterTizenView() + 34
    frame #20: 0xa7786695 libflutter_tizen.so`FlutterDesktopViewDestroy + 37

@JSUYA
Copy link
Member Author

JSUYA commented Jul 22, 2022

How about setting evas_gl_ to nullptr and checking it before performing the destruction?

I considered your idea first. However, I thought that renderer's Destroy being called twice was a problem in itself. I think it's a side effect of #304.

@JSUYA
Copy link
Member Author

JSUYA commented Jul 22, 2022

~TizenRendererEgl failed after applying this patch. Can be reproduced in the same way as #319.

oh i will check

DestorySurface is called more than once depending on the situation.
Add nullcheck to avoid destroying already destroyed evas_gl_ again.
@JSUYA JSUYA force-pushed the dev/fix_renderer_destroy_crash branch from 4614201 to 560d76a Compare July 22, 2022 04:48
@JSUYA
Copy link
Member Author

JSUYA commented Jul 22, 2022

How about setting evas_gl_ to nullptr and checking it before performing the destruction?

I considered your idea first. However, I thought that renderer's Destroy being called twice was a problem in itself. I think it's a side effect of #304.

I added null check as per your comment.
StopEngine is called twice. I will discussed again when @bbrto21 returns to the office.

@JSUYA JSUYA changed the title Remove FlutterTizenView::DestroyRenderSurface method TizenRendererEvasGL: Add nullcheck for evas_gl_ Jul 22, 2022
@bbrto21 bbrto21 merged commit 1ca5867 into flutter-tizen:flutter-3.0.0-tizen Aug 1, 2022
@JSUYA JSUYA deleted the dev/fix_renderer_destroy_crash branch August 1, 2022 01:33
swift-kim pushed a commit that referenced this pull request Aug 5, 2022
DestorySurface is called more than once depending on the situation.
Add nullcheck to avoid destroying already destroyed evas_gl_ again.
swift-kim pushed a commit that referenced this pull request Sep 1, 2022
DestorySurface is called more than once depending on the situation.
Add nullcheck to avoid destroying already destroyed evas_gl_ again.
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.

3 participants