vcmi icon indicating copy to clipboard operation
vcmi copied to clipboard

Segfault in CVideoHandler.cpp:123 FFMpegStream::openCodec()

Open Alexander-Wilms opened this issue 1 year ago • 3 comments

Describe the bug VCMI crashes when one tries to turn a page in the spellbook

Game logs VCMI_Client_log.txt

To Reproduce Steps to reproduce the behavior:

  1. Start All for One
  2. Collect spell
  3. Start a battle
  4. Open spell book
  5. Try to turn a page

Expected behavior Page turn animation plays

Actual behavior

Thread 1 "vcmiclient" received signal SIGSEGV, Segmentation fault.
0x000000000060279b in FFMpegStream::openCodec (this=this@entry=0x7fffffffcd80, desiredStreamIndex=-1) at /home/alexander/Technik/Development/vcmi/client/media/CVideoHandler.cpp:123
123             codec = avcodec_find_decoder(formatContext->streams[streamIndex]->codecpar->codec_id);
Missing separate debuginfos, use: zypper install Mesa-dri-debuginfo-24.0.9-1699.381.pm.1.x86_64 Mesa-libGL1-debuginfo-24.0.9-1699.381.pm.1.x86_64 Mesa-libglapi0-debuginfo-24.0.9-1699.381.pm.1.x86_64 krb5-debuginfo-1.21.2-5.1.x86_64 libFLAC12-x86-64-v3-debuginfo-1.4.3-1.5.x86_64 libLLVM18-debuginfo-18.1.6-1.1.x86_64 libSvtAv1Enc2-debuginfo-2.1.0-1.1.x86_64 libX11-6-debuginfo-1.8.9-1.1.x86_64 libX11-xcb1-debuginfo-1.8.9-1.1.x86_64 libXau6-debuginfo-1.0.11-1.5.x86_64 libXcursor1-debuginfo-1.2.2-1.2.x86_64 libXext6-debuginfo-1.3.6-1.2.x86_64 libXi6-debuginfo-1.8.1-1.3.x86_64 libXrandr2-debuginfo-1.5.4-1.3.x86_64 libXrender1-debuginfo-0.9.11-1.4.x86_64 libXss1-debuginfo-1.2.4-1.4.x86_64 libXxf86vm1-debuginfo-1.1.5-1.4.x86_64 libaom3-debuginfo-3.7.1-1.3.x86_64 libasound2-debuginfo-1.2.12-1.1.x86_64 libavcodec58_134-debuginfo-4.4.4-1699.18.pm.8.x86_64 libavformat58_76-debuginfo-4.4.4-1699.18.pm.8.x86_64 libavutil56_70-debuginfo-4.4.4-1699.18.pm.8.x86_64 libbluray2-debuginfo-1.3.4-2.3.x86_64 libboost_atomic1_85_0-x86-64-v3-debuginfo-1.85.0-1.2.x86_64 libboost_chrono1_85_0-debuginfo-1.85.0-1.2.x86_64 libboost_date_time1_85_0-x86-64-v3-debuginfo-1.85.0-1.2.x86_64 libboost_filesystem1_85_0-x86-64-v3-debuginfo-1.85.0-1.2.x86_64 libboost_locale1_85_0-x86-64-v3-debuginfo-1.85.0-1.2.x86_64 libboost_program_options1_85_0-x86-64-v3-debuginfo-1.85.0-1.2.x86_64 libboost_thread1_85_0-x86-64-v3-debuginfo-1.85.0-1.2.x86_64 libbrotlicommon1-x86-64-v3-debuginfo-1.1.0-1.3.x86_64 libbrotlidec1-x86-64-v3-debuginfo-1.1.0-1.3.x86_64 libbz2-1-x86-64-v3-debuginfo-1.0.8-5.10.x86_64 libcap2-debuginfo-2.70-1.1.x86_64 libcelt0-2-debuginfo-0.11.3-1.34.x86_64 libcodec2-1_2-debuginfo-1.2.0-1.4.x86_64 libcom_err2-debuginfo-1.47.0-4.2.x86_64 libdav1d7-debuginfo-1.4.3-1.1.x86_64 libdbus-1-3-debuginfo-1.14.10-2.3.x86_64 libdrm2-debuginfo-2.4.121-1.1.x86_64 libdrm_amdgpu1-debuginfo-2.4.121-1.1.x86_64 libdrm_intel1-debuginfo-2.4.121-1.1.x86_64 libdrm_nouveau2-debuginfo-2.4.121-1.1.x86_64 libdrm_radeon1-debuginfo-2.4.121-1.1.x86_64 libelf1-debuginfo-0.191-2.1.x86_64 libfluidsynth3-debuginfo-2.3.5-1.1.x86_64 libfontconfig1-debuginfo-2.15.0-1.1.x86_64 libfreetype6-debuginfo-2.13.2-2.2.x86_64 libgcc_s1-debuginfo-14.1.0+git10173-1.1.x86_64 libgcrypt20-x86-64-v3-debuginfo-1.10.3-3.3.x86_64 libglib-2_0-0-debuginfo-2.80.3-1.1.x86_64 libglvnd-debuginfo-1.7.0-1.3.x86_64 libgmodule-2_0-0-debuginfo-2.80.3-1.1.x86_64 libgmp10-debuginfo-6.3.0-3.2.x86_64 libgnutls30-debuginfo-3.8.5-1.1.x86_64 libgobject-2_0-0-debuginfo-2.80.3-1.1.x86_64 libgomp1-debuginfo-14.1.0+git10173-1.1.x86_64 libgsm1-debuginfo-1.0.22-2.2.x86_64 libhogweed6-x86-64-v3-debuginfo-3.9.1-2.5.x86_64 libidn2-0-debuginfo-2.3.7-1.2.x86_64 libinstpatch-1_0-2-debuginfo-1.1.6-2.10.x86_64 libjack0-debuginfo-1.9.22-3.1.x86_64 libjansson4-debuginfo-2.14-1.9.x86_64 libjbig2-debuginfo-2.1-5.3.x86_64 libjitterentropy3-debuginfo-3.4.1-4.2.x86_64 libjpeg8-x86-64-v3-debuginfo-8.3.2-79.2.x86_64 libldb2-debuginfo-2.9.0-1.1.x86_64 liblz4-1-x86-64-v3-debuginfo-1.9.4-2.8.x86_64 liblzma5-x86-64-v3-debuginfo-5.6.2-1.1.x86_64 libmp3lame0-x86-64-v3-debuginfo-3.100-5.9.x86_64 libmpg123-0-debuginfo-1.32.6-1.1.x86_64 libnettle8-x86-64-v3-debuginfo-3.9.1-2.5.x86_64 libnuma1-debuginfo-2.0.18.0.g3871b1c-2.2.x86_64 libogg0-debuginfo-1.3.5-2.1.x86_64 libopencore-amrnb0-debuginfo-0.1.6-1.5.x86_64 libopencore-amrwb0-debuginfo-0.1.6-1.5.x86_64 libopenjp2-7-x86-64-v3-debuginfo-2.5.2-1.2.x86_64 libopenmpt0-debuginfo-0.7.8-1.1.x86_64 libopenssl3-x86-64-v3-debuginfo-3.1.4-9.1.x86_64 libopus0-debuginfo-1.5.2-1.1.x86_64 libp11-kit0-debuginfo-0.25.3-1.3.x86_64 libpgm-5_3-0-debuginfo-5.3.128-2.3.x86_64 librav1e0_6-debuginfo-0.6.6-1.3.x86_64 libselinux1-debuginfo-3.6-1.3.x86_64 libsharpyuv0-debuginfo-1.3.2-2.3.x86_64 libsndfile1-debuginfo-1.2.2-2.3.x86_64 libsoxr0-debuginfo-0.1.3-2.18.x86_64 libssh4-debuginfo-0.10.6-2.1.x86_64 libstdc++6-debuginfo-14.1.0+git10173-1.1.x86_64 libswscale5_9-debuginfo-4.4.4-1699.18.pm.8.x86_64 libtdb1-debuginfo-1.4.10-1.1.x86_64 libtheoradec1-debuginfo-1.1.1-30.12.x86_64 libtheoraenc1-debuginfo-1.1.1-30.12.x86_64 libtiff6-debuginfo-4.6.0-4.3.x86_64 libudev1-debuginfo-255.7-2.1.x86_64 libva-drm2-debuginfo-2.21.0-1.1.x86_64 libva2-debuginfo-2.21.0-1.1.x86_64 libvdpau1-debuginfo-1.5-2.2.x86_64 libvo-amrwbenc0-debuginfo-0.1.3+5-1.4.x86_64 libvorbis0-x86-64-v3-debuginfo-1.3.7-5.1.x86_64 libvorbisenc2-x86-64-v3-debuginfo-1.3.7-5.1.x86_64 libvorbisfile3-x86-64-v3-debuginfo-1.3.7-5.1.x86_64 libvpx9-debuginfo-1.14.0-1.1.x86_64 libvulkan1-debuginfo-1.3.283.0-1.1.x86_64 libwebp7-debuginfo-1.3.2-2.3.x86_64 libwebpdemux2-debuginfo-1.3.2-2.3.x86_64 libwebpmux3-debuginfo-1.3.2-2.3.x86_64 libx264-164-debuginfo-0.164+git20220602.baee400f-1699.1.pm.25.x86_64 libxcb-dri2-0-debuginfo-1.17.0-1.1.x86_64 libxcb-dri3-0-debuginfo-1.17.0-1.1.x86_64 libxcb-glx0-debuginfo-1.17.0-1.1.x86_64 libxcb-randr0-debuginfo-1.17.0-1.1.x86_64 libxcb-shm0-debuginfo-1.17.0-1.1.x86_64 libxcb-xfixes0-debuginfo-1.17.0-1.1.x86_64 libxcb1-debuginfo-1.17.0-1.1.x86_64 libxml2-2-debuginfo-2.12.8-1.1.x86_64 libxmp4-debuginfo-4.6.0-1.3.x86_64 libxshmfence1-debuginfo-1.3.2-1.4.x86_64 libxvidcore4-debuginfo-1.3.7-1699.1.pm.69.x86_64 libz1-x86-64-v3-debuginfo-1.3.1-1.1.x86_64 libzmq5-debuginfo-4.3.5-1.4.x86_64 libzvbi0-debuginfo-0.2.42-3.1.x86_64 samba-client-libs-debuginfo-4.20.1+git.339.cf6e153bb2-1.1.x86_64
(gdb) bt
#0  0x000000000060279b in FFMpegStream::openCodec(int) (this=this@entry=0x7fffffffcd80, desiredStreamIndex=-1) at /home/alexander/Technik/Development/vcmi/client/media/CVideoHandler.cpp:123
#1  0x0000000000603437 in CAudioInstance::extractAudio(ResourcePathTempl<(EResType)9> const&) (this=this@entry=0x7fffffffcd80, videoToOpen=...) at /home/alexander/Technik/Development/vcmi/client/media/CVideoHandler.cpp:497
#2  0x00000000006038b7 in CVideoPlayer::openAndPlayVideoImpl(ResourcePathTempl<(EResType)9> const&, Point const&, bool, bool, bool) (this=<optimized out>, name=..., position=..., useOverlay=false, scale=false, stopOnKey=false)
    at /home/alexander/Technik/Development/vcmi/client/media/CVideoHandler.cpp:578
