tungs / timesnap

Node.js program that takes screenshots at smooth intervals of web pages with JavaScript animations
BSD 3-Clause "New" or "Revised" License
234 stars 57 forks source link

[BUG] GPU process crash on Ubuntu 22.04 #69

Closed sosukeinu closed 2 years ago

sosukeinu commented 2 years ago

Describe the bug I installed timesnap globally, on a brand new computer. I had no issues with the same file format on a different computer. I get the following error on running.

DevTools listening on ws://127.0.0.1:42633/devtools/browser/2c6b915f-b25f-419e-a607-3c1b8459d847
[0707/184310.044242:WARNING:gpu_process_host.cc(1165)] The GPU process has crashed 1 time(s)
[0707/184310.120339:WARNING:gpu_process_host.cc(1165)] The GPU process has crashed 2 time(s)
[0707/184310.197129:WARNING:gpu_process_host.cc(1165)] The GPU process has crashed 3 time(s)
[0707/184310.273012:WARNING:gpu_process_host.cc(1165)] The GPU process has crashed 4 time(s)
[0707/184310.349100:WARNING:gpu_process_host.cc(1165)] The GPU process has crashed 5 time(s)
[0707/184310.423818:WARNING:gpu_process_host.cc(1165)] The GPU process has crashed 6 time(s)
[0707/184310.492968:WARNING:gpu_process_host.cc(1165)] The GPU process has crashed 7 time(s)
[0707/184310.565158:WARNING:gpu_process_host.cc(1165)] The GPU process has crashed 8 time(s)
[0707/184310.636396:WARNING:gpu_process_host.cc(1165)] The GPU process has crashed 9 time(s)
[0707/184310.636417:FATAL:gpu_data_manager_impl_private.cc(1034)] The display compositor is frequently crashing. Goodbye.
#0 0x55e25e534219 base::debug::CollectStackTrace()
#1 0x55e25e498363 base::debug::StackTrace::StackTrace()
#2 0x55e25e4aa195 logging::LogMessage::~LogMessage()
#3 0x55e25ca0c5e1 content::GpuDataManagerImplPrivate::FallBackToNextGpuMode()
#4 0x55e25ca09bbf content::GpuDataManagerImpl::FallBackToNextGpuMode()
#5 0x55e25ca123b1 content::GpuProcessHost::RecordProcessCrash()
#6 0x55e25ca13c7e content::GpuProcessHost::OnProcessCrashed()
#7 0x55e25c86010e content::BrowserChildProcessHostImpl::OnChildDisconnected()
#8 0x55e25eec0253 IPC::internal::MessagePipeReader::OnPipeError()
#9 0x55e25e6595ee mojo::InterfaceEndpointClient::NotifyError()
#10 0x55e25eec45cc IPC::(anonymous namespace)::ChannelAssociatedGroupController::NotifyEndpointOfError()
#11 0x55e25eec58ae IPC::(anonymous namespace)::ChannelAssociatedGroupController::OnPipeError()
#12 0x55e25e65541f mojo::Connector::HandleError()
#13 0x55e25e66e288 mojo::SimpleWatcher::OnHandleReady()
#14 0x55e25e66e52a mojo::SimpleWatcher::Context::Notify()
#15 0x55e25e66dba0 mojo::SimpleWatcher::Context::CallNotify()
#16 0x55e25c5d6158 mojo::core::WatcherDispatcher::InvokeWatchCallback()
#17 0x55e25c5d5acc mojo::core::Watch::InvokeCallback()
#18 0x55e25c5d21cf mojo::core::RequestContext::~RequestContext()
#19 0x55e25c5c925e mojo::core::NodeChannel::OnChannelError()
#20 0x55e25c5dac3b mojo::core::(anonymous namespace)::ChannelPosix::OnFileCanReadWithoutBlocking()
#21 0x55e25e552fbc base::MessagePumpLibevent::OnLibeventNotification()
#22 0x55e25e624a6d event_base_loop
#23 0x55e25e553347 base::MessagePumpLibevent::Run()
#24 0x55e25e4f2149 base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run()
#25 0x55e25e4c9a22 base::RunLoop::Run()
#26 0x55e25c87d004 content::BrowserProcessSubThread::IOThreadRun()
#27 0x55e25e506077 base::Thread::ThreadMain()
#28 0x55e25e5455be base::(anonymous namespace)::ThreadFunc()
#29 0x7f1a3011bb43 <unknown>
#30 0x7f1a301ada00 <unknown>

