Crash closing the Sound Preview for sounds longer than 30 s (split upload): double free in LLUIString #1106
Labels
No labels
amd
avatars
bug
builder
cannot-reproduce
crash
epic
feature
from-viewer
gl-removal
known-limitation
monitoring
parity
perf
platform
priority
critical
priority
high
priority
low
priority
medium
provenance
rendering
rt
status
in-progress
status
testing
status
up-next
triage
ui
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sky_line/Slipstream#1106
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closing the Sound Preview for a sound longer than 30 s crashes the viewer (heap double free), whether you upload (split upload, #807) or cancel. Affects 1.4.2, 1.4.3, 1.5.0 Beta 2 and Beta 3. Sounds under 30 s are not affected.
Root cause (stack recovered from the core dump):
LLAppViewer::idle -> LLMortician::updateClass -> ~LLFloaterSoundPreview -> LLView::deleteAllChildren -> ~LLButton -> ~LLUIString -> double free.LLUIStringowns its argument map through a raw pointer but used the default shallow copy. The preview's OK button gets a label argument (setLabelArg("[AMOUNT]")); for a clip over 30 s,updateAudioInforelabels it withsetLabel(), which copies one label string into the other, so both share one argument map and the button deletes it twice when the floater is destroyed. No upload reaches the server before the crash (the abort lands before part 1's POST).Fix:
LLUIStringdeep-copies its argument map (copy constructor + assignment), which removes the whole bug class for every widget.Also in this change (owner request): the length of the last clip is shown in the preview text, the confirmation, the done notification, and the copied LSL list (
float clip_seconds,float last_clip_seconds), so it can be used in playback scripts.Fixed in 1.4.4 (released). Also on release/1.5 for the next beta and on main (Jetstream).