#3  0x00000000007619b4 in CSpellWindow::turnPageRight() (this=this@entry=0x2246d40) at /home/alexander/Technik/Development/vcmi/client/windows/CSpellWindow.cpp:533
#4  0x000000000076774d in CSpellWindow::selectSchool(int) (this=0x2246d40, school=0) at /home/alexander/Technik/Development/vcmi/client/windows/CSpellWindow.cpp:398
#5  0x0000000000556ac8 in EventDispatcher::handleLeftButtonClick(Point const&, int, bool) (this=0xa98b50, position=..., tolerance=<optimized out>, isPressed=isPressed@entry=true) at /home/alexander/Technik/Development/vcmi/client/gui/EventDispatcher.cpp:232
#6  0x0000000000556b2a in EventDispatcher::dispatchMouseLeftButtonPressed(Point const&, int) (this=<optimized out>, position=<optimized out>, tolerance=<optimized out>) at /home/alexander/Technik/Development/vcmi/client/gui/EventDispatcher.cpp:140
#7  0x000000000054c97d in InputSourceMouse::handleEventMouseButtonDown(SDL_MouseButtonEvent const&) (this=0x1be8620, button=<optimized out>) at /home/alexander/Technik/Development/vcmi/client/eventsSDL/InputSourceMouse.cpp:56
#8  0x00000000005493ab in InputHandler::processEvents() (this=0x1b934b0) at /home/alexander/Technik/Development/vcmi/client/eventsSDL/InputHandler.cpp:125
#9  0x0000000000550f44 in CGuiHandler::handleEvents() (this=<optimized out>) at /home/alexander/Technik/Development/vcmi/client/gui/CGuiHandler.cpp:91
#10 0x00000000007d2225 in CPlayerInterface::update() (this=0x7fffa999bfa0) at /home/alexander/Technik/Development/vcmi/client/CPlayerInterface.cpp:1501
#11 0x0000000000552595 in CGuiHandler::renderFrame() (this=0xa6bca0 <GH>) at /home/alexander/Technik/Development/vcmi/client/gui/CGuiHandler.cpp:117
#12 0x000000000049e054 in mainLoop () at /home/alexander/Technik/Development/vcmi/client/CMT.cpp:418
#13 main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /home/alexander/Technik/Development/vcmi/client/CMT.cpp:381

