Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Windows 7/8 and macOS 10.11/10.12 crash when playing media files #31762

Closed
3 tasks done
lyswhut opened this issue Nov 9, 2021 · 10 comments · Fixed by #32046
Closed
3 tasks done

[Bug]: Windows 7/8 and macOS 10.11/10.12 crash when playing media files #31762

lyswhut opened this issue Nov 9, 2021 · 10 comments · Fixed by #32046
Assignees
Labels
13-x-y 14-x-y 15-x-y 16-x-y bug 🪲 has-repro-gist Issue can be reproduced with code at https://gist.github.com/ platform/macOS platform/windows status/confirmed A maintainer reproduced the bug or agreed with the feature
Projects

Comments

@lyswhut
Copy link

lyswhut commented Nov 9, 2021

Preflight Checklist

Electron Version

15.3.1
14.2.1
13.6.1

What operating system are you using?

Windows

Operating System Version

Windows 7 version 7601

What arch are you using?

x64

Last Known Working Electron version

15.3.0
14.2.0
13.6.0

Expected Behavior

Can play audio files normally

Actual Behavior

Playing certain audio files causes a crash

Testcase Gist URL

https://gist.github.com/lyswhut/cb012a765205fbb63a0683a7b1724755#file-preload-js-L13-L15

Additional Information

Working on windows 10, it will crash only under windows 7

GIF

@ckerr
Copy link
Member

ckerr commented Nov 9, 2021

Hey @lyswhut, I just wanted to make sure I'm correctly understanding the Electron versions you listed. Are you saying this worked in 15.3.0, but is broken in both 15.3.1 and 13.6.1?

@ckerr ckerr added 15-x-y blocked/need-info ❌ Cannot proceed without more information platform/windows labels Nov 9, 2021
@lyswhut
Copy link
Author

lyswhut commented Nov 10, 2021

@ckerr Yes, 14.2.1 will also crash, I have attached a demo gif

@ckerr ckerr added the 14-x-y label Nov 10, 2021
@ckerr ckerr added this to Unsorted Issues in 16-x-y Nov 10, 2021
@ckerr ckerr added has-repro-gist Issue can be reproduced with code at https://gist.github.com/ and removed blocked/need-info ❌ Cannot proceed without more information labels Nov 10, 2021
@ckerr ckerr moved this from Unsorted Issues to Does Not Block Stable in 16-x-y Nov 10, 2021
@deermichel deermichel added 13-x-y status/confirmed A maintainer reproduced the bug or agreed with the feature labels Nov 11, 2021
@deermichel
Copy link
Contributor

deermichel commented Nov 11, 2021

Confirmed to be broken on Win7 7601 for E13.6.1, E14.2.1, E15.3.1. Works on E13.6.0, E14.2.0, E15.3.0. Same crash when moving audio code to renderer process. Cannot test on E16 because another Win7 issue crashes Electron too early.

Log E15.3.1

Received fatal exception EXCEPTION_ACCESS_VIOLATION
Backtrace:
v8::ResourceConstraints::ResourceConstraints [0x0000000140000903+205859]
IsSandboxedProcess [0x0000000141454465+830837]
node::GetEnvironmentIsolateData [0x0000000140B78ECF+2318143]
node::GetEnvironmentIsolateData [0x0000000140B78D68+2317784]
node::GetEnvironmentIsolateData [0x0000000140B69854+2255044]
v8::CpuProfileDeoptInfo::~CpuProfileDeoptInfo [0x0000000140325F93+38051]
Cr_z_adler32 [0x000000014304AC13+49779]
Cr_z_adler32 [0x00000001430EE949+720809]
Cr_z_adler32 [0x000000014304BDB8+54296]
Cr_z_adler32 [0x0000000143051372+76242]
Cr_z_adler32 [0x00000001430EE949+720809]
Cr_z_adler32 [0x000000014304A1C0+47136]
cppgc::internal::WriteBarrier::DijkstraMarkingBarrierRangeSlow [0x000000014300EF7B+2892139]
Cr_z_adler32 [0x00000001430DEB0E+655726]
cppgc::internal::WriteBarrier::DijkstraMarkingBarrierRangeSlow [0x000000014301B631+2943009]
uv_fs_get_ptr [0x00000001410C1D58+80744]
uv_sleep [0x00000001415D98F3+305123]
uv_stop [0x000000014109C432+4220226]
node::GetEnvironmentIsolateData [0x0000000140A2E723+964499]
node::GetEnvironmentIsolateData [0x0000000140A300D1+971073]
node::GetEnvironmentIsolateData [0x0000000140A2BAFC+953196]
v8::MemorySpan<unsigned char const >::operator= [0x000000014051095A+713306]
v8::MemorySpan<unsigned char const >::operator= [0x000000014051035A+711770]
v8::MemorySpan<unsigned char const >::operator= [0x000000014050EF53+706643]
v8::MemorySpan<unsigned char const >::operator= [0x000000014050F6E6+708582]
v8::metrics::LongTaskStats::LongTaskStats [0x000000013FD1D47B+49067]
Cr_z_adler32 [0x0000000143463E62+4347074]
BaseThreadInitThunk [0x0000000077AB570D+13]
RtlUserThreadStart [0x0000000077D1385D+29]

