Opened 5 years ago

Closed 5 years ago

#11292 closed defect (fixed)

3DS Port Long Load-times for SCI32

Reported by: MarioKartFan Owned by: bgK
Priority: normal Component: --Unset--
Version: Keywords:
Cc: Game:

Description

The excellent 3DS port takes over a minute to load SCI32 games. SCUMM and Tinsel games load instantaneously. Interestingly, if you custom build SCI32 games with Mr Hyuu’s fork, they load almost instantly.

Attachments (1)

crash_dump_00000025.dmp (1.7 KB ) - added by MarioKartFan 5 years ago.
Luma Crash Dump

Download all attachments as: .zip

Change History (7)

comment:1 by bgK, 5 years ago

Is this using the development or stable build? Does it happen each time you start the game or only the first time?

The development build has an optimization that was meant to accelerate the startup of sci32 games. It still takes 10-20 seconds for me though.

comment:2 by MarioKartFan, 5 years ago

This is using the stable build. Unfortunately the development build crashes for me whenever I try to launch any game.

The long load time exists each time I start an SCI32 game but once it loads it works well (no incremental lengthy loads when saving or restoring old saved game’s).

comment:3 by MarioKartFan, 5 years ago

Just to clarify: I tested again on 2DSXL using latest Luma. I checked out the latest development build tonight and it once again crashed with an “ARM11 - Translation” error.

comment:4 by bgK, 5 years ago

Oh, ok. Let's focus on the elephant in the room then :) Would it be possible for you to capture a backtrace of the crash? It's a bit of a convoluted process but I can't do much without it. I'll describe it here if you are not familiar:

  1. Get the 3DS build from this address, install it: https://ufile.io/r6cuh984 It's the same as the development build but contains binary files with debug symbols.
  2. Get devkitARM from here: https://devkitpro.org/wiki/Getting_Started. You don't need to get the whole thing working, just the GDB debugger.
  3. Start ScummVM on your 3DS, go to the Rosalina menu (L+Down+Select), enable the debugger (Debugger options > enable debugger), go to the process list and select ScummVM (3dsx_app if you used the homebrew launcher). Take note of the IP address of your 3DS and the debugger port. They are displayed in the menu. For me, it's 192.168.1.87:4000. Close the Rosalina menu. If it closes ScummVM, try again, but open a dialog in ScummVM before opening the Rosalina menu (The keypress to close Rosalina is sometimes passed to ScummVM).
  4. On your computer in the devkitARM shell, run "arm-none-eabi-gdb /path/to/scummvm.elf" (with the location where you downloaded that file). Then, in GDB, enter "target remote 192.168.1.87:4000" (with your IP and port) to connect to the 3DS. Enter 'c' to resume execution.
  5. On the 3DS, reproduce the crash.
  6. On the computer, GDB should have trapped the error. Enter "thread apply all bt" to print a backtrace.

Please copy the backtrace here as well as other warnings or messages you may see in the debugger output.

In case you don't succeed in capturing a backtrace, please attach the crash dump from the Luma error screen (they are saved on the SD card in /luma/dumps).

Last edited 5 years ago by bgK (previous) (diff)

comment:5 by MarioKartFan, 5 years ago

I followed your instructions. I am really not sure whether this is helpful, but here you go! I also uploaded a crash dump.

Target 'qfg4-cd-win' lacks an engine ID, upgrading...

Thread 1 received signal SIGSEGV, Segmentation fault.
[Switching to Thread 304]
0x00421ac0 in strlen ()
(gdb) thread apply all bt