Did it work earlier? Yes

Screenshots na

Version

  • OS: openSUSE Tumbleweed 20240614
  • Version: 3a602bd3d40afe2b57097468667c20cd6f9cad05

Additional context

log
cd ../vcmi && git log --name-status HEAD^..HEAD && cd ../vcmi-build && cmake --build . -- -j8 && gdb ./bin/vcmiclient
[  2%] Built target VCMI_lrelease
-- -- -- Start of Git information
-- GIT_SHA1: 3a602bd3d40afe2b57097468667c20cd6f9cad05
-- -- -- End of Git information
[  4%] Built target vcmilauncher_vcmilauncher_translations
[  4%] Built target manpage
[  5%] Built target VCMI_lrelease1
[  5%] Built target minizip
[  5%] Built target update_version
[  6%] Built target vcmieditor_vcmieditor_translations
[ 17%] Built target fl-obj
[ 22%] Built target innoextract
[ 23%] Built target fl-static
[ 53%] Built target vcmi
[ 53%] Built target vcmieditor_autogen_timestamp_deps
[ 53%] Built target vcmilauncher_autogen_timestamp_deps
[ 54%] Built target StupidAI
[ 54%] Built target BattleAI
[ 55%] Built target EmptyAI
[ 58%] Built target vcmiservercommon
[ 63%] Built target VCAI
[ 63%] Built target vcmilauncher_autogen
[ 63%] Built target vcmiserver
[ 64%] Built target vcmieditor_autogen
[ 72%] Built target Nullkiller
[ 75%] Built target vcmilauncher
[ 80%] Built target vcmieditor
[100%] Built target vcmiclient
GNU gdb (GDB; openSUSE Tumbleweed) 13.2
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-suse-linux".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://bugs.opensuse.org/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./bin/vcmiclient...
(gdb) run
Starting program: /home/alexander/Technik/Development/vcmi-build/bin/vcmiclient 
Missing separate debuginfos, use: zypper install glibc-debuginfo-2.39-9.1.x86_64                                                                                                                                                                                       
[Thread debugging using libthread_db enabled]                                                                                                                                                                                                                          
Using host libthread_db library "/lib64/libthread_db.so.1".
Starting...                                                                                                                                                                                                                                                            
[New Thread 0x7fffee8006c0 (LWP 18479)]
Starting client of 'VCMI 1.6.0.3a602bd3d40afe2b57097468667c20cd6f9cad05'
Creating console and configuring logger: 0 ms
The log file will be saved to "/home/alexander/.cache/vcmi/VCMI_Client_log.txt"
        Initialization: 5 ms
        Data loading: 66 ms
        Mod handler: 2 ms
        Mod filesystems: 17 ms
Initialized logging system based on settings successfully.
[log level] ai => not set
[log level] animation => not set
[log level] bonus => not set
[log level] global => trace
[log level] mod => not set
[log level] network => not set
[New Thread 0x7fffede006c0 (LWP 18480)]
[New Thread 0x7fffed0006c0 (LWP 18481)]                                                                                                                                                                                                                                
[New Thread 0x7fffee8c96c0 (LWP 18482)]
Found 4 render drivers                                                                                                                                                                                                                                                 
        opengl (active)
        opengles2
        opengles
        software
[New Thread 0x7fffc66006c0 (LWP 18483)]                                                                                                                                                                                                                                
[New Thread 0x7fffc5c006c0 (LWP 18484)]
[New Thread 0x7fffc52006c0 (LWP 18485)]
[New Thread 0x7fffbfe006c0 (LWP 18486)]
[Thread 0x7fffbfe006c0 (LWP 18486) exited]
[Thread 0x7fffc52006c0 (LWP 18485) exited]
[New Thread 0x7fffc52006c0 (LWP 18487)]
[New Thread 0x7fffbfe006c0 (LWP 18488)]
Created renderer opengl
[New Thread 0x7fffbdc006c0 (LWP 18497)]
Starting network thread
        Initializing video: 247 ms
[New Thread 0x7fffbd2006c0 (LWP 18498)]
Initializing screen and sound handling: 5 ms
[New Thread 0x7fffb3e006c0 (LWP 18501)]
                 Game Settings handler: 0 ms
                 General text handler: 22 ms                                                                                                                                                                                                                           
                 Bonus type handler: 5 ms
                 Road handler: 0 ms
                 River handler: 0 ms
                 Terrain handler: 0 ms
                 Hero handler: 0 ms
                 Hero classes handler: 0 ms
                 Artifact handler: 0 ms
                 Creature handler: 0 ms
                 Town handler: 0 ms
                 Obstacle set handler: 0 ms
                 Object handler: 0 ms
                 Object types information handler: 0 ms
                 Spell handler: 0 ms
                 Skill handler: 0 ms
                 Terrain view pattern handler: 1 ms
                 Template handler: 0 ms
                 Battlefields handler: 0 ms
                 Obstacles handler: 0 ms
        Initializing handlers: 30 ms
        Initializing content handler: 0 ms
                [134eeccf]core
Sleeping for 12
                [588170a3]VCMI essential files
                [7598e7ce]VCMI extras
                [a2a36d67]Revisit object button
                [e832e409]Arrow Tower Icons
                [3c4b0762]Battlefield actions
                [d5c25cf7]Andruids Bonus Icons
                [e141fef4]Extended lobby options
                [bcc770e7]VCMI Quick Exchange
                [3e5c3d6c]Bonus Icons
                [19519452]Spell Immunity Bonus Icons
        Parsing mod data: 190 ms
