Bug 450977 - [crash] segmentation fault when closing vlc while playing audio
Summary: [crash] segmentation fault when closing vlc while playing audio
Status: RESOLVED DUPLICATE of bug 446874
Alias: None
Product: lattedock
Classification: Plasma
Component: plasmoid (show other bugs)
Version: git (master)
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Michail Vourlakos
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-28 19:52 UTC by jovaska
Modified: 2023-07-26 16:33 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Output of 'latte-dock --debug', interesting bits begin at line 368. (183.62 KB, text/x-log)
2022-02-28 19:52 UTC, jovaska
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jovaska 2022-02-28 19:52:49 UTC
Created attachment 147197 [details]
Output of 'latte-dock --debug', interesting bits begin at line 368.

SUMMARY
Latte tasks causes Latte dock to crash due to a segmentation fault when closing VLC while audio is playing. This only seems to occur with VLC as testing with Dragon and ffplay yielded no crash. The segmentation fault backtrace isn't especially useful here as it happens internally in QtQuick not Latte. Compiling QtQuick with debugging causes the problem to be caught in src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp:3133 which then raises an abort signal before the segmentation fault occurs. In the log I've attached you can see on line 368 that before this occurs, something attempts to access a texture with a NULL address. (which probably causes the segfault when the debugging statements are disabled at compile time)

STEPS TO REPRODUCE
1. Open a file that has an audio stream with VLC
2. Close the VLC window when the icon is popping up in latte-tasks (almost immediately, audio needs to be playing)
(3. Sometimes this crash occurs even when closing VLC after several minutes of playback)
NOTE: The steps above MAY not work consistently, but I haven't found a better way of triggering this crash more consistently.

OBSERVED RESULT
Latte tasks causes Latte dock to immediately crash due to a segmentation fault.

