Assertion from V8 inspector logic because it's trying to use unimplemented code

19 views
Skip to first unread message

Dan Pike

unread,
Sep 16, 2018, 11:24:47 AM9/16/18
to v8-dev
I have just started to use the V8 inspector and I am getting an assertion from V8 when I try to debug my code using the console of Chrome DevTools running on Windows. To me, it seems that the V8 inspector is trying to use a timeout of 500ms on a delayed task call that then gets passed in to some code that says "no one uses a non-zero timeout, so we don't need to implement it". :)

I imagine that I need to set some flag or other while building my inspector client/channel, but I'm not sure where to look, so I would appreciate some pointers, please.

I attach a couple of screenshots that show the stack trace, the code that is triggering the "UNIMPLEMENTED" assertion and the source of the no-zero timeout. The full stack trace is:

   00000000()  Unknown
   
[Frames below may be incorrect and/or missing]  Unknown
   v8_libbase
.dll!v8::base::OS::Abort() Line 903   C++
   v8_libbase
.dll!V8_Fatal(const char * file, int line, const char * format, ...) Line 172   C++
>  v8_libplatform.dll!v8::platform::DefaultWorkerThreadsTaskRunner::PostDelayedTask(std::unique_ptr<v8::Task,std::default_delete<v8::Task> > task, double delay_in_seconds) Line 50 C++
   v8_libplatform
.dll!v8::platform::DefaultPlatform::CallDelayedOnWorkerThread(std::unique_ptr<v8::Task,std::default_delete<v8::Task> > task, double delay_in_seconds) Line 203  C++
   v8
.dll!v8_inspector::V8InspectorImpl::EvaluateScope::setTimeout(double timeout) Line 434  C++
   v8
.dll!v8_inspector::V8DebuggerAgentImpl::evaluateOnCallFrame(const v8_inspector::String16 & callFrameId, const v8_inspector::String16 & expression, v8_inspector::protocol::Maybe<v8_inspector::String16> objectGroup, v8_inspector::protocol::Maybe<bool> includeCommandLineAPI, v8_inspector::protocol::Maybe<bool> silent, v8_inspector::protocol::Maybe<bool> returnByValue, v8_inspector::protocol::Maybe<bool> generatePreview, v8_inspector::protocol::Maybe<bool> throwOnSideEffect, v8_inspector::protocol::Maybe<double> timeout, std::unique_ptr<v8_inspector::protocol::Runtime::RemoteObject,std::default_delete<v8_inspector::protocol::Runtime::RemoteObject> > * result, v8_inspector::protocol::Maybe<v8_inspector::protocol::Runtime::ExceptionDetails> * exceptionDetails) Line 1082 C++
   v8
.dll!v8_inspector::protocol::Debugger::DispatcherImpl::evaluateOnCallFrame(int callId, const v8_inspector::String16 & method, const v8_inspector::String16 & message, std::unique_ptr<v8_inspector::protocol::DictionaryValue,std::default_delete<v8_inspector::protocol::DictionaryValue> > requestMessageObject, v8_inspector::protocol::ErrorSupport * errors) Line 1052 C++
   v8
.dll!v8_inspector::protocol::Debugger::DispatcherImpl::dispatch(int callId, const v8_inspector::String16 & method, const v8_inspector::String16 & message, std::unique_ptr<v8_inspector::protocol::DictionaryValue,std::default_delete<v8_inspector::protocol::DictionaryValue> > messageObject) Line 920 C++
   v8
.dll!v8_inspector::protocol::UberDispatcher::dispatch(int callId, const v8_inspector::String16 & method, std::unique_ptr<v8_inspector::protocol::Value,std::default_delete<v8_inspector::protocol::Value> > parsedMessage, const v8_inspector::String16 & rawMessage) Line 816 C++
   v8
.dll!v8_inspector::V8InspectorSessionImpl::dispatchProtocolMessage(const v8_inspector::StringView & message) Line 329 C++

Many thanks,

Dan
v8InspectorUnimplemented1.jpg
v8InspectorUnimplemented2.jpg

Yang Guo

unread,
Sep 17, 2018, 1:18:19 AM9/17/18
to v8-...@googlegroups.com
Hi Dan,

the reason non-zero delays are not implemented is because this is just the default task runner used in V8 for for testing purposes. You are supposed to implement your own v8::Platform class, that returns your own implementation of v8::TaskRunner through v8::Platform::GetForegroundTaskRunner.

I hope this helps.

Cheers,

Yang

--
--
v8-dev mailing list
v8-...@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-dev+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

oga...@gmail.com

unread,
Sep 17, 2018, 1:53:34 AM9/17/18
to v8-...@googlegroups.com

Hi Yang,

 

That would explain it!

 

I hadn’t realised that I needed to implement the platform, too. It was probably something that I read somewhere and then quickly forgot about. :(

 

Many thanks,

 

Dan

You received this message because you are subscribed to a topic in the Google Groups "v8-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/v8-dev/bMjbMGXVrME/unsubscribe.
To unsubscribe from this group and all its topics, send an email to v8-dev+un...@googlegroups.com.

gra...@grahamreeves.com

unread,
Sep 19, 2018, 6:42:35 AM9/19/18
to v8-dev
I've spent the last couple of weeks with this;

And eventually found the same conclusion. (Node, chromium, all implement their own platforms)

The last post has a very hacky proxy platform implementation which works around it.

It would be nice if the wiki made a note about this. 
Or if the core implementation had a similar workaround, as it's pretty much the only thing that stops CDT from working from a stock v8 implementation.
Reply all
Reply to author
Forward
0 new messages