Sleeping for 24
Unable to find localization for string 'faction.core.castle.description'
Unable to find localization for string 'faction.core.conflux.description'
Unable to find localization for string 'faction.core.dungeon.description'
Unable to find localization for string 'faction.core.fortress.description'
Unable to find localization for string 'faction.core.inferno.description'
Unable to find localization for string 'faction.core.necropolis.description'
Unable to find localization for string 'faction.core.neutral.description'
Unable to find localization for string 'faction.core.rampart.description'
Unable to find localization for string 'faction.core.stronghold.description'
Unable to find localization for string 'faction.core.tower.description'
Duplicate obstacle template: clrdelt1
Duplicate obstacle template: clrdelt1
Duplicate obstacle template: clrdelt2
Duplicate obstacle template: clrdelt2
Duplicate obstacle template: clrdelt3
Duplicate obstacle template: clrdelt3
Duplicate obstacle template: clrdelt4
Duplicate obstacle template: clrdelt4
Duplicate obstacle template: muddelt1
Duplicate obstacle template: muddelt1
Duplicate obstacle template: muddelt2
Duplicate obstacle template: muddelt2
Duplicate obstacle template: muddelt3
Duplicate obstacle template: muddelt3
Duplicate obstacle template: muddelt4
Duplicate obstacle template: muddelt4
Sleeping for 36
                [SKIP] core
                [SKIP] VCMI essential files
                [SKIP] VCMI extras
                [SKIP] Revisit object button
                [SKIP] Arrow Tower Icons
                [SKIP] Battlefield actions
                [SKIP] Andruids Bonus Icons
                [SKIP] Extended lobby options
                [SKIP] VCMI Quick Exchange
                [SKIP] Bonus Icons
                [SKIP] Spell Immunity Bonus Icons
        Loading mod data: 130 ms
        Resolving identifiers: 19 ms
Obstacle template AVLklp20.def blocks no tiles, removing it
Obstacle template AVLklp10.def blocks no tiles, removing it
Obstacle template AVLct6g0.def blocks no tiles, removing it
Obstacle template AVLct4g0.def blocks no tiles, removing it
Obstacle set 65 is empty, removing it
No templates found for core:artifact:core:spellBook
No templates found for core:artifact:core:spellScroll
No templates found for core:artifact:core:grail
No templates found for core:artifact:core:catapult
No templates found for core:artifact:core:ballista
No templates found for core:artifact:core:ammoCart
No templates found for core:artifact:core:firstAidTent
No templates found for core:artifact:core:unusedArtifact1
No templates found for core:artifact:core:unusedArtifact2
No templates found for core:artifact:core:unusedArtifact3
        Handlers post-load finalization: 15 ms 
        All game content loaded in 356 ms
Initializing VCMI_Lib: 386 ms
[Thread 0x7fffb3e006c0 (LWP 18501) exited]
Sleeping for 35
Sleeping for 37
Sleeping for 37
Sleeping for 35
Sleeping for 7
Sleeping for 35
Sleeping for 36
Sleeping for 33
Sleeping for 37
Sleeping for 6
Sleeping for 37
Sleeping for 37
Sleeping for 37
Sleeping for 35
Sleeping for 3
Sleeping for 36
Sleeping for 36
Sleeping for 38
Sleeping for -5
Sleeping for 33
Screen handler: 3 ms
Message handler: 0 ms
Initialization of VCMI (together): 1453 ms
Port 3030 will be used
Listening for connections at port 3030
[New Thread 0x7fffb3e006c0 (LWP 18512)]
Establishing connection to 127.0.0.1:3030...
[New Thread 0x7fffb0c006c0 (LWP 18513)]
We got a new connection! :)
Connection established
Connection with client 1 established. UUID: 
Client 1 player: Player
system says: Player (pid  cid 1) joins the game
Error: accessing unavailable frame 0:3 in CAnimation!
Error: accessing unavailable frame 0:3 in CAnimation!
Error: accessing unavailable frame 0:3 in CAnimation!
Error: accessing unavailable frame 0:3 in CAnimation!
Error: accessing unavailable frame 0:3 in CAnimation!
Error: accessing unavailable frame 0:3 in CAnimation!
[New Thread 0x7fffa7e006c0 (LWP 18518)]
Preparing to start new game
Gamestate created!
        Using random seed: 2041984793
Open map file: MAPS/ALL FOR ONE
Map loaded!
        Our checksum for the map: 3194223894
Seed after init is 1649644125 (before was 2041984793)
Gamestate initialized!
[Thread 0x7fffa7e006c0 (LWP 18518) exited]
Connection 1 will handle 4 player: -1 0 1 2 
Preparing environment for player neutral
Preparing environment for player red
Preparing environment for player blue
Preparing environment for player tan
Preparing interface for player red
Player red will be lead by human
Preparing interface for player blue
Player blue will be lead by Nullkiller
Opening Nullkiller
warning: Could not load shared library symbols for ./AI/libNullkiller.so.
Do you need "set solib-search-path" or "set sysroot"?
Loaded Nullkiller                                                                                                                                                                                                                                                      
Preparing interface for player tan
Player tan will be lead by Nullkiller
Opening Nullkiller
Loaded Nullkiller
Opening StupidAI
warning: Could not load shared library symbols for ./AI/libStupidAI.so.
Do you need "set solib-search-path" or "set sysroot"?
Loaded Stupid AI 0.1
LoadFrame error: Request for frame not present in CAnimation! File name: SPRITES/PortraitsLarge, Group: 0, Frame: 156
LoadFrame error: Request for frame not present in CAnimation! File name: SPRITES/PortraitsLarge, Group: 0, Frame: 157

Thread 1 "vcmiclient" received signal SIGSEGV, Segmentation fault.
0x000000000060279b in FFMpegStream::openCodec (this=this@entry=0x7fffffffcd80, desiredStreamIndex=-1) at /home/alexander/Technik/Development/vcmi/client/media/CVideoHandler.cpp:123
123             codec = avcodec_find_decoder(formatContext->streams[streamIndex]->codecpar->codec_id);
Missing separate debuginfos, use: zypper install Mesa-dri-debuginfo-24.0.9-1699.381.pm.1.x86_64 Mesa-libGL1-debuginfo-24.0.9-1699.381.pm.1.x86_64 Mesa-libglapi0-debuginfo-24.0.9-1699.381.pm.1.x86_64 krb5-debuginfo-1.21.2-5.1.x86_64 libFLAC12-x86-64-v3-debuginfo-1.4.3-1.5.x86_64 libLLVM18-debuginfo-18.1.6-1.1.x86_64 libSvtAv1Enc2-debuginfo-2.1.0-1.1.x86_64 libX11-6-debuginfo-1.8.9-1.1.x86_64 libX11-xcb1-debuginfo-1.8.9-1.1.x86_64 libXau6-debuginfo-1.0.11-1.5.x86_64 libXcursor1-debuginfo-1.2.2-1.2.x86_64 libXext6-debuginfo-1.3.6-1.2.x86_64 libXi6-debuginfo-1.8.1-1.3.x86_64 libXrandr2-debuginfo-1.5.4-1.3.x86_64 libXrender1-debuginfo-0.9.11-1.4.x86_64 libXss1-debuginfo-1.2.4-1.4.x86_64 libXxf86vm1-debuginfo-1.1.5-1.4.x86_64 libaom3-debuginfo-3.7.1-1.3.x86_64 libasound2-debuginfo-1.2.12-1.1.x86_64 libavcodec58_134-debuginfo-4.4.4-1699.18.pm.8.x86_64 libavformat58_76-debuginfo-4.4.4-1699.18.pm.8.x86_64 libavutil56_70-debuginfo-4.4.4-1699.18.pm.8.x86_64 libbluray2-debuginfo-1.3.4-2.3.x86_64 libboost_atomic1_85_0-x86-64-v3-debuginfo-1.85.0-1.2.x86_64 libboost_chrono1_85_0-debuginfo-1.85.0-1.2.x86_64 libboost_date_time1_85_0-x86-64-v3-debuginfo-1.85.0-1.2.x86_64 libboost_filesystem1_85_0-x86-64-v3-debuginfo-1.85.0-1.2.x86_64 libboost_locale1_85_0-x86-64-v3-debuginfo-1.85.0-1.2.x86_64 libboost_program_options1_85_0-x86-64-v3-debuginfo-1.85.0-1.2.x86_64 libboost_thread1_85_0-x86-64-v3-debuginfo-1.85.0-1.2.x86_64 libbrotlicommon1-x86-64-v3-debuginfo-1.1.0-1.3.x86_64 libbrotlidec1-x86-64-v3-debuginfo-1.1.0-1.3.x86_64 libbz2-1-x86-64-v3-debuginfo-1.0.8-5.10.x86_64 libcap2-debuginfo-2.70-1.1.x86_64 libcelt0-2-debuginfo-0.11.3-1.34.x86_64 libcodec2-1_2-debuginfo-1.2.0-1.4.x86_64 libcom_err2-debuginfo-1.47.0-4.2.x86_64 libdav1d7-debuginfo-1.4.3-1.1.x86_64 libdbus-1-3-debuginfo-1.14.10-2.3.x86_64 libdrm2-debuginfo-2.4.121-1.1.x86_64 libdrm_amdgpu1-debuginfo-2.4.121-1.1.x86_64 libdrm_intel1-debuginfo-2.4.121-1.1.x86_64 libdrm_nouveau2-debuginfo-2.4.121-1.1.x86_64 libdrm_radeon1-debuginfo-2.4.121-1.1.x86_64 libelf1-debuginfo-0.191-2.1.x86_64 libfluidsynth3-debuginfo-2.3.5-1.1.x86_64 libfontconfig1-debuginfo-2.15.0-1.1.x86_64 libfreetype6-debuginfo-2.13.2-2.2.x86_64 libgcc_s1-debuginfo-14.1.0+git10173-1.1.x86_64 libgcrypt20-x86-64-v3-debuginfo-1.10.3-3.3.x86_64 libglib-2_0-0-debuginfo-2.80.3-1.1.x86_64 libglvnd-debuginfo-1.7.0-1.3.x86_64 libgmodule-2_0-0-debuginfo-2.80.3-1.1.x86_64 libgmp10-debuginfo-6.3.0-3.2.x86_64 libgnutls30-debuginfo-3.8.5-1.1.x86_64 libgobject-2_0-0-debuginfo-2.80.3-1.1.x86_64 libgomp1-debuginfo-14.1.0+git10173-1.1.x86_64 libgsm1-debuginfo-1.0.22-2.2.x86_64 libhogweed6-x86-64-v3-debuginfo-3.9.1-2.5.x86_64 libidn2-0-debuginfo-2.3.7-1.2.x86_64 libinstpatch-1_0-2-debuginfo-1.1.6-2.10.x86_64 libjack0-debuginfo-1.9.22-3.1.x86_64 libjansson4-debuginfo-2.14-1.9.x86_64 libjbig2-debuginfo-2.1-5.3.x86_64 libjitterentropy3-debuginfo-3.4.1-4.2.x86_64 libjpeg8-x86-64-v3-debuginfo-8.3.2-79.2.x86_64 libldb2-debuginfo-2.9.0-1.1.x86_64 liblz4-1-x86-64-v3-debuginfo-1.9.4-2.8.x86_64 liblzma5-x86-64-v3-debuginfo-5.6.2-1.1.x86_64 libmp3lame0-x86-64-v3-debuginfo-3.100-5.9.x86_64 libmpg123-0-debuginfo-1.32.6-1.1.x86_64 libnettle8-x86-64-v3-debuginfo-3.9.1-2.5.x86_64 libnuma1-debuginfo-2.0.18.0.g3871b1c-2.2.x86_64 libogg0-debuginfo-1.3.5-2.1.x86_64 libopencore-amrnb0-debuginfo-0.1.6-1.5.x86_64 libopencore-amrwb0-debuginfo-0.1.6-1.5.x86_64 libopenjp2-7-x86-64-v3-debuginfo-2.5.2-1.2.x86_64 libopenmpt0-debuginfo-0.7.8-1.1.x86_64 libopenssl3-x86-64-v3-debuginfo-3.1.4-9.1.x86_64 libopus0-debuginfo-1.5.2-1.1.x86_64 libp11-kit0-debuginfo-0.25.3-1.3.x86_64 libpgm-5_3-0-debuginfo-5.3.128-2.3.x86_64 librav1e0_6-debuginfo-0.6.6-1.3.x86_64 libselinux1-debuginfo-3.6-1.3.x86_64 libsharpyuv0-debuginfo-1.3.2-2.3.x86_64 libsndfile1-debuginfo-1.2.2-2.3.x86_64 libsoxr0-debuginfo-0.1.3-2.18.x86_64 libssh4-debuginfo-0.10.6-2.1.x86_64 libstdc++6-debuginfo-14.1.0+git10173-1.1.x86_64 libswscale5_9-debuginfo-4.4.4-1699.18.pm.8.x86_64 libtdb1-debuginfo-1.4.10-1.1.x86_64 libtheoradec1-debuginfo-1.1.1-30.12.x86_64 libtheoraenc1-debuginfo-1.1.1-30.12.x86_64 libtiff6-debuginfo-4.6.0-4.3.x86_64 libudev1-debuginfo-255.7-2.1.x86_64 libva-drm2-debuginfo-2.21.0-1.1.x86_64 libva2-debuginfo-2.21.0-1.1.x86_64 libvdpau1-debuginfo-1.5-2.2.x86_64 libvo-amrwbenc0-debuginfo-0.1.3+5-1.4.x86_64 libvorbis0-x86-64-v3-debuginfo-1.3.7-5.1.x86_64 libvorbisenc2-x86-64-v3-debuginfo-1.3.7-5.1.x86_64 libvorbisfile3-x86-64-v3-debuginfo-1.3.7-5.1.x86_64 libvpx9-debuginfo-1.14.0-1.1.x86_64 libvulkan1-debuginfo-1.3.283.0-1.1.x86_64 libwebp7-debuginfo-1.3.2-2.3.x86_64 libwebpdemux2-debuginfo-1.3.2-2.3.x86_64 libwebpmux3-debuginfo-1.3.2-2.3.x86_64 libx264-164-debuginfo-0.164+git20220602.baee400f-1699.1.pm.25.x86_64 libxcb-dri2-0-debuginfo-1.17.0-1.1.x86_64 libxcb-dri3-0-debuginfo-1.17.0-1.1.x86_64 libxcb-glx0-debuginfo-1.17.0-1.1.x86_64 libxcb-randr0-debuginfo-1.17.0-1.1.x86_64 libxcb-shm0-debuginfo-1.17.0-1.1.x86_64 libxcb-xfixes0-debuginfo-1.17.0-1.1.x86_64 libxcb1-debuginfo-1.17.0-1.1.x86_64 libxml2-2-debuginfo-2.12.8-1.1.x86_64 libxmp4-debuginfo-4.6.0-1.3.x86_64 libxshmfence1-debuginfo-1.3.2-1.4.x86_64 libxvidcore4-debuginfo-1.3.7-1699.1.pm.69.x86_64 libz1-x86-64-v3-debuginfo-1.3.1-1.1.x86_64 libzmq5-debuginfo-4.3.5-1.4.x86_64 libzvbi0-debuginfo-0.2.42-3.1.x86_64 samba-client-libs-debuginfo-4.20.1+git.339.cf6e153bb2-1.1.x86_64
(gdb) bt
#0  0x000000000060279b in FFMpegStream::openCodec(int) (this=this@entry=0x7fffffffcd80, desiredStreamIndex=-1) at /home/alexander/Technik/Development/vcmi/client/media/CVideoHandler.cpp:123
#1  0x0000000000603437 in CAudioInstance::extractAudio(ResourcePathTempl<(EResType)9> const&) (this=this@entry=0x7fffffffcd80, videoToOpen=...) at /home/alexander/Technik/Development/vcmi/client/media/CVideoHandler.cpp:497
#2  0x00000000006038b7 in CVideoPlayer::openAndPlayVideoImpl(ResourcePathTempl<(EResType)9> const&, Point const&, bool, bool, bool) (this=<optimized out>, name=..., position=..., useOverlay=false, scale=false, stopOnKey=false)
    at /home/alexander/Technik/Development/vcmi/client/media/CVideoHandler.cpp:578
