defold/extension-videoplayer-mpeg

VideoPlayer-MPEG crash on Play

rezgi opened this issue · 16 comments

Is it a private platform, and a platform specific issue? (i.e. would it break your NDA?)

Then please report your issue in the corresponding extension repository!

Describe the bug (REQUIRED)
When I launch the build of the VideoPlayer-MPEG example project, it plays the video for 2-3s then crashes every time. I didn't change anything in the example, I also tried with another video and I had the same problem. I tried with the other VideoPlayer extension and it works fine.

I get the following error :

INFO:DLIB: Log server started on port 50446
INFO:ENGINE: Target listening with name: Rezgi-Workstation - fe80::e8fd:9db0:e0b1:a729 - Windows
INFO:ENGINE: Engine service started on port 50447
INFO:GRAPHICS: Installed graphics device 'ADAPTER_FAMILY_OPENGL'
INFO:ENGINE: Defold Engine 1.9.1 (3be87d8)
INFO:DLIB: Initialized Remotery (ws://127.0.0.1:17815/rmt)
INFO:ENGINE: Loading data from: build/default
INFO:VIDEOPLAYERMPEG1: Registered mpeg Extension
INFO:ENGINE: Initialised sound device 'default'
INFO:VIDEOPLAYERMPEG1: Opened video with framerate: 24.000000, samplerate: 48000, duration: 53.708333
INFO:DLIB: SSDP: Started on address 192.168.100.107
INFO:CRASH: Successfully wrote Crashdump to file: C:\Users\Rezgi\AppData\Roaming\Defold/_crash
ERROR:CRASH: CALL STACK:

ERROR:CRASH:  0 0x7FF64DFA7510 dmCrash::GenerateCallstack D:\a\defold\defold\engine\crash\src\backtrace_win32.cpp:144
ERROR:CRASH:  1 0x7FF64E356E7C _seh_filter_exe /tmp/job11669631630059818958/minkernel/crts/ucrt/src/appcrt/misc/exception_filter.cpp:219
ERROR:CRASH:  2 0x7FF64E3AA958 `__scrt_common_main_seh'::`1'::filt$0 D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:304
ERROR:CRASH:  3 0x7FF64E315238 __C_specific_handler D:\a\_work\1\s\src\vctools\crt\vcruntime\src\eh\riscchandler.cpp:389
ERROR:CRASH:  4 0x7FFA84B342F0 __chkstk <unknown>:0
ERROR:CRASH:  5 0x7FFA84AAD9D0 RtlFindCharInUnicodeString <unknown>:0
ERROR:CRASH:  6 0x7FFA84B333E0 KiUserExceptionDispatcher <unknown>:0
ERROR:CRASH:  7 0x7FF64DF13770 plm_demux_decode /tmp/job11669631630059818958/upload/mpeg/src/pl_mpeg.h:2128
ERROR:CRASH:  8 0x7FF64DF11F40 plm_read_video_packet /tmp/job11669631630059818958/upload/mpeg/src/pl_mpeg.h:1217
ERROR:CRASH:  9 0x7FF64DF14CB0 plm_buffer_has_start_code /tmp/job11669631630059818958/upload/mpeg/src/pl_mpeg.h:1680
ERROR:CRASH: 10 0x7FF64DF132A0 plm_video_decode /tmp/job11669631630059818958/upload/mpeg/src/pl_mpeg.h:2809
ERROR:CRASH: 11 0x7FF64DF13110 plm_decode /tmp/job11669631630059818958/upload/mpeg/src/pl_mpeg.h:1133
ERROR:CRASH: 12 0x7FF64DF1EFF0 Decode /tmp/job11669631630059818958/upload/mpeg/src/mpeg.cpp:177
ERROR:CRASH: 13 0x7FF64DF210DE lj_BC_FUNCC <unknown>:0
ERROR:CRASH: 14 0x7FF64DF9E870 lua_pcall <unknown>:0
ERROR:CRASH: 15 0x7FF64DFCE310 dmScript::PCallInternal D:\a\defold\defold\engine\script\src\script.cpp:1401
ERROR:CRASH: 16 0x7FF64E036F20 dmGameObject::RunScript D:\a\defold\defold\engine\gameobject\src\gameobject\comp_script.cpp:144
ERROR:CRASH: 17 0x7FF64E037120 dmGameObject::CompScriptUpdateInternal D:\a\defold\defold\engine\gameobject\src\gameobject\comp_script.cpp:240
ERROR:CRASH: 18 0x7FF64E009970 dmGameObject::Update D:\a\defold\defold\engine\gameobject\src\gameobject\gameobject.cpp:2617
ERROR:CRASH: 19 0x7FF64E08F030 dmEngine::StepFrame D:\a\defold\defold\engine\engine\src\engine.cpp:1683
ERROR:CRASH: 20 0x7FF64E089EA0 dmEngineUpdate D:\a\defold\defold\engine\engine\src\engine.cpp:2218
ERROR:CRASH: 21 0x7FF64E08FAD0 dmEngine::RunLoop D:\a\defold\defold\engine\engine\src\engine_loop.cpp:83
ERROR:CRASH: 22 0x7FF64DF94C10 engine_main D:\a\defold\defold\engine\engine\src\engine_main.cpp:152
ERROR:CRASH: 23 0x7FF64E314DE4 __scrt_common_main_seh D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
ERROR:CRASH: 24 0x7FFA84482560 BaseThreadInitThunk <unknown>:0
ERROR:CRASH: 25 0x7FFA84AEAA30 RtlUserThreadStart <unknown>:0
ERROR:CRASH: Lua Callstack:
ERROR:CRASH:   example/player.script:36: in function <example/player.script:34>
ERROR:CRASH: 

INFO:CRASH: Successfully wrote Crashdump to file: C:\Users\Rezgi\AppData\Roaming\Defold/_crash
ERROR:CRASH: CALL STACK:

ERROR:CRASH:  0 0x7FF64DF13770 plm_demux_decode /tmp/job11669631630059818958/upload/mpeg/src/pl_mpeg.h:2128
ERROR:CRASH:  1 0x7FF64DF11F40 plm_read_video_packet /tmp/job11669631630059818958/upload/mpeg/src/pl_mpeg.h:1217
ERROR:CRASH:  2 0x7FF64DF14CB0 plm_buffer_has_start_code /tmp/job11669631630059818958/upload/mpeg/src/pl_mpeg.h:1680
ERROR:CRASH:  3 0x7FF64DF132A0 plm_video_decode /tmp/job11669631630059818958/upload/mpeg/src/pl_mpeg.h:2809
ERROR:CRASH:  4 0x7FF64DF13110 plm_decode /tmp/job11669631630059818958/upload/mpeg/src/pl_mpeg.h:1133
ERROR:CRASH:  5 0x7FF64DF1EFF0 Decode /tmp/job11669631630059818958/upload/mpeg/src/mpeg.cpp:177
ERROR:CRASH:  6 0x7FF64DF210DE lj_BC_FUNCC <unknown>:0
ERROR:CRASH:  7 0x7FF64DF9E870 lua_pcall <unknown>:0
ERROR:CRASH:  8 0x7FF64DFCE310 dmScript::PCallInternal D:\a\defold\defold\engine\script\src\script.cpp:1401
ERROR:CRASH:  9 0x7FF64E036F20 dmGameObject::RunScript D:\a\defold\defold\engine\gameobject\src\gameobject\comp_script.cpp:144
ERROR:CRASH: 10 0x7FF64E037120 dmGameObject::CompScriptUpdateInternal D:\a\defold\defold\engine\gameobject\src\gameobject\comp_script.cpp:240
ERROR:CRASH: 11 0x7FF64E009970 dmGameObject::Update D:\a\defold\defold\engine\gameobject\src\gameobject\gameobject.cpp:2617
ERROR:CRASH: 12 0x7FF64E08F030 dmEngine::StepFrame D:\a\defold\defold\engine\engine\src\engine.cpp:1683
ERROR:CRASH: 13 0x7FF64E089EA0 dmEngineUpdate D:\a\defold\defold\engine\engine\src\engine.cpp:2218
ERROR:CRASH: 14 0x7FF64E08FAD0 dmEngine::RunLoop D:\a\defold\defold\engine\engine\src\engine_loop.cpp:83
ERROR:CRASH: 15 0x7FF64DF94C10 engine_main D:\a\defold\defold\engine\engine\src\engine_main.cpp:152
ERROR:CRASH: 16 0x7FF64E314DE4 __scrt_common_main_seh D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
ERROR:CRASH: 17 0x7FFA84482560 BaseThreadInitThunk <unknown>:0
ERROR:CRASH: 18 0x7FFA84AEAA30 RtlUserThreadStart <unknown>:0
ERROR:CRASH: Lua Callstack:
ERROR:CRASH:   example/player.script:36: in function <example/player.script:34>
ERROR:CRASH: 

INFO:CRASH: Successfully wrote MiniDump to file: C:\Users\Rezgi\AppData\Roaming\Defold/_crash.dmp

To Reproduce (REQUIRED)
Steps to reproduce the behavior:

  1. Get the VideoPlayer-MPEG example project from Github
  2. Build and launch
  3. Crash after 3s

Expected behavior (REQUIRED)
The video should play without crashing.

Defold version (REQUIRED):

  • Version [1.9.1]

Platforms (REQUIRED):

  • Platforms: [Windows]
  • OS: [Windows 11]
  • Device: [Desktop]

Minimal repro case project (OPTIONAL):
The project is on Github.

Logs (OPTIONAL):
I attached the dump file.
_crash.zip

Workaround (OPTIONAL):
Didn't find one except use the other video player extension, which uses WebM instead of Mpeg.

The issue moved from the Defold main issue tracker to the related extension repository.

The issue moved from the Defold main issue tracker to the related extension repository.

Ok thanks. So next time I always need to report issues on the related extension right ?

The issue moved from the Defold main issue tracker to the related extension repository.

Ok thanks. So next time I always need to report issues on the related extension right ?

Yes, please!

Noted. Sorry about that.

Same behavior in Ubuntu Linux, it crashes a few seconds into playing the video.
Screenshot from 2024-07-30 16-43-37

Apparently, if you press Stop and then hit Play, the crash is fixed.

Apparently, if you press Stop and then hit Play, the crash is fixed.

I did that too before and it worked a few more seconds before it crashed again.

changing this, works for me
Screenshot from 2024-07-30 17-55-50

It doesn't fix the issue for all videos. It continues to crash.

Interesting to note :

  • the video playback lasts a bit longer on mobile (Redmi 7A, Android 10). It goes up to 6-7s before freezing.
  • still on mobile, if we swap between 2 videos frequently, the playback doesn't crash until the end of the video