Player
Player copied to clipboard
Allow EasyRPG Player on Wii to run from USB without crashing
Hello, is possible to make EasyRPG Player on Wii to run from USB without crashing? is because i don't use a SD on my Wii, i run all the homebrew from USB
Please attach a photo of the stack trace. And we need the exact version used, if not 0.8.
Debugging the crashes @Mimigris reported:
80530720
0x80530720: _free_r at ??:?
80530578
0x80530578: _free_r at ??:?
8021c600
0x8021c600: std::unique_ptr<midisynth::synthesizer, std::default_delete<midisynth::synthesizer> >::~unique_ptr() at /opt/devkitpro/devkitPPC/powerpc-eabi/include/c++/13.1.0/bits/unique_ptr.h:403
(inlined by) FmMidiDecoder::~FmMidiDecoder() at /var/lib/jenkins/workspace/player-wii/src/decoder_fmmidi.h:31
(inlined by) FmMidiDecoder::~FmMidiDecoder() at /var/lib/jenkins/workspace/player-wii/src/decoder_fmmidi.h:31
80013528
0x80013528: std::unique_ptr<midisequencer::sequencer, std::default_delete<midisequencer::sequencer> >::~unique_ptr() at /opt/devkitpro/devkitPPC/powerpc-eabi/include/c++/13.1.0/bits/unique_ptr.h:403
(inlined by) AudioDecoderMidi::~AudioDecoderMidi() at /var/lib/jenkins/workspace/player-wii/src/audio_decoder_midi.cpp:95
8001365c
0x8001365c: AudioDecoderMidi::~AudioDecoderMidi() at /var/lib/jenkins/workspace/player-wii/src/audio_decoder_midi.cpp:95
80019308
0x80019308: std::default_delete<AudioDecoderBase>::operator()(AudioDecoderBase*) const at /opt/devkitpro/devkitPPC/powerpc-eabi/include/c++/13.1.0/bits/unique_ptr.h:99 (discriminator 1)
(inlined by) std::unique_ptr<AudioDecoderBase, std::default_delete<AudioDecoderBase> >::~unique_ptr() at /opt/devkitpro/devkitPPC/powerpc-eabi/include/c++/13.1.0/bits/unique_ptr.h:404 (discriminator 1)
(inlined by) AudioResampler::~AudioResampler() at /var/lib/jenkins/workspace/player-wii/src/audio_resampler.cpp:231 (discriminator 1)
80019324
0x80019324: AudioResampler::~AudioResampler() at /var/lib/jenkins/workspace/player-wii/src/audio_resampler.cpp:231
80017e8c
0x80017e8c: GenericAudio::BGM_Stop() at /var/lib/jenkins/workspace/player-wii/src/audio_generic.cpp:97
800f2f18
0x800f2f18: Game_System::BgmPlay(lcf::rpg::Music const&) at /var/lib/jenkins/workspace/player-wii/src/game_system.cpp:112
80530720
0x80530720: _free_r at ??:?
80530578
0x80530578: _free_r at ??:?
801586b4
0x801586b4: Scene::MainFunction() at /var/lib/jenkins/workspace/player-wii/src/scene.cpp:175
80124e7e
0x80124e7e: Player::MainLoop() at /var/lib/jenkins/workspace/player-wii/src/player.cpp:238
801252b4
0x801252b4: Transition::instance() at /var/lib/jenkins/workspace/player-wii/src/transition.h:157
(inlined by) Player::Run() at /var/lib/jenkins/workspace/player-wii/src/player.cpp:215
80233784
0x80233784: SDL_main at /var/lib/jenkins/workspace/player-wii/src/platform/wii/main.cpp:77
Our code to handle the endianess is wrong in liblcf.
Since CMake 3.20 it is possible to check if CMAKE_CXX_BYTE_ORDER == BIG_ENDIAN (and dkp also reports this here). Check should be adopted to use this variable.
https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_BYTE_ORDER.html
This is actually a problem since moving the lcf wii builder to cmake. The pr builder still uses autotools and has the right flag :D
The problem itself is fixed.
Another issue I remember is that the program fails to launch when no SD card is inserted (but USB is). Is this still an issue?
Another issue I remember is that the program fails to launch when no SD card is inserted (but USB is). Is this still an issue?
I've just tested on my Wii without using a SD card, by storing the Player on an USB stick, the Player seems to be detected but crashes on launch, so I guess that it may still be an issue (note that I didn't tested this USB stick for long on my Wii so the issue could come from somewhere else though).
Needs a retest after the changes by c1 which also touched some Wii paths.
Needs a retest after the changes by c1 which also touched some Wii paths.
Just gave it another try, and now it launches at least :+1:, though it's not entirely that. I've tried to play 3 games:
- one in an lzh archive that was likely too big so I was stuck in an endless loading, shouldn't be related to the issue I think
- one in a folder, it worked until I encountered a crash due to #3113
- one in a zip archive, where I was met with an Invalid Save Directory error when starting it forcing the Player to shutdown
Okay I will test this further on my wiiu in January. Thanks :)