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
android: signal 7 (SIGBUS), code 1 (BUS_ADRALN) #197
Comments
гугл говорит, что ошибка с выравниванием какая-то Looks like it is related to memory alignment =\ |
если заменить все вызовы If I remove all
|
Чего-то я чувствую, самым эффективным способом решения проблемы будет попытка создать минимальный пример такой ошибки и https://github.com/rust-lang/rust/issues . Но это если получится воспроизвести на малом количестве кода, потому что остальная математика, вроде, вполне себе рабочая на телефоне. Еще есть вариант старые версии cargo-apk попробовать, на всякий. |
not-fl3 предложил попробовать убрать not-fl3 proposed removing of |
убрал repr(C, packed) из объявления типов в cgmath - помогло. Вопрос теперь в том, что с этим делать дальше) Yay, it works without |
Для начала надо обновиться до cgmath 0.10, до этого ничего делать не стоит Anyway, first I must update to cgmath 0.10 |
Blocked by #190 |
Экспериментальным путем выяснено, что для нормального функционирования ZoC на андроиде можно убирать Minimal cgmath patch: diff --git a/src/point.rs b/src/point.rs
index 8ee8393..394eeba 100644
--- a/src/point.rs
+++ b/src/point.rs
@@ -52,9 +52,8 @@ pub struct Point2<S> {
/// A point in 3-dimensional space.
///
/// This type is marked as `#[repr(C, packed)]`.
-#[repr(C, packed)]
#[derive(PartialEq, Eq, Copy, Clone, Hash)]
#[cfg_attr(feature = "rustc-serialize", derive(RustcEncodable, RustcDecodable))]
#[cfg_attr(feature = "eders", derive(Serialize, Deserialize))]
pub struct Point3<S> {
diff --git a/src/vector.rs b/src/vector.rs
index d3c7997..35238d5 100644
--- a/src/vector.rs
+++ b/src/vector.rs
@@ -39,9 +39,9 @@ pub struct Vector1<S> {
/// A 2-dimensional vector.
///
/// This type is marked as `#[repr(C, packed)]`.
-#[repr(C, packed)]
#[derive(PartialEq, Eq, Copy, Clone, Hash)]
#[cfg_attr(feature = "rustc-serialize", derive(RustcEncodable, RustcDecodable))]
#[cfg_attr(feature = "eders", derive(Serialize, Deserialize))]
pub struct Vector2<S> { Хз почему именно так, странно все это. I still don't understand why |
Надо попробовать создать отдельный репозиторий с минимальным примеров воспроизведения аналогичной ошибки. Может задачу стоит и в https://github.com/rust-lang/rust/issues сразу создавать, хз. Should I create an issue in cgmath repo? Or in rust-lang/rust? Hmmm |
Из мастера cgmath удалили All |
С переопределенными зависимостями прошло хорошо, надо теперь настоящие зависимости починить: cgmath обновлен и выложен на crates.io, но collision-rs надо обновить самому. С виду ничего очень сложного, просто так же перепилить на использование пакета approx. It works ok with overriden deps, now real deps must be updated. Bjz updated Not I'll go and update |
Done. Waiting for https://github.com/csherratt/collision-rs/pull/20 |
На данный момент это происходит в ветке WIP_gfx, но мне что-то подсказывает, что оно не пропадет после вливания в мастер.
RIght now it crashes in WIP_gfx branch, but looks like it still be crashing after merging to into master.
т.е. вообще какая-то внезапная ошибка не с самой графикой, а с геометрическими вычислениями О.о
Very strange error: it is not caused by GFX or something graphics-related, just math in Core module O.o
что, блин, в этой функции так громко упасть вообще может я даже не знаю
I have no idead what can go wrong in that simple func
The text was updated successfully, but these errors were encountered: