Skip to content

Windows crash #32

@Vera-Spoettl

Description

@Vera-Spoettl

Hi @Knightro63,

we are experiencing windows crashes from time to time. I have a dump file which is just huge (880 MB).

As I haven't got enough knowledge to analyse it myself, I used a GPT which came to the following conclusion:

🧠 Summary: Crash Analysis of flutter_angle_plugin

📍 Root Cause:
The app crashed due to a stack buffer overrun, indicated by the exception 0xC0000409 (FAST_FAIL_FATAL_APP_EXIT), which originated inside the flutter_angle_plugin.dll.


🔥 Crash Highlights

Detail | Info -- | -- Exception Code | 0xC0000409 (Security check failure / Stack buffer overrun) Failing Module | flutter_angle_plugin.dll Failing Function | Inside flutter_angle_plugin, likely during texture registration Call Stack Origin | VCRUNTIME140!_CxxThrowException → flutter_angle_plugin → flutter_windows Symbol Name | ucrtbase!abort+0x4e (triggered by std::terminate or __fastfail) Subcode | 0x7 (FAST_FAIL_FATAL_APP_EXIT)

🔍 Suspected Fault Area

The crash occurred during execution of:

flutter_windows!FlutterDesktopTextureRegistrarMarkExternalTextureFrameAvailable

This function is heavily involved in external texture handling, suggesting that your plugin may be:

  • Writing outside stack buffer bounds.

  • Passing invalid or null pointers.

  • Mishandling memory used for texture frames.


✅ Action Items for flutter_angle_plugin

  1. Audit All Buffer Usage

    • Check for stack-allocated arrays or buffers used without proper bounds checking.

    • Review uses of memcpy, strcpy, sprintf, etc.

  2. Validate All Inputs

    • Ensure texture pointers, frame dimensions, and GPU resources are checked before use.

  3. Catch Exceptions Early

    • Wrap calls in try-catch blocks (especially near GPU or system calls).

    • Avoid uncaught std::runtime_error, std::out_of_range, etc.

  4. Use Debugging Tools

    • Enable Address Sanitizer (ASan) or /GS stack security checks.

    • Use Visual Studio Application Verifier to catch buffer overruns.

  5. Improve Symbol Loading (Optional)

    • If available, load .pdb files for the plugin to get source-level stack traces in WinDbg.


Does this make sense to you?

I'll fork and implement whatever the GPT suggests and test with our app. In case that the crashes get less, I'll make a PR. OK?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions