Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

SimCity randomly crashes on rendering audio units

Abierto
#386 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
25/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
rust
Área
backend

Línea de trabajo

Start by reading the audio-unit rendering entry point, render_audio_unit(), and the SimCity-specific audio-disabling hack linked in the issue. The report identifies a null-page access during the host-to-guest AURenderCallback call but gives no exact reproduction steps. Done means resolving the intermittent crash during audio playback so the workaround is no longer needed.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug (supported app)
App DB report link

https://appdb.touchhle.org/apps/250

App name

SimCity

App version

1.0.0

touchHLE version

v0.2.2-400-ga76f7138

Operating system

macOS 15

GPU

Apple M1 GPU

What is the problem with the app?

Since introduction of support for rendering audio units, music and sounds are started to work too in SimCity. Unfortunately, this also lead to some random crashes during audio playback.

The exact PC address of the crash can vary from crash to crash and not quite stable.
There is no exact steps to reproduce, but letting music play for 5-10 minutes from the app start certainly leads to a crash.

So far following traits were identified:

  1. It is always "Attempted null-page access at 0x0 (0x4 bytes)"
  2. It always originates from a host-to-guest call of AURenderCallback in render_audio_unit()

The crash is currently mitigated by a game specific hack which just disables audio for SimCity:
https://github.com/touchHLE/touchHLE/commit/7a50561ef8c33097110b462003d2ec0bca994c90

If touchHLE crashed, please paste the log output.
thread 'main' panicked at src/mem.rs:350:9:
Attempted null-page access at 0x0 (0x4 bytes)
stack backtrace:
   0: _rust_begin_unwind
   1: core::panicking::panic_fmt
   2: touchHLE::mem::Mem::null_check_fail
   3: _touchHLE_cpu_read_u32
   4: __ZN8touchHLE3cpu11Environment12MemoryRead32Ej
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread 'main' panicked at src/environment.rs:794:13:
Error during CPU execution: MemoryError
stack backtrace:
   0: _rust_begin_unwind
   1: core::panicking::panic_fmt
   2: touchHLE::environment::Environment::debug_cpu_error
   3: touchHLE::environment::Environment::run_inner
   4: <touchHLE::abi::GuestFunction as touchHLE::abi::CallFromHost<R,(P0,P1,P2,P3,P4,P5)>>::call_from_host
   5: touchHLE::frameworks::audio_toolbox::audio_unit::render_audio_unit
   6: touchHLE::frameworks::foundation::ns_run_loop::run_run_loop
   7: <fn(&mut touchHLE::environment::Environment,P0,P1) .> R as touchHLE::abi::CallFromGuest>::call_from_guest
   8: touchHLE::objc::messages::objc_msgSend_inner
   9: <fn(&mut touchHLE::environment::Environment,P0,P1) .> R as touchHLE::abi::CallFromGuest>::call_from_guest
  10: touchHLE::frameworks::uikit::ui_application::UIApplicationMain
  11: <fn(&mut touchHLE::environment::Environment,P0,P1,P2,P3) .> R as touchHLE::abi::CallFromGuest>::call_from_guest
  12: touchHLE::environment::Environment::run_inner
  13: touchHLE::environment::Environment::run
  14: touchHLE::main
  15: touchHLE::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Register state immediately after panic:
         R0: 0x30199160  R1: 0x30199160  R2: 0x37a1b960  R3: 0x37a1b954
         R4: 0x00000001  R5: 0x301adff4  R6: 0x30199160  R7: 0x37a1b930
         R8: 0x00000000  R9: 0x00000000 R10: 0x3019b7f0 R11: 0x301adff0
        R12: 0x004766f4  SP: 0x37a1b8ec  LR: 0x0040507c  PC: 0x00407bfc
Attempting to produce stack trace for thread 1:
 0. 0x407bfc (PC)
 1. 0x40507c (LR)
 2. 0x40507c
 3. 0x40e29c
 4. 0x41032c
 5. 0x3c34c4
 6. 0x3a710c
 7. 0x3f7264
 8. 0x3f633c
 9. 0x3f4164
10. 0x3a0b20
11. 0x3fb4cc
12. 0x402c1c
13. [thread exit]
By submitting this issue, I certify that…
  • I have tested that this version of this app is at least partially working in a previous version of touchHLE.
  • I understand that linking to, discussing or asking for pirated content is not permitted, and will lead to an immediate ban.
  • I understand that “Abandonware” and illegal copies of free games are also pirated content.
Lenguaje dominante
Rust
Estrellas
4k
Forks
344
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de touchHLE/touchHLE

Todos los issues de touchHLE/touchHLE

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.