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

arm64-v8a架构的libmarsstn.so导致crash #187

Closed
songzhangzhang opened this issue Mar 25, 2017 · 7 comments
Closed

arm64-v8a架构的libmarsstn.so导致crash #187

songzhangzhang opened this issue Mar 25, 2017 · 7 comments
Assignees
Labels

Comments

@songzhangzhang
Copy link

songzhangzhang commented Mar 25, 2017

机型: 红米Note3
Android版本: 5.1.1 LMY47V
MIUI版本: MIUI 8.0.7.0

现象: 如果只包含 armeabi架构的libmarsstn.so,不会出现崩溃。但是,如果只包含arm64-v8a架构的libmarsstn.so,在连接成功后,过5秒钟就会出崩溃(我设的心跳包时间间隔为5秒

@garryyan
Copy link
Collaborator

是的 我这边在试图重现了

@songzhangzhang
Copy link
Author

songzhangzhang commented Mar 28, 2017

@jehoochen @garryyan 应该是 Java_com_tencent_mars_comm_Alarm_onAlarm 这个函数里的类型转换的问题, 我把long long改为int64_t就不崩溃了。

MessageQueue::BroadcastMessage(MessageQueue::GetDefMessageQueue(), MessageQueue::Message(KALARM_MESSAGETITLE, (long long)id, 0));

@garryyan
Copy link
Collaborator

我这里在试图重现 结果 手上的手机和你的系统不一样没出现。 这里的猜测是在你那个系统下int64_t 并不是用long long来定义的,可能是别的数据类型,换句话来说 int64_t 在你那个系统下和long long 并不等价,因为我这里重现困难。 你方便的话麻烦帮我试下在那个机器上 typeid(long long)==typeid(int64_t)这个表达式的值?

@garryyan
Copy link
Collaborator

@songzhangzhang 可以给我们提个pr fix掉这个问题?如果你不方便的话 我们就直接fix掉。

@songzhangzhang
Copy link
Author

songzhangzhang commented Mar 29, 2017

@garryyan 我测了一下, typeid(long long)==typeid(int64_t) 的值是false。如果只编译arm64-v8a架构的so,然后让apk里只包含这一种so,应该很容易复现的。已经给你们提了个pr。

@garryyan
Copy link
Collaborator

不一定是必现的。这种问题是系统相关的问题。 麻烦你把pr提到dev分支上

@garryyan garryyan added the bug label Mar 29, 2017
@garryyan
Copy link
Collaborator

fixed in 0964fd8

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

No branches or pull requests

3 participants