Electron exited with code 3221225477.

Log E14.2.1

Received fatal exception EXCEPTION_ACCESS_VIOLATION
Backtrace:
v8::ResourceConstraints::ResourceConstraints [0x00000001401833F3+203363]
IsSandboxedProcess [0x0000000141469C05+833589]
v8_inspector::V8StackTraceId::ToString [0x0000000140BB06EF+4324815]
v8_inspector::V8StackTraceId::ToString [0x0000000140BB0588+4324456]
v8_inspector::V8StackTraceId::ToString [0x0000000140BA0F84+4261476]
v8::CpuProfileDeoptInfo::~CpuProfileDeoptInfo [0x0000000140356543+38035]
Cr_z_crc32 [0x00000001430A2BD3+56771]
Cr_z_crc32 [0x00000001431484B9+734889]
Cr_z_crc32 [0x00000001430A3D88+61304]
Cr_z_crc32 [0x00000001430A9312+83202]
Cr_z_crc32 [0x00000001431484B9+734889]
Cr_z_crc32 [0x00000001430A1300+50416]
v8::internal::OSROptimizedCodeCache::EvictMarkedCode [0x00000001430628CB+3928347]
Cr_z_crc32 [0x000000014313A01B+676363]
v8::internal::OSROptimizedCodeCache::EvictMarkedCode [0x000000014306F621+3980913]
uv_stop [0x00000001410F0AB8+4343896]
uv_fs_get_ptr [0x00000001415F47A3+150387]
uv_stop [0x00000001410CBFC2+4193634]
v8_inspector::V8StackTraceId::ToString [0x0000000140A69D63+2987075]
v8_inspector::V8StackTraceId::ToString [0x0000000140A6B711+2993649]
v8_inspector::V8StackTraceId::ToString [0x0000000140A6708C+2975596]
v8::MemorySpan<unsigned char const >::operator= [0x000000014053D710+696064]
v8::MemorySpan<unsigned char const >::operator= [0x000000014053D16D+694621]
v8::MemorySpan<unsigned char const >::operator= [0x000000014053BFD1+690113]
v8::MemorySpan<unsigned char const >::operator= [0x000000014053C39D+691085]
std::__1::__vector_base<v8::CpuProfileDeoptInfo,std::__1::allocator<v8::CpuProfileDeoptInfo> >::__vector_base<v8::CpuProfileDeoptInfo,std::__1::allocator<v8::CpuProfileDeoptInfo> > [0x000000013FEAD4BB+56571]
Cr_z_crc32 [0x00000001434D0B12+4439298]
BaseThreadInitThunk [0x0000000077AB570D+13]
RtlUserThreadStart [0x0000000077D1385D+29]

Electron exited with code 3221225477.

Log 13.6.1

