Coder Social home page Coder Social logo

Comments (5)

bwikbs avatar bwikbs commented on May 14, 2024 1

After a few observations, I think this is a problem that ExternalTextureGL is not normal state when DestructionCallback is called.

From now on, the situation which textures are updated competitively seems irrelevant.

from plugins.

bbrto21 avatar bbrto21 commented on May 14, 2024

@bwikbs I guess you are right

I observed a case that calling a destruction_callback registered with FlutterOpenGLexture after ExternalTextureGL is destroyed

ExternalTextureGL is immediately destroyed in FlutterUnregisterExternalTexture, however, the destruction_callback is referencing the destroyed instance in another thread

@xuelian-bai @xiaowei-guan

from plugins.

xiaowei-guan avatar xiaowei-guan commented on May 14, 2024

@bwikbs I guess you are right

I observed a case that calling a destruction_callback registered with FlutterOpenGLexture after ExternalTextureGL is destroyed

ExternalTextureGL is immediately destroyed in FlutterUnregisterExternalTexture, however, the destruction_callback is referencing the destroyed instance in another thread

@xuelian-bai @xiaowei-guan
Ok, we check this issue.

from plugins.

bbrto21 avatar bbrto21 commented on May 14, 2024

A similar problem was found again when I test, which seems to require a mutex in the exturenal texture-related API of flutter-tizen.

(lldb) Process 947 stopped and restarted: thread 45 received signal: SIGCHLD
Process 947 stopped
* thread #22, name = 'Runner.dll', stop reason = signal SIGSEGV: invalid address (fault address: 0x14)
    frame #0: 0xb666fcec libpthread.so.0`__pthread_mutex_lock
libpthread.so.0`__pthread_mutex_lock:
->  0xb666fcec <+0>:  ldr    r3, [r0, #0xc]
    0xb666fcf0 <+4>:  movw   r2, #0x17f
    0xb666fcf4 <+8>:  push   {r4, r5, r6, lr}
    0xb666fcf8 <+12>: ands   r5, r3, #124
bt
* thread #22, name = 'Runner.dll', stop reason = signal SIGSEGV: invalid address (fault address: 0x14)
  * frame #0: 0xb666fcec libpthread.so.0`__pthread_mutex_lock
    frame #1: 0xa9ca23ac libflutter_tizen.so`std::__1::mutex::lock() + 8
    frame #2: 0xa9c81c8c libflutter_tizen.so`ExternalTextureGL::PopulateTextureWithIdentifier(unsigned int, unsigned int, FlutterOpenGLTexture*) + 28
    frame #3: 0xa84d3f10 libflutter_engine.so`std::__1::__function::__func<FlutterEngineInitialize::$_51, std::__1::allocator<FlutterEngineInitialize::$_51>, sk_sp<SkImage> (long long, GrDirectContext*, SkISize const&)>::operator()(long long&&, GrDirectContext*&&, SkISize const&) + 80
    frame #4: 0xa84dcc60 libflutter_engine.so`flutter::EmbedderExternalTextureGL::Paint(SkCanvas&, SkRect const&, bool, GrDirectContext*, SkFilterQuality) + 96
    frame #5: 0xa8807974 libflutter_engine.so`flutter::TextureLayer::Paint(flutter::Layer::PaintContext&) const + 60
    frame #6: 0xa8804dd4 libflutter_engine.so`flutter::ContainerLayer::PaintChildren(flutter::Layer::PaintContext&) const + 86
    frame #7: 0xa8807c74 libflutter_engine.so`flutter::TransformLayer::Paint(flutter::Layer::PaintContext&) const + 68
    frame #8: 0xa8804dd4 libflutter_engine.so`flutter::ContainerLayer::PaintChildren(flutter::Layer::PaintContext&) const + 86
    frame #9: 0xa8807c74 libflutter_engine.so`flutter::TransformLayer::Paint(flutter::Layer::PaintContext&) const + 68
    frame #10: 0xa8804dd4 libflutter_engine.so`flutter::ContainerLayer::PaintChildren(flutter::Layer::PaintContext&) const + 86
    frame #11: 0xa8806a92 libflutter_engine.so`flutter::PhysicalShapeLayer::Paint(flutter::Layer::PaintContext&) const + 210
    frame #12: 0xa8804dd4 libflutter_engine.so`flutter::ContainerLayer::PaintChildren(flutter::Layer::PaintContext&) const + 86
    frame #13: 0xa8807c74 libflutter_engine.so`flutter::TransformLayer::Paint(flutter::Layer::PaintContext&) const + 68
    frame #14: 0xa8804dd4 libflutter_engine.so`flutter::ContainerLayer::PaintChildren(flutter::Layer::PaintContext&) const + 86
    frame #15: 0xa8807c74 libflutter_engine.so`flutter::TransformLayer::Paint(flutter::Layer::PaintContext&) const + 68
    frame #16: 0xa8804dd4 libflutter_engine.so`flutter::ContainerLayer::PaintChildren(flutter::Layer::PaintContext&) const + 86
    frame #17: 0xa8807c74 libflutter_engine.so`flutter::TransformLayer::Paint(flutter::Layer::PaintContext&) const + 68
    frame #18: 0xa8804d76 libflutter_engine.so`flutter::ContainerLayer::Paint(flutter::Layer::PaintContext&) const + 86
    frame #19: 0xa8805b8a libflutter_engine.so`flutter::LayerTree::Paint(flutter::CompositorContext::ScopedFrame&, bool) const + 254
    frame #20: 0xa8803106 libflutter_engine.so`flutter::CompositorContext::ScopedFrame::Raster(flutter::LayerTree&, bool) + 218
    frame #21: 0xa8811a6c libflutter_engine.so`flutter::Rasterizer::DrawToSurface(flutter::LayerTree&) + 348
    frame #22: 0xa84f9d9a libflutter_engine.so`fml::MessageLoopImpl::FlushTasks(fml::FlushType) + 170
    frame #23: 0xa84fdb5c libflutter_engine.so`fml::MessageLoopLinux::Run() + 96
    frame #24: 0xa84f9cb6 libflutter_engine.so`fml::MessageLoopImpl::DoRun() + 26
    frame #25: 0xa84fd200 libflutter_engine.so`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, fml::Thread::Thread(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_0> >(void*) + 216
    frame #26: 0xb666d438 libpthread.so.0
    frame #27: 0xb6c40e28 libc.so.6

from plugins.

bbrto21 avatar bbrto21 commented on May 14, 2024

closed by flutter-tizen/engine#81

from plugins.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.