Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

(Android) Nodev0.8.1 Crash in the ExternalTwoByteString::GetChars() #3630

Closed
harlentan opened this issue Jul 4, 2012 · 6 comments
Closed

Comments

@harlentan
Copy link

Hi all,
I try to port the NodeJs-v0.8.1 to Android. And I compile it successfully on Android.
But when i try run node on Android, it crashs in the V8 function ExternalTwoByteString::GetChars().

@TooTallNate
Copy link

Define "crash". Segfault? Can you give us a gdb backtrace?

@harlentan
Copy link
Author

The backtrace:

I have use tools to convert to the function:

Fatal signal 11 (SIGSEGV) at 0x0000000a (code=1)

I/DEBUG ( 90): pid: 2918, tid: 2918 >>> node_js <<<
I/DEBUG ( 90): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0000000a
I/DEBUG ( 90): r0 0000000a r1 bef31618 r2 004e84b4 r3 2238405e
I/DEBUG ( 90): r4 bef31618 r5 bef31618 r6 0000000 r7 0000000
I/DEBUG ( 90): r8 004e84b4 r9 2238405e 10 bef3161c fp 0000000
I/DEBUG ( 90): ip 00000001 sp bef315d0 lr 40217545 pc 401d7eca cpsr 00000030
I/DEBUG ( 90): #00 pc 00144eca /system/lib/libnodejs.0.8.1.so (_ZN2v88internal21ExternalTwoByteString8GetCharsEv)
I/DEBUG ( 90): #1 pc 00184540 /system/lib/libnodejs.0.8.1.so (_ZN2v88internal21ExternalTwoByteString40ExternalTwoByteStringReadBlockIntoBufferEPNS0_6String15ReadBlockBufferEPjj)
I/DEBUG ( 90): #2 pc 00188dd0 /system/lib/libnodejs.0.8.1.so (_ZN2v88internal6String16IsTwoByteEqualToENS0_6VectorIKtEE)
I/DEBUG ( 90): #3 pc 00188e2a /system/lib/libnodejs.0.8.1.so (ZN2v88internal6String9ReadBlockEPS1_PhjPjS4)
I/DEBUG ( 90): #4 pc 00188e58 /system/lib/libnodejs.0.8.1.so (_ZN2v88internal6String14IsAsciiEqualToENS0_6VectorIKcEE)
I/DEBUG ( 90): #5 pc 0018ad54 /system/lib/libnodejs.0.8.1.so (_ZN2v88internal6String9ToCStringENS0_14AllowNullsFlagENS0_14RobustnessFlagEiiPi)
I/DEBUG ( 90): #6 pc 0018af8a /system/lib/libnodejs.0.8.1.so (_ZN2v88internal6String9ToCStringENS0_14AllowNullsFlagENS0_14RobustnessFlagEPi)
I/DEBUG ( 90): #7 pc 0016ac10 /system/lib/libnodejs.0.8.1.so (_ZN2v88internal7Isolate7DoThrowEPNS0_6ObjectEPNS0_15MessageLocationE)
I/DEBUG ( 90): #8 pc 0016ac4a /system/lib/libnodejs.0.8.1.so (_ZN2v88internal7Isolate5ThrowEPNS0_6ObjectEPNS0_15MessageLocationE)
I/DEBUG ( 90): #9 pc 00230c84 /system/lib/libnodejs.0.8.1.so (_ZN2v88internal2IC14ReferenceErrorEPKcNS0_6HandleINS0_6StringEEE)
I/DEBUG ( 90): #10 pc 002330b2 /system/lib/libnodejs.0.8.1.so (_ZN2v88internal6LoadIC4LoadENS0_16InlineCacheStateENS0_6HandleINS0_6ObjectEEENS3_INS0_6StringEEE)
I/DEBUG ( 90): #11 pc 0023317c /system/lib/libnodejs.0.8.1.so (_ZN2v88internal11LoadIC_MissENS0_9ArgumentsEPNS0_7IsolateE)

the backtrace function above is as below
v8::internal::ExternalTwoByteString::GetChars()
v8::internal::ExternalTwoByteString::ExternalTwoByteStringReadBlockIntoBuffer(v8::internal::String::ReadBlockBuffer_, unsigned int_, unsigned int)
v8::internal::String::IsTwoByteEqualTo(v8::internal::Vector)
v8::internal::String::ReadBlock(v8::internal::String_, unsigned char_, unsigned int, unsigned int_, unsigned int_)
v8::internal::String::IsAsciiEqualTo(v8::internal::Vector)
v8::internal::String::ToCString(v8::internal::AllowNullsFlag, v8::internal::RobustnessFlag, int, int, int_)
v8::internal::String::ToCString(v8::internal::AllowNullsFlag, v8::internal::RobustnessFlag, int_)
v8::internal::Isolate::DoThrow(v8::internal::Object_, v8::internal::MessageLocation_)
v8::internal::Isolate::Throw(v8::internal::Object_, v8::internal::MessageLocation_)
v8::internal::IC::ReferenceError(char const_, v8::internal::Handlev8::internal::String)
v8::internal::LoadIC::Load(v8::internal::InlineCacheState, v8::internal::Handlev8::internal::Object, v8::internal::Handlev8::internal::String)
v8::internal::LoadIC_Miss(v8::internal::Arguments, v8::internal::Isolate_)

@harlentan
Copy link
Author

Now I have get over the V8 segfault. And now i run node, i catch up with the errors:

node.js:220
config = config.split('\n').slice(1).join('\n').replace(/'/g, '"');
^
TypeError: Cannot call method 'split' of undefined
at Function.startup.processConfig (node.js:220:21)
at startup (node.js:46:13)
at node.js:611:3

@bnoordhuis
Copy link
Member

Android is not a supported platform and we're already stretched thin enough that I don't want to waste time on this. But try talking to @paddybyers (paddybyers in #libuv on freenode.org), he has done a lot of work on getting node ported to android.

@mattn
Copy link

mattn commented Jan 4, 2013

I got same build error for building v8 (not nodejs). Could you please let me know how to fix this?

@Mithgol
Copy link

Mithgol commented Jan 4, 2013

You probably should just go and talk with @paddybyers as well.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants