Skip to content

Issue #11727: Fix IFS Compose crash related to undos

Alx Sa requested to merge alxsa-ifs-crash-fix into master

This patch attempts to resolve issue #11727 (closed).

As part of the color space invasion, we converted the IFS Compose colors to GeglColor. However, we forgot to initialize them when we create a new AFFElement in undo_update (). As a result, when we try to clear them out later in aff_element_free (), the plug-in crashes.

This patch resolves the issues by initializing the five GeglColors on creation.

@ajonsson Hi! I think I finally figured this one out. There's two ways to trigger it:

  1. Create more than 24 undo items (at which point it tries to delete the last one to make room for a new undo item). You can quickly do this by clicking (not holding) the plus/minus button on one of the spinners more than 24 times

  2. Click the plus/minus button on a spinner twice. Then, click the undo button at the top once. Then go back and click the plus/minus button on the of the spinners. This causes the code to overwrite one of the undos and again trigger the bug (different stack trace)

Merge request reports

Loading