#14612 closed defect (fixed)
ILLUSIONS: Assertion failure in Common::File::pos() const
| Reported by: | lephilousophe | Owned by: | sluicebox |
|---|---|---|---|
| Priority: | normal | Component: | Engine: Illusions |
| Version: | Keywords: | ||
| Cc: | Game: |
Description (last modified by )
Version 2.7.1
Assertion failure: '_handle' in common/file.cpp:126 (virtual int64 Common::File::pos() const)
Here is a crash report from Google Play console:
backtrace: #00 pc 0x000000000004e178 /apex/com.android.runtime/lib64/bionic/libc.so (abort+168) #01 pc 0x0000000000552798 /apex/com.android.art/lib64/libart.so (art::Runtime::Abort(char const*)+2260) #02 pc 0x0000000000013990 /system/lib64/libbase.so (android::base::SetAborter(std::__1::function<void (char const*)>&&)::$_3::__invoke(char const*)+76) #03 pc 0x0000000000006e58 /system/lib64/liblog.so (__android_log_assert+336) #04 pc 0x00000000019cb934 /data/app/~~pUKTPjFb0jejsdE83Kh3FQ==/org.scummvm.scummvm-RRTpzGk6LLN3bUeiCMCGQA==/lib/arm64/libscummvm.so (__assert2+40) #05 pc 0x0000000003a970ec /data/app/~~pUKTPjFb0jejsdE83Kh3FQ==/org.scummvm.scummvm-RRTpzGk6LLN3bUeiCMCGQA==/lib/arm64/libscummvm.so (Common::File::pos() const+56) #06 pc 0x0000000003a48a08 /data/app/~~pUKTPjFb0jejsdE83Kh3FQ==/org.scummvm.scummvm-RRTpzGk6LLN3bUeiCMCGQA==/lib/arm64/libscummvm.so (Audio::loadWAVFromStream(Common::SeekableReadStream&, int&, int&, unsigned char&, unsigned short*, int*, int*)+64) #07 pc 0x0000000003a48f80 /data/app/~~pUKTPjFb0jejsdE83Kh3FQ==/org.scummvm.scummvm-RRTpzGk6LLN3bUeiCMCGQA==/lib/arm64/libscummvm.so (Audio::makeWAVStream(Common::SeekableReadStream*, DisposeAfterUse::Flag)+52) #08 pc 0x00000000025ab07c /data/app/~~pUKTPjFb0jejsdE83Kh3FQ==/org.scummvm.scummvm-RRTpzGk6LLN3bUeiCMCGQA==/lib/arm64/libscummvm.so (Illusions::VoicePlayer::start(short, short)+120) #09 pc 0x00000000025ab8ec /data/app/~~pUKTPjFb0jejsdE83Kh3FQ==/org.scummvm.scummvm-RRTpzGk6LLN3bUeiCMCGQA==/lib/arm64/libscummvm.so (Illusions::SoundMan::startVoice(short, short)+64) #10 pc 0x00000000025ad33c /data/app/~~pUKTPjFb0jejsdE83Kh3FQ==/org.scummvm.scummvm-RRTpzGk6LLN3bUeiCMCGQA==/lib/arm64/libscummvm.so (Illusions::TalkThread::onUpdate()+580) #11 pc 0x00000000025ae5c8 /data/app/~~pUKTPjFb0jejsdE83Kh3FQ==/org.scummvm.scummvm-RRTpzGk6LLN3bUeiCMCGQA==/lib/arm64/libscummvm.so (Illusions::Thread::update()+52) #12 pc 0x00000000025ae6c8 /data/app/~~pUKTPjFb0jejsdE83Kh3FQ==/org.scummvm.scummvm-RRTpzGk6LLN3bUeiCMCGQA==/lib/arm64/libscummvm.so (Illusions::ThreadList::updateThreads()+92) #13 pc 0x000000000258ad50 /data/app/~~pUKTPjFb0jejsdE83Kh3FQ==/org.scummvm.scummvm-RRTpzGk6LLN3bUeiCMCGQA==/lib/arm64/libscummvm.so (Illusions::IllusionsEngine_BBDOU::updateScript(unsigned int)+8) #14 pc 0x00000000025af4ec /data/app/~~pUKTPjFb0jejsdE83Kh3FQ==/org.scummvm.scummvm-RRTpzGk6LLN3bUeiCMCGQA==/lib/arm64/libscummvm.so (Illusions::UpdateFunctions::update()+116) #15 pc 0x000000000258a6d0 /data/app/~~pUKTPjFb0jejsdE83Kh3FQ==/org.scummvm.scummvm-RRTpzGk6LLN3bUeiCMCGQA==/lib/arm64/libscummvm.so (Illusions::IllusionsEngine_BBDOU::run()+2272) #16 pc 0x00000000019d60d4 /data/app/~~pUKTPjFb0jejsdE83Kh3FQ==/org.scummvm.scummvm-RRTpzGk6LLN3bUeiCMCGQA==/lib/arm64/libscummvm.so (scummvm_main+7336) #17 pc 0x00000000019c7250 /data/app/~~pUKTPjFb0jejsdE83Kh3FQ==/org.scummvm.scummvm-RRTpzGk6LLN3bUeiCMCGQA==/lib/arm64/libscummvm.so (JNI::main(_JNIEnv*, _jobject*, _jobjectArray*)+340) #18 pc 0x000000000002d308 /data/app/~~pUKTPjFb0jejsdE83Kh3FQ==/org.scummvm.scummvm-RRTpzGk6LLN3bUeiCMCGQA==/oat/arm64/base.odex (art_jni_trampoline+152) #19 pc 0x0000000000058bd4 /data/app/~~pUKTPjFb0jejsdE83Kh3FQ==/org.scummvm.scummvm-RRTpzGk6LLN3bUeiCMCGQA==/oat/arm64/base.odex (org.scummvm.scummvm.ScummVM.run+516) #20 pc 0x000000000015aaf8 /apex/com.android.art/javalib/arm64/boot.oat (java.lang.Thread.run+72) #21 pc 0x0000000000133564 /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+548) #22 pc 0x00000000001a8a6c /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200) #23 pc 0x000000000054a470 /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeVirtualOrInterfaceWithJValues<art::ArtMethod*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, jvalue const*)+460) #24 pc 0x0000000000598bcc /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1288) #25 pc 0x00000000000af97c /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64) #26 pc 0x00000000000500d0 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)
Illusions engine doesn't seem to check if WAV file can be opened before passing the File object to makeWAVStream.
Change History (5)
comment:1 by , 3 years ago
| Description: | modified (diff) |
|---|
comment:2 by , 2 years ago
| Priority: | normal → blocker |
|---|
comment:3 by , 2 years ago
| Summary: | Assertion failure in Common::File::pos() const → ILLUSIONS: Assertion failure in Common::File::pos() const |
|---|
comment:4 by , 2 years ago
| Owner: | set to |
|---|---|
| Resolution: | → fixed |
| Status: | new → closed |
comment:5 by , 2 years ago
| Priority: | blocker → normal |
|---|
My PR is merged, but I want to clarify that this was a minor bug in error handling when the game is already unplayable.
The user didn't include all of the game files. When .wav files were missing, the engine crashed with an assertion failure. Now it calls error to log the missing filename, just like it does when midi files are missing.

Fixed in the following PR:
https://github.com/scummvm/scummvm/pull/5473