Thread 7 (Thread 315):
#0 svcSleepThread () at /home/fincs/pacman-packages/libctru/src/ctrulib-1.6.0/libctru/source/svc.s:88
#1 0x0010acb0 in _3DS::eventThreadFunc (arg=0x8013e90) at ../backends/platform/3ds/osystem-events.cpp:62
#2 0x002eea74 in _thread_begin (arg=<optimized out>) at /home/fincs/pacman-packages/libctru/src/ctrulib-1.6.0/libctru/source/thread.c:37
#3 0x00000000 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 6 (Thread 314):
#0 svcSleepThread () at /home/fincs/pacman-packages/libctru/src/ctrulib-1.6.0/libctru/source/svc.s:88
#1 0x0010a89c in _3DS::timerThreadFunc (arg=0x8013400) at ../backends/platform/3ds/osystem-events.cpp:281
#2 0x002eea74 in _thread_begin (arg=<optimized out>) at /home/fincs/pacman-packages/libctru/src/ctrulib-1.6.0/libctru/source/thread.c:37
#3 0x00000000 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 5 (Thread 313):
#0 svcSleepThread () at /home/fincs/pacman-packages/libctru/src/ctrulib-1.6.0/libctru/source/svc.s:88
#1 0x0010a5cc in _3DS::audioThreadFunc (arg=0x8030e70) at ../backends/platform/3ds/osystem-audio.cpp:56
#2 0x002eea74 in _thread_begin (arg=<optimized out>) at /home/fincs/pacman-packages/libctru/src/ctrulib-1.6.0/libctru/source/thread.c:37
#3 0x00000000 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 4 (Thread 312):
--Type <RET> for more, q to quit, c to continue without paging--<RET>
#0 svcWaitSynchronization () at /home/fincs/pacman-packages/libctru/src/ctrulib-1.6.0/libctru/source/svc.s:261
#1 0x002f0c3c in ndspWaitForIrq () at /home/fincs/pacman-packages/libctru/src/ctrulib-1.6.0/libctru/source/ndsp/ndsp.c:40
#2 ndspSync () at /home/fincs/pacman-packages/libctru/src/ctrulib-1.6.0/libctru/source/ndsp/ndsp.c:335
#3 0x002f0e10 in ndspThreadMain (arg=<optimized out>) at /home/fincs/pacman-packages/libctru/src/ctrulib-1.6.0/libctru/source/ndsp/ndsp.c:358
#4 0x002eea74 in _thread_begin (arg=<optimized out>) at /home/fincs/pacman-packages/libctru/src/ctrulib-1.6.0/libctru/source/thread.c:37
#5 0x00000000 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 3 (Thread 310):
#0 svcWaitSynchronization () at /home/fincs/pacman-packages/libctru/src/ctrulib-1.6.0/libctru/source/svc.s:261
#1 0x002f3420 in gspEventThreadMain (arg=<optimized out>) at /home/fincs/pacman-packages/libctru/src/ctrulib-1.6.0/libctru/source/services/gspgpu.c:156
#2 0x002eea74 in _thread_begin (arg=<optimized out>) at /home/fincs/pacman-packages/libctru/src/ctrulib-1.6.0/libctru/source/thread.c:37
#3 0x00000000 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 2 (Thread 305):
#0 svcWaitSynchronizationN () at /home/fincs/pacman-packages/libctru/src/ctrulib-1.6.0/libctru/source/svc.s:271
#1 0x002f416c in aptEventHandler (arg=<optimized out>) at /home/fincs/pacman-packages/libctru/src/ctrulib-1.6.0/libctru/source/services/apt.c:348
#2 0x00000000 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 1 (Thread 304):
#0 0x00421ac0 in strlen ()
#1 0x002ba944 in Common::String::operator= (this=0x8007a68, this@entry=0x8007a60, str=0x6b4758 <error: Cannot access memory at address 0x6b4758>) at ../common/str.cpp:241
#2 0x0011bc44 in EngineManager::upgradeTargetForEngineId (this=this@entry=0x859ff08, target=...) at ../base/plugins.cpp:753
#3 0x0011c090 in EngineManager::upgradeTargetIfNecessary (this=this@entry=0x859ff08, target=...) at ../base/plugins.cpp:694
#4 0x0010cd20 in scummvm_main (argc=argc@entry=0, argv=argv@entry=0x0) at ../common/config-manager.h:157
#5 0x00105d10 in main (argc=0, argv=0x0) at ../backends/platform/3ds/main.cpp:52

Last edited 5 years ago by MarioKartFan (previous) (diff)

by MarioKartFan, 5 years ago

Attachment: crash_dump_00000025.dmp added

Luma Crash Dump

comment:6 by bgK, 5 years ago

Owner: set to bgK
Resolution: fixed
Status: newclosed

Thanks! The crash has been fixed in commit 9454346. Development builds with version 2.2.0git-1753 and above contain the fix.
The first game launch will still be slow, but subsequent launches should be faster.

Note: See TracTickets for help on using tickets.