Received fatal exception EXCEPTION_ACCESS_VIOLATION
Backtrace:
v8::ResourceConstraints::ResourceConstraints [0x000000013FABE463+188099]
IsSandboxedProcess [0x0000000140DA8395+866997]
uv_timer_set_repeat [0x00000001404F3E0F+2507407]
uv_timer_set_repeat [0x00000001404F3C88+2507016]
uv_timer_set_repeat [0x00000001404E5AB7+2449207]
std::__1::__vector_base<v8::CpuProfileDeoptFrame,std::__1::allocator<v8::CpuProfileDeoptFrame> >::~__vector_base<v8::CpuProfileDeoptFrame,std::__1::allocator<v8::CpuProfileDeoptFrame> > [0x000000013FC9432F+63039]
Cr_z_crc32 [0x0000000142A297A4+43396]
Cr_z_crc32 [0x0000000142AC4BC9+679337]
Cr_z_crc32 [0x0000000142A2E584+63332]
Cr_z_crc32 [0x0000000142AC4BC9+679337]
Cr_z_crc32 [0x0000000142A28C40+40480]
v8::Locker::IsActive [0x00000001429F26C2+4863346]
Cr_z_crc32 [0x0000000142AB7512+624370]
v8::Locker::IsActive [0x00000001429FEC93+4913987]
uv_fs_get_ptr [0x0000000140A291D8+4817976]
uv_sleep [0x0000000140F408A9+328521]
uv_fs_get_ptr [0x0000000140A041B2+4666386]
uv_timer_set_repeat [0x00000001403B122E+1185454]
uv_timer_set_repeat [0x00000001403B2BD1+1192017]
uv_timer_set_repeat [0x00000001403AE47C+1173756]
cppgc::SourceLocation::Current [0x000000013FE8321B+410779]
cppgc::SourceLocation::Current [0x000000013FE82C8A+409354]
cppgc::SourceLocation::Current [0x000000013FE81B72+404978]
cppgc::SourceLocation::Current [0x000000013FE81EBD+405821]
cppgc::NameProvider::HideInternalNames [0x000000013F7FE9B3+37395]
Cr_z_crc32 [0x0000000142E53EF2+4411602]
BaseThreadInitThunk [0x0000000077AB570D+13]
RtlUserThreadStart [0x0000000077D1385D+29]

Electron exited with code 3221225477.

@PrestonN
Copy link

PrestonN commented Nov 12, 2021

I had some reports about this happening with video as well. My guess would have to be something about the recent changes to the MediaMetadata logic that was reported here. I don't believe Windows 7 supports MediaMetadata natively (It's been a while, so I might be wrong) which may explain why this issue came up with the recent releases.

I'll go ahead and copy and paste the Gist I made for the MediaMetadata issue as it could be helpful with testing this as well. I don't have a Windows 7 machine to test with so I'm unsure if my Gist causes the crash or not.

@lyswhut
Copy link
Author

lyswhut commented Nov 17, 2021

Same crash in v16.0.0

@zcbenz
Copy link
Member

zcbenz commented Nov 18, 2021

Comparing 13.6.0 and 13.6.1 v13.6.0...v13.6.1, there is one backport that is related to audio: https://github.com/electron/electron/pull/31521/files.

@deermichel
Copy link
Contributor

Based on a recent stacktrace (below), it's definitely a regression caused by #31492 (this line which was previously disabled). cc @codebytere

Thread 0 (crashed)
 0  Skype.exe!static void base::ObserverList<blink::MemoryUsageMonitor::Observer,0,1,base::internal::CheckedObserverAdapter>::AddObserver(class blink::MemoryUsageMonitor::Observer *) [observer_list.h : 271 + 0x4]
    eip = 0x010c81dc   esp = 0x0968f18c   ebp = 0x0968f1a4   ebx = 0x00000000
    esi = 0x0000002c   edi = 0x00000000   eax = 0xe6086e4b   ecx = 0x0000002c
    edx = 0x0afe22b0   efl = 0x00010202
    Found by: given as instruction pointer in context
 1  Skype.exe!system_media_controls::internal::SystemMediaControlsWin::AddObserver(system_media_controls::SystemMediaControlsObserver *) [system_media_controls_win.cc : 130 + 0x9]
    eip = 0x020a00a3   esp = 0x0968f1ac   ebp = 0x0968f1b8   ebx = 0x00000000
    esi = 0x0afe22b0   edi = 0x00000000
    Found by: call frame info
 2  Skype.exe!static void content::MediaKeysListenerManagerImpl::StartListeningForMediaKeysIfNecessary() [media_keys_listener_manager_impl.cc : 235 + 0x9]
    eip = 0x019aae55   esp = 0x0968f1c0   ebp = 0x0968f1dc   esi = 0x0afe22a0
    edi = 0x0968f1c8
    Found by: call frame info
 3  Skype.exe!content::MediaKeysListenerManagerImpl::StartWatchingMediaKey(ui::KeyboardCode,ui::MediaKeysListener::Delegate *) [media_keys_listener_manager_impl.cc : 47 + 0x5]
    eip = 0x019aad01   esp = 0x0968f1e4   ebp = 0x0968f1f4   ebx = 0x00000000
    esi = 0x0afe22a0   edi = 0x000000b3
    Found by: call frame info
 4  Skype.exe!content::ActiveMediaSessionController::MediaSessionActionsChanged(std::__1::vector<media_session::mojom::MediaSessionAction,std::__1::allocator<media_session::mojom::MediaSessionAction> > const &) [active_media_session_controller.cc : 80 + 0xb]
    eip = 0x0199eee1   esp = 0x0968f1fc   ebp = 0x0968f234   ebx = 0x00000000
    esi = 0x0afb63c8   edi = 0x14113dc0
    Found by: call frame info
 5  Skype.exe!media_session::mojom::MediaControllerObserverStubDispatch::Accept(media_session::mojom::MediaControllerObserver *,mojo::Message *) [media_controller.mojom.cc : 1933 + 0xc]
    eip = 0x0127b242   esp = 0x0968f23c   ebp = 0x0968f2c4   ebx = 0x14113dc0
    esi = 0x0968f240   edi = 0x0968f254
    Found by: call frame info
 6  Skype.exe!media_session::mojom::MediaControllerObserverStub<mojo::RawPtrImplRefTraits<media_session::mojom::MediaControllerObserver> >::Accept(mojo::Message *) [media_controller.mojom.h : 483 + 0x9]
    eip = 0x0199f013   esp = 0x0968f2cc   ebp = 0x0968f2d4   ebx = 0x0968f3d0
    esi = 0x0afd2408   edi = 0x0afd2510
    Found by: call frame info
 7  Skype.exe!static bool mojo::InterfaceEndpointClient::HandleValidatedMessage(class mojo::Message *) [interface_endpoint_client.cc : 554 + 0xc]
    eip = 0x039780c3   esp = 0x0968f2dc   ebp = 0x0968f314
    Found by: call frame info
 8  Skype.exe!mojo::MessageDispatcher::Accept(mojo::Message *) [message_dispatcher.cc : 43 + 0x9]
    eip = 0x03a04893   esp = 0x0968f31c   ebp = 0x0968f344   ebx = 0x0968f384
    esi = 0x0afd24a4   edi = 0x0968f3d0
    Found by: call frame info
 9  Skype.exe!mojo::internal::MultiplexRouter::Accept(mojo::Message *) [multiplex_router.cc : 622 + 0x99]
    eip = 0x0397bea1   esp = 0x0968f34c   ebp = 0x0968f438   ebx = 0x0968f384
    esi = 0x0968f350   edi = 0x0968f3d0
    Found by: call frame info
