VideoPlayer-MPEG crashes on play

Describe the bug (REQUIRED)
The example project of MPEG-1 crashes after 3s when I launch a build and play the video. I get the following error :

ERROR:CRASH: CALL STACK:

ERROR:CRASH:  0 0x7FF6FB8E7510 dmCrash::GenerateCallstack D:\a\defold\defold\engine\crash\src\backtrace_win32.cpp:144
ERROR:CRASH:  1 0x7FF6FBC96E7C _seh_filter_exe /tmp/job2533409371619311117/minkernel/crts/ucrt/src/appcrt/misc/exception_filter.cpp:219
ERROR:CRASH:  2 0x7FF6FBCEA958 `__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 0x7FF6FBC55238 __C_specific_handler D:\a\_work\1\s\src\vctools\crt\vcruntime\src\eh\riscchandler.cpp:389
ERROR:CRASH:  4 0x7FFC9C6742F0 __chkstk <unknown>:0
ERROR:CRASH:  5 0x7FFC9C5ED9D0 RtlFindCharInUnicodeString <unknown>:0
ERROR:CRASH:  6 0x7FFC9C6733E0 KiUserExceptionDispatcher <unknown>:0
ERROR:CRASH:  7 0x7FF6FB853770 plm_demux_decode /tmp/job2533409371619311117/upload/mpeg/src/pl_mpeg.h:2128
ERROR:CRASH:  8 0x7FF6FB852100 plm_read_audio_packet /tmp/job2533409371619311117/upload/mpeg/src/pl_mpeg.h:1223
ERROR:CRASH:  9 0x7FF6FB8534D0 plm_audio_decode /tmp/job2533409371619311117/upload/mpeg/src/pl_mpeg.h:3864
ERROR:CRASH: 10 0x7FF6FB853110 plm_decode /tmp/job2533409371619311117/upload/mpeg/src/pl_mpeg.h:1144
ERROR:CRASH: 11 0x7FF6FB85EFF0 Decode /tmp/job2533409371619311117/upload/mpeg/src/mpeg.cpp:177
ERROR:CRASH: 12 0x7FF6FB8610DE lj_BC_FUNCC <unknown>:0
ERROR:CRASH: 13 0x7FF6FB8DE870 lua_pcall <unknown>:0
ERROR:CRASH: 14 0x7FF6FB90E310 dmScript::PCallInternal D:\a\defold\defold\engine\script\src\script.cpp:1401
ERROR:CRASH: 15 0x7FF6FB976F20 dmGameObject::RunScript D:\a\defold\defold\engine\gameobject\src\gameobject\comp_script.cpp:144
ERROR:CRASH: 16 0x7FF6FB977120 dmGameObject::CompScriptUpdateInternal D:\a\defold\defold\engine\gameobject\src\gameobject\comp_script.cpp:240
ERROR:CRASH: 17 0x7FF6FB949970 dmGameObject::Update D:\a\defold\defold\engine\gameobject\src\gameobject\gameobject.cpp:2617
ERROR:CRASH: 18 0x7FF6FB9CF030 dmEngine::StepFrame D:\a\defold\defold\engine\engine\src\engine.cpp:1683
ERROR:CRASH: 19 0x7FF6FB9C9EA0 dmEngineUpdate D:\a\defold\defold\engine\engine\src\engine.cpp:2218
ERROR:CRASH: 20 0x7FF6FB9CFAD0 dmEngine::RunLoop D:\a\defold\defold\engine\engine\src\engine_loop.cpp:83
ERROR:CRASH: 21 0x7FF6FB8D4C10 engine_main D:\a\defold\defold\engine\engine\src\engine_main.cpp:152
ERROR:CRASH: 22 0x7FF6FBC54DE4 __scrt_common_main_seh D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
ERROR:CRASH: 23 0x7FFC9B4E2560 BaseThreadInitThunk <unknown>:0
ERROR:CRASH: 24 0x7FFC9C62AA30 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 0x7FF6FB853770 plm_demux_decode /tmp/job2533409371619311117/upload/mpeg/src/pl_mpeg.h:2128
ERROR:CRASH:  1 0x7FF6FB852100 plm_read_audio_packet /tmp/job2533409371619311117/upload/mpeg/src/pl_mpeg.h:1223
ERROR:CRASH:  2 0x7FF6FB8534D0 plm_audio_decode /tmp/job2533409371619311117/upload/mpeg/src/pl_mpeg.h:3864
ERROR:CRASH:  3 0x7FF6FB853110 plm_decode /tmp/job2533409371619311117/upload/mpeg/src/pl_mpeg.h:1144
ERROR:CRASH:  4 0x7FF6FB85EFF0 Decode /tmp/job2533409371619311117/upload/mpeg/src/mpeg.cpp:177
ERROR:CRASH:  5 0x7FF6FB8610DE lj_BC_FUNCC <unknown>:0
ERROR:CRASH:  6 0x7FF6FB8DE870 lua_pcall <unknown>:0
ERROR:CRASH:  7 0x7FF6FB90E310 dmScript::PCallInternal D:\a\defold\defold\engine\script\src\script.cpp:1401
ERROR:CRASH:  8 0x7FF6FB976F20 dmGameObject::RunScript D:\a\defold\defold\engine\gameobject\src\gameobject\comp_script.cpp:144
ERROR:CRASH:  9 0x7FF6FB977120 dmGameObject::CompScriptUpdateInternal D:\a\defold\defold\engine\gameobject\src\gameobject\comp_script.cpp:240
ERROR:CRASH: 10 0x7FF6FB949970 dmGameObject::Update D:\a\defold\defold\engine\gameobject\src\gameobject\gameobject.cpp:2617
ERROR:CRASH: 11 0x7FF6FB9CF030 dmEngine::StepFrame D:\a\defold\defold\engine\engine\src\engine.cpp:1683
ERROR:CRASH: 12 0x7FF6FB9C9EA0 dmEngineUpdate D:\a\defold\defold\engine\engine\src\engine.cpp:2218
ERROR:CRASH: 13 0x7FF6FB9CFAD0 dmEngine::RunLoop D:\a\defold\defold\engine\engine\src\engine_loop.cpp:83
ERROR:CRASH: 14 0x7FF6FB8D4C10 engine_main D:\a\defold\defold\engine\engine\src\engine_main.cpp:152
ERROR:CRASH: 15 0x7FF6FBC54DE4 __scrt_common_main_seh D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
ERROR:CRASH: 16 0x7FFC9B4E2560 BaseThreadInitThunk <unknown>:0
ERROR:CRASH: 17 0x7FFC9C62AA30 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. Open the demo project
  2. Build
  3. crash after 3s
  4. See error

Expected behaviour (REQUIRED)
Should be playing the video normally. The other extensions, video player, works fine for me.

Defold version (REQUIRED):

  • Version [1.9.1]

Platforms (REQUIRED):

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

Minimal repro case project (OPTIONAL):
Use the example mpeg 1 project

Logs (OPTIONAL):
I uploaded the dump file.

Workaround (OPTIONAL):
Couldn’t find one.

Screenshots (OPTIONAL):
If applicable, add screenshots to help explain your problem.

Additional context (OPTIONAL):
I tried with the default video and another video, same crash behavior. I don’t have crashes with the other extension.

_crash.zip (16.7 KB)

Thanks. Could you please create a ticket on GitHub and also share the video file? Or share it probably with me.

Thanks for the reply. It does it with the video file provided in the example (bunny), and also another one of mine. I used the sample project without changing anything, should I still provide my project or just post the issue on github?

I created a bug report on Github [9237].

1 Like

The Defold example project also crashes for me (Ubuntu), when run from the editor. It runs for a reported 3.91 seconds then crashes. The call stack includes references to:
extension-videoplayer-mpeg/build/x86_64-linux/dmengine
and:
example/player.script:36: in function <example/player.script:34>
This is:
mpeg.decode(dt * self.playback_speed)
If I increase the value of this parameter by *6 it does not crash.
However the video is very choppy, and after the first run through has sync problems.

1 Like

I will have a look next week when i am back home again.

1 Like