Android JNI 在 WVGA 设备上崩溃,但在 HVGA 设备上不会崩溃

发布于 2024-10-06 15:27:39 字数 327 浏览 0 评论 0原文

我正在做一些 bimap 操作,并且我的代码在 HVGA 上运行良好 设备。

然而,在 WVGA 上,JNI 因段错误而崩溃。

潜在的差异是什么?需要明确的是,我正在访问 位图通过以下伪代码:

ret = AndroidBitmap_lockPixels(env, bmp, &dpixels) 
dpixels[pos] = // some color distortion 

由于 sig 错误,我猜测我正在访问坏内存 通过 dpixels 寻址。但我不清楚为什么会有 WVGA 和 WVGA 之间的区别HVGA 设备。

I'm doing some bimap manipulation, and my code works well on HVGA
devices.

However, on WVGA, the JNI crashes with a seg fault.

What could the potential difference be? To be clear I am accessing
bitmaps through the following pseudocode:

ret = AndroidBitmap_lockPixels(env, bmp, &dpixels) 
dpixels[pos] = // some color distortion 

Due to the sig fault I am guessing that I am accessing a bad memory
address through dpixels. But I am not clear why there would be a
difference between WVGA & HVGA devices.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文