10  Skype.exe!mojo::MessageDispatcher::Accept(mojo::Message *) [message_dispatcher.cc : 43 + 0x9]
    eip = 0x03a04893   esp = 0x0968f440   ebp = 0x0968f468   ebx = 0x0968f544
    esi = 0x0c4a2d54   edi = 0x0968f474
    Found by: call frame info
11  Skype.exe!static void mojo::Connector::ReadAllAvailableMessages() [connector.cc : 568 + 0x176]
    eip = 0x0397746c   esp = 0x0968f470   ebp = 0x0968f59c   ebx = 0x0968f544
    esi = 0x0968f4b0   edi = 0x0c4a2d6c
    Found by: call frame info
12  Skype.exe!base::TaskAnnotator::RunTask(char const *,base::PendingTask *) [task_annotator.cc : 173 + 0x10]
    eip = 0x0393b03c   esp = 0x0968f5a4   ebp = 0x0968f608   ebx = 0x00000000
    esi = 0x0968f5d0   edi = 0x0adb10c0
    Found by: call frame info
13  Skype.exe!base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork() [thread_controller_with_message_pump_impl.cc : 264 + 0x157]
    eip = 0x039f757f   esp = 0x0968f610   ebp = 0x0968f6c8   ebx = 0x00000000
    esi = 0x0068193c   edi = 0x03977a04
    Found by: call frame info
14  Skype.exe!base::MessagePumpForUI::DoRunLoop() [message_pump_win.cc : 220 + 0x18]
    eip = 0x03947279   esp = 0x0968f6d0   ebp = 0x0968f760   ebx = 0x00000000
    esi = 0x0065d278   edi = 0x0068193c
    Found by: call frame info
15  Skype.exe!base::MessagePumpWin::Run(base::MessagePump::Delegate *) [message_pump_win.cc : 78 + 0x5]
    eip = 0x01d95486   esp = 0x0968f768   ebp = 0x0968f77c   ebx = 0xffffff01
    esi = 0x00000000   edi = 0x0065d280
    Found by: call frame info
16  Skype.exe!base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run(bool,base::TimeDelta) [thread_controller_with_message_pump_impl.cc : 460 + 0x9]
    eip = 0x021f6bd9   esp = 0x0968f784   ebp = 0x0968f7b8   esi = 0x00681940
    edi = 0x0068198c
    Found by: call frame info
