Skip to content

[Crash]: Taking a screenshot with a very stretched aspect ratio gives a double free #3811

@Semphriss

Description

@Semphriss

SuperTux Version

v0.7.0

System Information

Ubuntu 24.04

Steps To Reproduce Crash

  1. Set the aspect ratio to something very stretched, anything from 16.10 on a windowed resolution of 1280x720. The game should be visually stretched.
  2. Take a screenshot with F12.

Debugging Information (Stacktrace)

Apologies for the screenshot, I ran the code in a VM and I can't get the clipboard to work.

Image

Additional Information

I'm not sure if it really is a double free, or if that's just the consequence of another source of memory corruption. I'm also not sure at which stretching factor the issue begins.

Found using SDL3Fuzz and reproduced manually before reporting.

Guidelines For Reporting Issues

  • I have read https://github.com/SuperTux/supertux/blob/master/CONTRIBUTING.md#bug-reports.
  • I have verified this isn't an issue that's already been reported.
  • I have verified this isn't a discussion, or an issue about unintended behavior or a feature request, but rather an actual crash ─ that is, the game closed unexpectedly.
  • I have verified this issue is not about wrong translations (use Transifex for those), or anything unsupported (e.g. third-party add-ons).
  • In this report, I have only included details about one (1) crash.
  • If I make a mistake while submitting this report, I agree to use the "Edit" feature to correct it, instead of closing this issue and opening a new one.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions