Summary
Clicking a color property’s swatch in the Details panel a second time, while that property’s Color Picker is already open, leaves an undo transaction open for the rest of the editor session. Pressing OK in the new picker never ends it. While it is open, GEditor->IsTransactionActive() stays true, so everything gated on it stops; in particular PCG pauses all editor-world execution.
What Type of Bug are you experiencing?
Editor
Steps to Reproduce
- Open any level and place a Point Light.
- Select it. In the Details panel, click the Light Color swatch. The Color Picker opens.
- With the picker still open, click the same swatch again. The picker closes and a new one opens.
- Pick a color and press OK.
- Quit the editor and read the log.
Expected Result
Pressing OK ends the “Edit Light Color” transaction, and no transaction is open afterwards.
Observed Result
The transaction stays open until the editor exits, where the log says:
LogEditorTransaction: Non zero active count in UTransBuffer::Reset
While it is open, GEditor->IsTransactionActive() is true, so everything gated on it stops. In particular PCG pauses all editor-world execution while a transaction is active (pcg.PauseExecutionWhileTransactionActive, default on). In our project every room built by a PCG component and refreshed after the clicks went empty and stayed empty until the editor was restarted.
Affects Versions
5.8
Platform(s)
Mac
Additional Notes
Version: 5.8.4 (CL 58902052, ++UE5+Release-5.8), installed build, macOS 27.2 on Apple Silicon. The code involved has no platform-specific branch: FSlateApplication::RequestDestroyWindow always destroys the window immediately.
Cause, from the 5.8.4 source:
FColorStructCustomization::CreateColorPicker(ColorStructCustomization.cpp:286) begins a transaction and stores its index in the memberTransactionIndex, then callsOpenColorPicker.OpenColorPicker(SColorPicker.cpp:1465) first callsDestroyColorPicker(). That destroys the picker already open, synchronously:SWindow::RequestDestroyWindow→FSlateApplication::DestroyWindowsImmediately.- The destroyed picker’s close callback is the same row’s
OnColorPickerWindowClosed(ColorStructCustomization.cpp:480). It callsEndTransaction()once (:496), which closes one of the two nested levels, thenTransactionIndex.Reset(), which discards the index the second click has just stored. - When the new picker closes,
OnColorPickerWindowClosedfinds no index and ends nothing. The destructor’sEndTransaction()(:163) is skipped for the same reason. One level stays open.
Call stack at the old picker window’s destruction, captured with a handler on FSlateApplication::OnWindowBeingDestroyed:
SColorBlock::OnMouseButtonDown
FColorStructCustomization::OnMouseButtonDownColorBlock
FColorStructCustomization::CreateColorPicker
OpenColorPicker
DestroyColorPicker
SWindow::RequestDestroyWindow
FSlateApplication::DestroyWindowsImmediately
Clicking a different color row’s swatch while a picker is open stays balanced: the old row’s callback ends its own level and the new row’s ends the other. Only the same row overwrites its own index.
Suggested fix: destroy any open picker before beginning the new transaction, for example by calling DestroyColorPicker() at the top of FColorStructCustomization::CreateColorPicker, before BeginTransaction, so the old picker’s callback ends the old transaction and clears the index before the new one is stored. Keeping the transaction index per picker window rather than per row would also fix it.
Workaround: none in the editor UI. A plugin can repair it: on OnWindowBeingDestroyed for the Color Picker window, note the active transaction, and a frame later end it if it is still the same transaction and no picker is open. We do this.