17  Skype.exe!base::RunLoop::Run(base::Location const &) [run_loop.cc : 133 + 0x10]
    eip = 0x01d7623d   esp = 0x0968f7c0   ebp = 0x0968f808   ebx = 0x0968f878
    esi = 0x0c6922e8   edi = 0x0968f7f0
    Found by: call frame info
18  Skype.exe!content::BrowserMainLoop::RunMainMessageLoop() [browser_main_loop.cc : 992 + 0x23]
    eip = 0x018963e5   esp = 0x0968f810   ebp = 0x0968f834   ebx = 0x0968f878
    esi = 0x0c6922e8   edi = 0x0968f814
    Found by: call frame info
19  Skype.exe!content::BrowserMainRunnerImpl::Run() [browser_main_runner_impl.cc : 152 + 0x5]
    eip = 0x01897e3e   esp = 0x0968f83c   ebp = 0x0968f840   esi = 0x006ad870
    edi = 0x075220bc
    Found by: call frame info
20  Skype.exe!content::BrowserMain(content::MainFunctionParams const &) [browser_main.cc : 47 + 0x5]
    eip = 0x01893578   esp = 0x0968f848   ebp = 0x0968f89c   esi = 0xffffffff
    Found by: call frame info
21  Skype.exe!static int content::ContentMainRunnerImpl::RunBrowser(struct content::MainFunctionParams & const, bool) [content_main_runner_impl.cc : 1081 + 0x58]
    eip = 0x0141d8d7   esp = 0x0968f8a4   ebp = 0x0968f8dc   ebx = 0xffffffff
    esi = 0x0968f8a8   edi = 0x0968fa90
    Found by: call frame info
22  Skype.exe!content::ContentMainRunnerImpl::Run(bool) [content_main_runner_impl.cc : 956 + 0x10]
    eip = 0x0141d466   esp = 0x0968f8e4   ebp = 0x0968f924   ebx = 0x00000000
    esi = 0x00666368   edi = 0x0968f8f4
    Found by: call frame info
23  Skype.exe!static int content::RunContentProcess(const struct content::ContentMainParams & const, class content::ContentMainRunner *) [content_main.cc : 376 + 0xf]
    eip = 0x0141c569   esp = 0x0968f92c   ebp = 0x0968fa34   ebx = 0x00000000
    esi = 0x00666368   edi = 0x00000000
    Found by: call frame info
24  Skype.exe!content::ContentMain(content::ContentMainParams const &) [content_main.cc : 402 + 0x8]
    eip = 0x0141c8cf   esp = 0x0968fa3c   ebp = 0x0968fa54   ebx = 0x0968fa70
    esi = 0x0968fa70   edi = 0x0968fa44
    Found by: call frame info
25  Skype.exe!wWinMain [electron_main.cc : 294 + 0x6]
    eip = 0x00e6a4d9   esp = 0x0968fa5c   ebp = 0x0968fb08   esi = 0x0968fa60
    edi = 0x00000000
    Found by: call frame info
26  Skype.exe!static void FiberBinder(void *) [electron_main.cc : 132 + 0xa]
    eip = 0x00e6a1f1   esp = 0x0968fb10   ebp = 0x0968fb24   ebx = 0x000cfa70
    esi = 0x000cfa70   edi = 0x00000000
    Found by: call frame info
27  kernel32.dll + 0x3cbc2
    eip = 0x7703cbc2   esp = 0x0968fb2c   ebp = 0x0968fb5c   esi = 0x00000000
    Found by: call frame info
28  kernel32.dll + 0x3cb7a
    eip = 0x7703cb7a   esp = 0x0968fb64   ebp = 0x0968fb6c
    Found by: previous frame's frame pointer

@babatakao
Copy link
Contributor

Same crash on Windows 8.1.

@deermichel
Copy link
Contributor

Yep, should be fixed by the same PR.

@deermichel
Copy link
Contributor

We see the same crash on macOS 10.12 and 10.11 now

image

@deermichel deermichel changed the title [Bug]: Windows 7 crashes when playing certain audio files [Bug]: Windows 7/8 and macOS 10.11/10.12 crash when playing media files Dec 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
13-x-y 14-x-y 15-x-y 16-x-y bug 🪲 has-repro-gist Issue can be reproduced with code at https://gist.github.com/ platform/macOS platform/windows status/confirmed A maintainer reproduced the bug or agreed with the feature
Projects
No open projects
16-x-y
Fixed For Next Release
Development

Successfully merging a pull request may close this issue.

6 participants