xerpi / play-switch

Play! - PlayStation2 Emulator (Nintendo Switch port)
Other
40 stars 5 forks source link

Compiled binary crashes #2

Open litvaOo opened 2 years ago

litvaOo commented 2 years ago

Quick summary

After successful compilation the uploaded binary simply crashes on start and exits to hbmenu. Logs in /switch/Play/logs are not created and ps2_stderr/stdout.log files are empty.

System Details

Switch OLED, OS 14.1.1, hbmenu v3.5.0

litvaOo commented 2 years ago

Cmake logs:

cmake .. -DCMAKE_TOOLCHAIN_FILE=../deps/Dependencies/cmake-switch/switch.cmake -DBUILD_TESTS:BOOL=OFF -DENABLE_AMAZON_S3:BOOL=OFF
-- Generating for Nintendo Switch --
-- Build type: Release
Building for 9bff28ee.
-- ZSTD VERSION: 1.5.3
-- CMAKE_INSTALL_PREFIX: /opt/devkitpro/portlibs/switch
-- CMAKE_INSTALL_LIBDIR: lib
-- ZSTD_LEGACY_SUPPORT defined!
-- ZSTD_MULTITHREAD_SUPPORT is enabled
-- Could NOT find ICUUC (missing: ICUUC_LIBRARY ICUUC_INCLUDE_DIR)
-- Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY OPENSSL_INCLUDE_DIR)
-- Could NOT find ICUUC (missing: ICUUC_LIBRARY ICUUC_INCLUDE_DIR)
-- Configuring done
-- Generating done
-- Build files have been written to: /home/litva/projects/personal/play-switch/build

Build logs: makePlay_Switch_nro.txt

xerpi commented 2 years ago

I currently use nxlink to run the NRO and get logging by doing something like nc -l 28771 (or maybe 28280, see https://github.com/switchbrew/libnx/blob/master/nx/include/switch/runtime/nxlink.h).

ghost commented 1 year ago

i had same problem..... 15.0.1with14.1.1 nro crash in switch.

build use ubuntu 22.10

ghost commented 1 year ago

okay... i know why nro crash: because "play-switch/Source/ui_switch/main.cpp" had that "#define DEFAULT_FILE "/switch/Play/test.elf"" we need put that some elf to this folder, and rename to test.elf.

and i found one: http://www.billhung.net/3d/ps2/teapot/teapot.elf but this can be run in play! pc ver. switch nro report out of memory? so still crash.

but i think that crash because : "Could NOT find ICUUC" and "Could NOT find OpenSSL"

i don't know how to fix it, and i rebuild with ubuntu 20.04.5, nothing change, still crash. so, @xerpi ,please fix it. thx so much!!!

ghost commented 1 year ago

now, i test many more times. I ruled out toochain and build to nro error. when i put teapot.elf, nro will be show black screen and few second show blue screen, then show error. the error is:

Error Code:2-0003 out of command memory and no add-mem callback set

if use album run nro, AMS crashed.

i try tu build another some nro demo,it work fine. so I am very sure is source have some unknow bug.

all of this, it's done.