#3  0x00000000007619b4 in CSpellWindow::turnPageRight() (this=this@entry=0x2246d40) at /home/alexander/Technik/Development/vcmi/client/windows/CSpellWindow.cpp:533
#4  0x000000000076774d in CSpellWindow::selectSchool(int) (this=0x2246d40, school=0) at /home/alexander/Technik/Development/vcmi/client/windows/CSpellWindow.cpp:398
#5  0x0000000000556ac8 in EventDispatcher::handleLeftButtonClick(Point const&, int, bool) (this=0xa98b50, position=..., tolerance=<optimized out>, isPressed=isPressed@entry=true) at /home/alexander/Technik/Development/vcmi/client/gui/EventDispatcher.cpp:232
#6  0x0000000000556b2a in EventDispatcher::dispatchMouseLeftButtonPressed(Point const&, int) (this=<optimized out>, position=<optimized out>, tolerance=<optimized out>) at /home/alexander/Technik/Development/vcmi/client/gui/EventDispatcher.cpp:140
#7  0x000000000054c97d in InputSourceMouse::handleEventMouseButtonDown(SDL_MouseButtonEvent const&) (this=0x1be8620, button=<optimized out>) at /home/alexander/Technik/Development/vcmi/client/eventsSDL/InputSourceMouse.cpp:56
#8  0x00000000005493ab in InputHandler::processEvents() (this=0x1b934b0) at /home/alexander/Technik/Development/vcmi/client/eventsSDL/InputHandler.cpp:125
#9  0x0000000000550f44 in CGuiHandler::handleEvents() (this=<optimized out>) at /home/alexander/Technik/Development/vcmi/client/gui/CGuiHandler.cpp:91
#10 0x00000000007d2225 in CPlayerInterface::update() (this=0x7fffa999bfa0) at /home/alexander/Technik/Development/vcmi/client/CPlayerInterface.cpp:1501
#11 0x0000000000552595 in CGuiHandler::renderFrame() (this=0xa6bca0 <GH>) at /home/alexander/Technik/Development/vcmi/client/gui/CGuiHandler.cpp:117
#12 0x000000000049e054 in mainLoop () at /home/alexander/Technik/Development/vcmi/client/CMT.cpp:418
#13 main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /home/alexander/Technik/Development/vcmi/client/CMT.cpp:381

Alexander-Wilms avatar Jun 18 '24 10:06 Alexander-Wilms

Probably an encoder issue on the device.

  1. Try with another encoder.

  2. Try with a lower resolution (scrcpy -m1024)

  3. Try to record (scrcpy --record=file.mp4) and play the file with some player (VLC), is the result ok?

  4. Try to record the screen using:

    adb screenrecord /sdcard/file.mp4
    adb pull /sdcard/file.mp4
    

    Is the result ok?

Refs #4399

rom1v avatar Jun 24 '24 13:06 rom1v

the phone only has h264 available and yes adb screenrecord does work scrcpy --record=file.mp4 does not, it's also not why i want or do use scrcpy for. i also tried with lower refreshrates, bitrates and resolutions and all resulted in the same issue. i also have used scrcpy on other phones like a Pixel 6 Pro, Redmi Note 10, Volla Phone 22, Pinephone (GD DROID), Samsung Galaxy A50, LG G4c, LG G4, LG G8S, fire TV stick, Android TV and a Medion tablet and all of them worked very well.

Idcrafter avatar Jun 24 '24 20:06 Idcrafter