EXPECTED RESULT
Latte tasks handles the application termination normally.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 5.15.0/5.24
KDE Plasma Version: 5.24.49
KDE Frameworks Version: 5.90
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Terminal output of 'latte-dock --debug' attached below.
Comment 1 Michail Vourlakos 2022-02-28 20:10:51 UTC
Disable audio badges from Tasks advanced settings, does it crash?
Comment 2 jovaska 2022-02-28 20:36:30 UTC
(In reply to Michail Vourlakos from comment #1)
> Disable audio badges from Tasks advanced settings, does it crash?

Surprisingly enough, yes. The disabling/enabling the audio badges doesn't seem to have any effect on the crash.
Comment 3 jovaska 2022-02-28 20:43:26 UTC
Here is the segmentation fault backtrace from QtQuick when debugging is disabled at compile time in case it happens to be useful for some reason:
#0  QSGTexture::setFiltering(QSGTexture::Filtering) (this=this@entry=0x0, filter=QSGTexture::Linear)
    at qtdeclarative-5.15.2-r14/src/quick/scenegraph/coreapi/qsgtexture.cpp:576
#1  0x00007ffff7792e31 in QSGOpaqueTextureMaterialShader::updateState(QSGMaterialShader::RenderState const&, QSGMaterial*, QSGMaterial*)
    (this=this@entry=0x7fffb432e6f0, state=..., newEffect=newEffect@entry=0x7fffb41352f8, oldEffect=oldEffect@entry=0x0)
    at qtdeclarative-5.15.2-r14/src/quick/scenegraph/util/qsgtexturematerial.cpp:90
#2  0x00007ffff77930d2 in QSGTextureMaterialShader::updateState(QSGMaterialShader::RenderState const&, QSGMaterial*, QSGMaterial*) (this=0x7fffb432e6f0, state=..., newEffect=0x7fffb41352f8, oldEffect=0x0)
    at qtdeclarative-5.15.2-r14/src/quick/scenegraph/util/qsgtexturematerial.cpp:458
#3  0x00007ffff7779468 in QSGBatchRenderer::Renderer::renderMergedBatch(QSGBatchRenderer::Batch const*) (this=this@entry=0x7fffb4126e10, batch=0x7fffb4368a80)
    at qtdeclarative-5.15.2-r14/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp:3097
#4  0x00007ffff77801c0 in QSGBatchRenderer::Renderer::renderBatches() (this=this@entry=0x7fffb4126e10)
    at qtdeclarative-5.15.2-r14/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp:4066
#5  0x00007ffff778240f in QSGBatchRenderer::Renderer::render() (this=0x7fffb4126e10)
    at qtdeclarative-5.15.2-r14/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp:4363
#6  0x00007ffff77678c6 in QSGRenderer::renderScene(QSGBindable const&) (this=0x7fffb4126e10, bindable=...)
    at qtdeclarative-5.15.2-r14/src/quick/scenegraph/coreapi/qsgrenderer.cpp:264
#7  0x00007ffff7767d9d in QSGRenderer::renderScene(unsigned int) (this=0x7fffb4126e10, fboId=<optimized out>)
    at qtdeclarative-5.15.2-r14/src/quick/scenegraph/coreapi/qsgrenderer.cpp:212
#8  0x00007ffff77d0842 in QSGDefaultRenderContext::renderNextFrame(QSGRenderer*, unsigned int) (this=0x555555fe2ad0, renderer=0x7fffb4126e10, fboId=0)
    at qtdeclarative-5.15.2-r14/src/quick/scenegraph/qsgdefaultrendercontext.cpp:228
#9  0x00007ffff783e067 in QQuickWindowPrivate::renderSceneGraph(QSize const&, QSize const&) (this=this@entry=0x555555f1ebf0, size=..., surfaceSize=...)
    at qtdeclarative-5.15.2-r14/src/quick/items/qquickwindow.cpp:616
#10 0x00007ffff77df525 in QSGRenderThread::syncAndRender(QImage*) (this=this@entry=0x7fffec014630, grabImage=grabImage@entry=0x0)
    at qtdeclarative-5.15.2-r14/src/quick/scenegraph/qsgthreadedrenderloop.cpp:837
#11 0x00007ffff77e3227 in QSGRenderThread::run() (this=0x7fffec014630)
    at qtdeclarative-5.15.2-r14/src/quick/scenegraph/qsgthreadedrenderloop.cpp:1043
#12 0x00007ffff571a962 in QThreadPrivate::start(void*) (arg=0x7fffec014630)
    at qtcore-5.15.2-r14/src/corelib/thread/qthread_unix.cpp:331
#13 0x00007ffff4cd2cde in start_thread ()
    at /lib64/libpthread.so.0
#14 0x00007ffff526470f in clone ()
    at /lib64/libc.so.6
Comment 4 Michail Vourlakos 2022-03-04 08:02:58 UTC
Have you tried to clear your latte cache as proposed at: https://userbase.kde.org/LatteDock/HowToReportCrashes ?https://userbase.kde.org/LatteDock/HowToReportCrashes
Comment 5 jovaska 2022-03-04 08:40:36 UTC
(In reply to Michail Vourlakos from comment #4)
> Have you tried to clear your latte cache as proposed at:
> https://userbase.kde.org/LatteDock/HowToReportCrashes
> ?https://userbase.kde.org/LatteDock/HowToReportCrashes
Doesn't seem to have any effect.
Comment 6 Michail Vourlakos 2022-03-05 09:25:13 UTC
this is not reproducable in my system... more info are needed and way to reproduce....

1. What is your vlc version?
2. can you provide a video in google drive to demonstrate exactly how you make latte crash?
Comment 7 jovaska 2022-03-05 09:54:39 UTC
(In reply to Michail Vourlakos from comment #6)
> this is not reproducable in my system... more info are needed and way to
> reproduce....
> 
> 1. What is your vlc version?
> 2. can you provide a video in google drive to demonstrate exactly how you
> make latte crash?

I'm running VLC 3.0.16. (you can see the output of vlc --version in the video) Here's a video of how you can create the crash https://files.catbox.moe/79ymhb.mp4. (test.mp4 was generated with ffmpeg containing a black background and a sine signal in the audio channel)
Comment 8 df290 2022-03-25 20:14:39 UTC
I have VLC 3.0.17.3 and I'm experiencing this behavior whenever a video in fullscreen mode ends and the player exits fullscreen. After a second or two, latte dock crashes with a seg fault.
Comment 9 Fushan Wen 2023-07-26 16:33:55 UTC

*** This bug has been marked as a duplicate of bug 446874 ***