Received signal 6
#0 0x55e25e534219 base::debug::CollectStackTrace()
#1 0x55e25e498363 base::debug::StackTrace::StackTrace()
#2 0x55e25e533d61 base::debug::(anonymous namespace)::StackDumpSignalHandler()
#3 0x7f1a300c9520 <unknown>
#4 0x7f1a3011da7c pthread_kill
#5 0x7f1a300c9476 raise
#6 0x7f1a300af7f3 abort
#7 0x55e25e532b65 base::debug::BreakDebugger()
#8 0x55e25e4aa634 logging::LogMessage::~LogMessage()
#9 0x55e25ca0c5e1 content::GpuDataManagerImplPrivate::FallBackToNextGpuMode()
#10 0x55e25ca09bbf content::GpuDataManagerImpl::FallBackToNextGpuMode()
#11 0x55e25ca123b1 content::GpuProcessHost::RecordProcessCrash()
#12 0x55e25ca13c7e content::GpuProcessHost::OnProcessCrashed()
#13 0x55e25c86010e content::BrowserChildProcessHostImpl::OnChildDisconnected()
#14 0x55e25eec0253 IPC::internal::MessagePipeReader::OnPipeError()
#15 0x55e25e6595ee mojo::InterfaceEndpointClient::NotifyError()
#16 0x55e25eec45cc IPC::(anonymous namespace)::ChannelAssociatedGroupController::NotifyEndpointOfError()
#17 0x55e25eec58ae IPC::(anonymous namespace)::ChannelAssociatedGroupController::OnPipeError()
#18 0x55e25e65541f mojo::Connector::HandleError()
#19 0x55e25e66e288 mojo::SimpleWatcher::OnHandleReady()
#20 0x55e25e66e52a mojo::SimpleWatcher::Context::Notify()
#21 0x55e25e66dba0 mojo::SimpleWatcher::Context::CallNotify()
#22 0x55e25c5d6158 mojo::core::WatcherDispatcher::InvokeWatchCallback()
#23 0x55e25c5d5acc mojo::core::Watch::InvokeCallback()
#24 0x55e25c5d21cf mojo::core::RequestContext::~RequestContext()
#25 0x55e25c5c925e mojo::core::NodeChannel::OnChannelError()
#26 0x55e25c5dac3b mojo::core::(anonymous namespace)::ChannelPosix::OnFileCanReadWithoutBlocking()
#27 0x55e25e552fbc base::MessagePumpLibevent::OnLibeventNotification()
#28 0x55e25e624a6d event_base_loop
#29 0x55e25e553347 base::MessagePumpLibevent::Run()
#30 0x55e25e4f2149 base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run()
#31 0x55e25e4c9a22 base::RunLoop::Run()
#32 0x55e25c87d004 content::BrowserProcessSubThread::IOThreadRun()
#33 0x55e25e506077 base::Thread::ThreadMain()
#34 0x55e25e5455be base::(anonymous namespace)::ThreadFunc()
#35 0x7f1a3011bb43 <unknown>
#36 0x7f1a301ada00 <unknown>
  r8: 00007f1a2a6a66e0  r9: 0000000000000000 r10: 0000000000000008 r11: 0000000000000246
 r12: 0000000000000006 r13: 0000000000000016 r14: 00007f1a2a6a78a0 r15: aaaaaaaaaaaaaaaa
  di: 0000000000006ee2  si: 0000000000006eeb  bp: 0000000000006eeb  bx: 00007f1a2a6a9640
  dx: 0000000000000006  ax: 0000000000000000  cx: 00007f1a3011da7c  sp: 00007f1a2a6a6610
  ip: 00007f1a3011da7c efl: 0000000000000246 cgf: 002b000000000033 erf: 0000000000000000
 trp: 0000000000000000 msk: 0000000000000000 cr2: 0000000000000000
[end of stack trace]
Calling _exit(1). Core file will not be generated. 

To Reproduce Install using npm install -g timesnap

  1. Run timesnap ../index.html --selector=body --viewport=1920,1080 --fps=24 --duration=20 --output-pattern="mm-%03d.png"

Expected behavior I expect the directory to contain pngs.

Desktop (please complete the following information):

Additional context GPU drivers are all installed and tested working

Any help would be appreciated. Thank you.

sosukeinu commented 2 years ago

So,...the issue seems to be related to the incredibly old version of Puppeteer in use in the library. I rolled the dice and installed the latest version, and the issue has stopped. I cd'd to the timesnap root directory and issued npm install puppeteer@v15.3.2. All seems to be functional now. Thank you for such a great product.