-
Notifications
You must be signed in to change notification settings - Fork 38
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
com.hippo.quickjs.android.JSEvaluationException: null at fib.js:1 #12
Comments
问题描述:
|
JSContent 支持复用,JSRuntime 也支持复用。 你遇到的问题是这个吧? QuickJS 说堆栈溢出了,但实际上并没有。 所以这是 QuickJS 在 Android 上的 bug。 简单的解决方法就是禁用堆栈检查,虽有宏来控制,但很难从编译参数上来禁用堆栈检查。
最后说一个和 issue 无关的建议,QuickJS 在 Android 上问题太多,玩一玩就行了,千万别上生产环境。 |
|
你遇到的问题是这个吧? 不是这个问题哈 |
贴下堆栈? |
2021-08-18 11:39:22.556 1932-2766/system_process E/TaskPersister: File error accessing recents directory (directory doesn't exist?).
|
代码如下
} |
onCreate 执行没问题,点击 btn2会出现崩溃, 按钮btn1 在进行初始化则不会报错。 |
不确定是不是同一个问题,你可以试试把 #define CONFIG_STACK_CHECK 注释掉。 请问你用的是什么设备什么系统? |
用的模拟器 和小米10 都有问题。 |
Hi I'm not sure I was able to follow this issue but from looking at the code and from Google Translate, this looks to be a similar issue to something I'm experiencing. Is there something I can try to resolve these somewhat random null pointer exceptions at line 1 and also stackoverflow errors? |
@sangpark Remove |
@seven332 Thanks for the info, I'm working on doing that now. But in the meantime, as I look into the issue, I see that the quickjs project has a commit that attempts to detect stack overflows It looks like the version of QuickJS this repo has a snapshot of is a bit out of date. Do you have any plans of bumping the QuickJS version and tagging a new build? |
I have quickjs library imported in Android. I dont have access to quickjs.c |
Also, is there any better library to use instead of quickJs? |
I found this library and it is working great. No more exceptions. |
"demo()" execute in onCreate() is 0K , but tap button execute "demo" happened crash. If initialize " initJSContent();" in onClick, no crash。 “JSContent” may be reused ?
是否有遇到同样的问题? jscontent 是否可以复用?
The text was updated successfully, but these errors were encountered: