It's really difficult to even begin guessing what could cause this: without
the source, and more information about the crash like a call stack and
values of local variables, there's not much I can do.

In general, compiling the code with asan might provide additional insights
as to what corrupts the memory.

Best
Jochen

On Thu, Mar 10, 2016, 10:22 PM George Corney <[email protected]> wrote:

> Hey,
>
> I'm hoping someone with more experience than me can shed some light on my
> issue.
>
> v8 is being run on a separate thread to the main thread, all interactions
> with v8 occur on this thread
>
> The problem is that when an action (playing/pausing a film in android's
> MediaPlayer) occurs on the main thread, the app has a high chance of
> crashing either straight away or after a short period (can be as high as
> 600ms).
>
> The crash is always the same (with differing address(:
>
> signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x45524854
> Although occasionally SEGV_ACCERR might be SEGV_MAPERR.
>
> Stack frame #00 pc 0061d3ec  /[...]/lib/arm/libnative_webgl.so
> (v8::internal::AstValueFactory::Internalize(v8::internal::Isolate*)+56)
>
> SEGV_ACCERR and SEGV_MAPERR surely imply that the v8 thread is accessing
> data on another thread, but as far as my code is concerned, nothing
> interesting is happening when the crash occurs and if there are any calls
> to js land they're happening on the thread v8 was created with.
>
> The code for AstValueFactory::Internalize is
> void AstValueFactory::Internalize(Isolate* isolate) {
>   if (isolate_) {
>     // Everything is already internalized.
>     return;
>   }
>   // Strings need to be internalized before values, because values refer to
>   // strings.
>   for (int i = 0; i < strings_.length(); ++i) {
>     strings_[i]->Internalize(isolate);
>   }
>   for (int i = 0; i < values_.length(); ++i) {
>     values_[i]->Internalize(isolate);
>   }
>   isolate_ = isolate;
> }
>
>
> Do you have any thoughts about what could cause this? If the media player
> action is corrupting memory in some way, is there some reason that it
> always crashes on this particular function?
>
> I'm using v8 3.2.8 on Android (via NDK). (unfortunately upgrading to more
> recent v8 isn't an option).
>
> v8::Locker is used before every handle_scope, should I be doing something
> else to ensure thread safety?
>
> Been on this problem for a long time now, any insight someone might have
> will be useful.
>
> Thanks,
> George Corney
>
> --
> --
> v8-users mailing list
> [email protected]
> http://groups.google.com/group/v8-users
> ---
> You received this message because you are subscribed to the Google Groups
> "v8-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

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

Reply via email to