Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Packet serialization #2296

Closed
qichuangguo opened this issue Jul 16, 2021 · 6 comments
Closed

Packet serialization #2296

qichuangguo opened this issue Jul 16, 2021 · 6 comments
Assignees
Labels
legacy:face detection Issues related to Face Detection platform:android Issues with Android as Platform type:support General questions

Comments

@qichuangguo
Copy link

processor.addPacketCallback("face_landmarks", new PacketCallback() {
@OverRide
public void process(Packet packet) {

        }
    });

Android:How to get coordinates from the packet, thank you

@qichuangguo
Copy link
Author

processor.addPacketCallback("face_landmarks", new PacketCallback() {
@OverRide
public void process(Packet packet) {
List<LandmarkProto.LandmarkList> vectorOfPackets = PacketGetter.getProtoVector(packet, LandmarkProto.LandmarkList.parser());
}
});

PacketGetter.getProtoVector(packet, LandmarkProto.LandmarkList.parser()); in byte[][] protoVector = nativeGetProtoVector(packet.getNativeHandle()); The method crash

2021-07-19 09:39:30.901 8605-8605/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2021-07-19 09:39:30.902 8605-8605/? A/DEBUG: Build fingerprint: 'OnePlus/OnePlus7T_CH/OnePlus7T:10/QKQ1.190716.003/2011091812:user/release-keys'
2021-07-19 09:39:30.902 8605-8605/? A/DEBUG: Revision: '0'
2021-07-19 09:39:30.902 8605-8605/? A/DEBUG: ABI: 'arm64'
2021-07-19 09:39:30.902 8605-8605/? A/DEBUG: Timestamp: 2021-07-19 09:39:30+0800
2021-07-19 09:39:30.902 8605-8605/? A/DEBUG: pid: 8412, tid: 8593, name: Thread-10 >>> com.example.holisticdemo <<<
2021-07-19 09:39:30.902 8605-8605/? A/DEBUG: uid: 10405
2021-07-19 09:39:30.902 8605-8605/? A/DEBUG: signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
2021-07-19 09:39:30.902 8605-8605/? A/DEBUG: Abort message: 'terminating with uncaught exception of type absl::lts_2020_09_23::BadStatusOrAccess: Bad StatusOr access'
2021-07-19 09:39:30.902 8605-8605/? A/DEBUG: x0 0000000000000000 x1 0000000000002191 x2 0000000000000006 x3 0000006fea90e930
2021-07-19 09:39:30.902 8605-8605/? A/DEBUG: x4 fefefefefefeff67 x5 fefefefefefeff67 x6 fefefefefefeff67 x7 7f7f7f7f7f7f7f7f
2021-07-19 09:39:30.902 8605-8605/? A/DEBUG: x8 00000000000000f0 x9 017c6e85c15e1ffa x10 0000000000000001 x11 0000000000000000
2021-07-19 09:39:30.902 8605-8605/? A/DEBUG: x12 fffffff0fffffbdf x13 0000000060f4d7d2 x14 0022784d410c532e x15 000018c043552cc8
2021-07-19 09:39:30.903 8605-8605/? A/DEBUG: x16 00000070ed26d738 x17 00000070ed24bbe0 x18 0000006fe90be000 x19 00000000000020dc
2021-07-19 09:39:30.903 8605-8605/? A/DEBUG: x20 0000000000002191 x21 00000000ffffffff x22 ffffff80ffffffc8 x23 0000006fea90eb80
2021-07-19 09:39:30.903 8605-8605/? A/DEBUG: x24 0000006fea90ea60 x25 0000006fea90eaa0 x26 0000006fe2ad54b0 x27 0000000000000002
2021-07-19 09:39:30.903 8605-8605/? A/DEBUG: x28 0000006fea90f110 x29 0000006fea90e9d0
2021-07-19 09:39:30.903 8605-8605/? A/DEBUG: sp 0000006fea90e910 lr 00000070ed1fd404 pc 00000070ed1fd430
2021-07-19 09:39:31.057 8605-8605/? A/DEBUG: backtrace:
2021-07-19 09:39:31.057 8605-8605/? A/DEBUG: #00 pc 0000000000073430 /apex/com.android.runtime/lib64/bionic/libc.so (abort+160) (BuildId: a2584ee8458a61d422edf24b4cd23b78)
2021-07-19 09:39:31.057 8605-8605/? A/DEBUG: #1 pc 0000000000d3a484 /data/app/com.example.holisticdemo-vho0x7QNq0xROrInmxPuWQ==/lib/arm64/libmediapipe_jni.so
2021-07-19 09:39:31.057 8605-8605/? A/DEBUG: #2 pc 0000000000d3a5dc /data/app/com.example.holisticdemo-vho0x7QNq0xROrInmxPuWQ==/lib/arm64/libmediapipe_jni.so
2021-07-19 09:39:31.057 8605-8605/? A/DEBUG: #3 pc 0000000000d38390 /data/app/com.example.holisticdemo-vho0x7QNq0xROrInmxPuWQ==/lib/arm64/libmediapipe_jni.so
2021-07-19 09:39:31.057 8605-8605/? A/DEBUG: #4 pc 0000000000d37d70 /data/app/com.example.holisticdemo-vho0x7QNq0xROrInmxPuWQ==/lib/arm64/libmediapipe_jni.so
2021-07-19 09:39:31.057 8605-8605/? A/DEBUG: #5 pc 0000000000d37cf0 /data/app/com.example.holisticdemo-vho0x7QNq0xROrInmxPuWQ==/lib/arm64/libmediapipe_jni.so (__cxa_throw+120)
2021-07-19 09:39:31.057 8605-8605/? A/DEBUG: #6 pc 0000000000b41390 /data/app/com.example.holisticdemo-vho0x7QNq0xROrInmxPuWQ==/lib/arm64/libmediapipe_jni.so (absl::lts_2020_09_23::internal_statusor::ThrowBadStatusOrAccess(absl::lts_2020_09_23::Status)+68)
2021-07-19 09:39:31.057 8605-8605/? A/DEBUG: #7 pc 00000000004e19fc /data/app/com.example.holisticdemo-vho0x7QNq0xROrInmxPuWQ==/lib/arm64/libmediapipe_jni.so (Java_com_google_mediapipe_framework_PacketGetter_nativeGetProtoVector+184)
2021-07-19 09:39:31.057 8605-8605/? A/DEBUG: #8 pc 0000000000140350 /apex/com.android.runtime/lib64/libart.so (art_quick_generic_jni_trampoline+144) (BuildId: bdffe04c611dbc98c8441c9efc5c6a12)
2021-07-19 09:39:31.057 8605-8605/? A/DEBUG: #9 pc 00000000001375b8 /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_static_stub+568) (BuildId: bdffe04c611dbc98c8441c9efc5c6a12)
2021-07-19 09:39:31.057 8605-8605/? A/DEBUG: #10 pc 000000000014600c /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+276) (BuildId: bdffe04c611dbc98c8441c9efc5c6a12)
2021-07-19 09:39:31.058 8605-8605/? A/DEBUG: #11 pc 00000000002e37c0 /apex/com.android.runtime/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+384) (BuildId: bdffe04c611dbc98c8441c9efc5c6a12)
2021-07-19 09:39:31.058 8605-8605/? A/DEBUG: #12 pc 00000000002dea20 /apex/com.android.runtime/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+892) (BuildId: bdffe04c611dbc98c8441c9efc5c6a12)
2021-07-19 09:39:31.058 8605-8605/? A/DEBUG: #13 pc 00000000002ec1ec /apex/com.android.runtime/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false, false>(art::interpreter::SwitchImplContext*)+15432) (BuildId: bdffe04c611dbc98c8441c9efc5c6a12)
2021-07-19 09:39:31.058 8605-8605/? A/DEBUG: #14 pc 0000000000142bd8 /apex/com.android.runtime/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: bdffe04c611dbc98c8441c9efc5c6a12)
2021-07-19 09:39:31.058 8605-8605/? A/DEBUG: #15 pc 0000000000343900 [anon:dalvik-classes.dex extracted in memory from /data/app/com.example.holisticdemo-vho0x7QNq0xROrInmxPuWQ==/base.apk] (com.google.mediapipe.framework.PacketGetter.getProtoVector)
2021-07-19 09:39:31.058 8605-8605/? A/DEBUG: #16 pc 00000000002b4bcc /apex/com.android.runtime/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEbb.llvm.12938883504528282530+488) (BuildId: bdffe04c611dbc98c8441c9efc5c6a12)
2021-07-19 09:39:31.058 8605-8605/? A/DEBUG: #17 pc 00000000002ba8d8 /apex/com.android.runtime/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216) (BuildId: bdffe04c611dbc98c8441c9efc5c6a12)
2021-07-19 09:39:31.058 8605-8605/? A/DEBUG: #18 pc 00000000002dea00 /apex/com.android.runtime/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+860) (BuildId: bdffe04c611dbc98c8441c9efc5c6a12)
2021-07-19 09:39:31.058 8605-8605/? A/DEBUG: #19 pc 00000000002ec1ec /apex/com.android.runtime/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false, false>(art::interpreter::SwitchImplContext*)+15432) (BuildId: bdffe04c611dbc98c8441c9efc5c6a12)
2021-07-19 09:39:31.058 8605-8605/? A/DEBUG: #20 pc 0000000000142bd8 /apex/com.android.runtime/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: bdffe04c611dbc98c8441c9efc5c6a12)
2021-07-19 09:39:31.058 8605-8605/? A/DEBUG: #21 pc 0000000000001524 [anon:dalvik-classes4.dex extracted in memory from /data/app/com.example.holisticdemo-vho0x7QNq0xROrInmxPuWQ==/base.apk!classes4.dex] (com.eco.hands_tracking.HandStrackingCamera$1.process)
2021-07-19 09:39:31.058 8605-8605/? A/DEBUG: #22 pc 00000000002b4bcc /apex/com.android.runtime/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEbb.llvm.12938883504528282530+488) (BuildId: bdffe04c611dbc98c8441c9efc5c6a12)
2021-07-19 09:39:31.058 8605-8605/? A/DEBUG: #23 pc 0000000000592514 /apex/com.android.runtime/lib64/libart.so (artQuickToInterpreterBridge+1032) (BuildId: bdffe04c611dbc98c8441c9efc5c6a12)
2021-07-19 09:39:31.058 8605-8605/? A/DEBUG: #24 pc 0000000000140468 /apex/com.android.runtime/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: bdffe04c611dbc98c8441c9efc5c6a12)
2021-07-19 09:39:31.058 8605-8605/? A/DEBUG: #25 pc 000000000014065c /apex/com.android.runtime/lib64/libart.so (art_quick_instrumentation_entry+252) (BuildId: bdffe04c611dbc98c8441c9efc5c6a12)
2021-07-19 09:39:31.058 8605-8605/? A/DEBUG: #26 pc 00000000000f5f94 anonymous:6fea81a000

@sgowroji sgowroji added platform:android Issues with Android as Platform legacy:face detection Issues related to Face Detection stat:awaiting response Waiting for user response type:support General questions labels Jul 19, 2021
@sgowroji
Copy link

Hi @qichuangguo, You can try something like this and #488

@qichuangguo
Copy link
Author

Thank you for your reply. I want to get the specific coordinates, which are different from this like content

@qichuangguo
Copy link
Author

Changed their own code:

processor.addPacketCallback("face_landmarks", new PacketCallback() {
@OverRide
public void process(Packet packet) {
byte[] protoBytes = PacketGetter.getProtoBytes(packet);
try {
LandmarkProto.LandmarkList landmarkList = LandmarkProto.LandmarkList.parseFrom(protoBytes);
} catch (InvalidProtocolBufferException e) {
e.printStackTrace();
}
}
});

Solved the problem

@sgowroji
Copy link

Glad to know that you resolved. We are closing this issue now.

@google-ml-butler
Copy link

Are you satisfied with the resolution of your issue?
Yes
No

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
legacy:face detection Issues related to Face Detection platform:android Issues with Android as Platform type:support General questions
Projects
None yet
Development

No branches or pull requests

2 participants