Skip to content

External texture segmentation fault #426

Closed
@barribarrier

Description

@barribarrier

I found a segmentation fault in external texture.

I triggered a crash by playing and disposing video over and over again really fast. It eventually crashes.

gdb

Thread 9 "io.flutter.rast" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffdc4006c0 (LWP 154435)]
0x00005555555ee615 in flutter::ExternalTexturePixelBuffer::PopulateTexture (this=0x555555b98070, width=1280, height=720, 
    opengl_texture=0x7fffc01dd510)
    at /home/ubuntu/flutter-embedded-linux/src/flutter/shell/platform/linux_embedded/external_texture_pixelbuffer.cc:38
39        opengl_texture->name = state_->gl_texture;

This is because UnregisterTexture and PopulateTexture are called from a different thread.
It was fixed on upstream: flutter/engine#33688. I applied the changes in that PR to my local flutter-embedded-linux and I can confirm it no longer crashes.
I can create a PR based on this but it uses fml::closure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpluginTopics of flutter plugins for embedded linux

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions