On Mon, Jan 21, 2013 at 9:20 AM, Flying Jester <foolkingcr...@gmail.com>wrote:
> I'm using Linux, Fedora 17 x86_64, GCC 4.7.2, V8 3.15.11, x64.debug build. > > I tried a bit to make a small program that would cause this same problem, > but I couldn't find a simple way to do it without just using large portions > of the source of the program I'm working on. > > The call stack (that's what a stack trace means, right?) is: > > #0 ( v8::internal::OS::DebugBreak() (../src/platform-linux.cc:415) > #1 0x7d62f4 v8::internal::OS::Abort() (../src/platform-linux.cc:397) > #2 0x4669a0 V8_Fatal(file=0x81c19d "../src/isolate.h", line=442, > format=0x81bea8 "CHECK(%s) (../src/checks.cc:58) > #3 0x436cd3 v8::internal::Isolate::Current() (../src/isolate.h:442) > #4 0x466993 V8_Fatal(file=0x81c19d "../src/isolate.h", line=442, > format=0x81bea8 "CHECK(%s) (../src/checks.cc:55) > #5 0x436cd3 v8::internal::Isolate::Current() (../src/isolate.h:442) > #6 0x466993 V8_Fatal(file=0x82bba1 "../src/platform.h", line=600, > format=0x82bb70 "CHECK(%s) (../src/checks.cc:55) > #7 0x4837ff v8::internal::ScopedLock::ScopedLock(this=0x7fffffffe4e0, > mutex=0x0) (../src/platform.h:600) > #8 0x55a2fb v8::internal::Isolate::EnsureDefaultIsolate() > (../src/isolate.cc:364) > #9 0x42c27a v8::Context::New(extensions=0x0, global_template=..., > global_object=...) (../src/api.cc:4418) > #10 0x407766 __static_initialization_and_destruction_0(__priority=65535, > __initialize_p=1) (/home/Jester/Desktop/turbospheresrc/engine.cpp:16) > #11 ( _GLOBAL__sub_I__Z11exitContextv() > (/home/Jester/Desktop/turbospheresrc/engine.cpp:476) > #12 ( 0x00000000008196bd in __libc_csu_init() (??:??) > #13 0x33b34216c5 __libc_start_main() (/lib64/libc.so.6:??) > #14 ( 0x0000000000405be9 in _start() (??:??) > > I'm assuming this has to do with declaring a context? I've had issues with > this when upgrading the build of V8 I use before. > > If you want full source, it is at > http://flyingjesterentertainment.webs.com/ts-0.1.5c.tgz, but it is a tad > large and not especially clean. I can obviously post any particular part of > it, if that would help. > I think I found your problem: Don't call v8::Context::New() in a static initializer, because you depend on the linker if this works out or not. V8 has some static initializers itself, which get called too late, so you get the stack trace above. Just create the context after main() has been entered. -- v8-users mailing list v8-users@googlegroups.com http://groups.google.com/group/v8-users