Core-2-Extreme / Video_player_for_3DS

Video player for 3ds
https://gbatemp.net/threads/release-video-player-for-3ds.586094
GNU General Public License v3.0
186 stars 17 forks source link

Crash with latest master (aab57fc) on New 2DS XL #46

Closed Yrouel closed 2 years ago

Yrouel commented 2 years ago

After your latest fix I managed to compile this on my Mac however both the 3dsx and the cia versions crash on my N2DSXL with latest firmware and Luma.

crash_dumps.zip

cia_crash 3dsx_crash

Core-2-Extreme commented 2 years ago

For me it worked on NEW3DS and OLD3DS. (I don't have NEW2DS) According to your crash dump, it might crash around https://github.com/Core-2-Extreme/Video_player_for_3DS/blob/main/source/system/setting_menu.cpp#L303 so can you remove that line and check if it crashs? If it crashs, please send me crash dump once more.

Yrouel commented 2 years ago

Still crashes

crash_dump_00000000.dmp.zip

IMG_6985

Core-2-Extreme commented 2 years ago

ok, then run [your_devkitPro_folder]\devkitARM\bin\arm-none-eabi-gdb [path/to/Video_player_for_3DS.elf] on your computer. Then open luma menu on your 3DS and go to debugger options -> select enable debugger -> select force debug next application -> close luma menu -> run video player for 3ds on your computer type target remote [your 3ds local IP address]:4003 after it connects, type c to continue you should see Segmentation fault message then type info thread and bt to get informations finally type quit to quit.

Send entire logs here.

Yrouel commented 2 years ago

Ok I did everything and I'm attaching the shell output if there are actual .log files I haven't found them. These are the "normal" cia version and then the one after you told me to comment that line

shell.txt

shell_commented_line.txt

Core-2-Extreme commented 2 years ago

It crashes exactly at setting_menu.cpp:303 Did you comment out it?

Yrouel commented 2 years ago

Yes I run the cia version both ways I attached both debug logs

Core-2-Extreme commented 2 years ago

Oh, sorry I have missed it. Then, comment line 1225 and 1226 out and try again.

Yrouel commented 2 years ago

Now it just hangs with both black screens. Even in the debugger it stays at Continuing. but nothing happens. However it doesn't crash either, I can just hit Home and close it

Yrouel commented 2 years ago

Hey so I got it working. I simply cloned again latest master and replaced libctru.a and libctrud.a with the versions I had already installed as part of devkitpro (libctru 2.1.0-1).

Perhaps consider not duplicating stuff in your repo that already exists as part of the "standard" devkitpro/devkitarm toolchain

Core-2-Extreme commented 2 years ago

I'm using custom libctru so using standard libctru results in being not working some functions.

Core-2-Extreme commented 2 years ago

Source code is here If you compile it and use that one, will it work for you?

Yrouel commented 2 years ago

It crashes

(the crash dump is from the 3dsx)

crash_dump_00000001.dmp.zip

debug_compiled_custom_libctru.txt

Core-2-Extreme commented 2 years ago

Before you type quit, type p util_log_logs to get internal logs. And send entire logs here (it will be LONG logs, if gdb asks --Type <RET> for more, q to quit, c to continue without paging-- you can type c)

Yrouel commented 2 years ago

ALL THE LOGS.txt

Core-2-Extreme commented 2 years ago

Use the newest commit and repeat the same steps.

Yrouel commented 2 years ago

Well it's working now. Plain simple compile from latest master, I didn't even replace libctru with the recompiled custom one.

Yeah I double checked, fresh clone, fresh compile...it's working somehow

Core-2-Extreme commented 2 years ago

So do you mean the newest commit (62d99b5) is working but aab57fc is not working? If so I only changed log related code so it shouldn't change behaviour. If you clone the newest commit and rollback changes manually, what will happen?

Yrouel commented 2 years ago

Now even aab57fc is working. I have no idea what I did differently to be honest, perhaps having updated Luma helped?

Core-2-Extreme commented 2 years ago

I used luma3ds 10.2.1 and worked fine. If you downgrade to luma3ds 10.2.1 will it crash?

Yrouel commented 2 years ago

It doesn't crash even with old Luma now... I really don't know what's going on and now I'm sorry to have bothered you

Yrouel commented 2 years ago

This is interesting so I did a checkout of cf67e99 to verify that indeed that one still didn't compile (still didn't) then I did make clean and checkout 02568be which did compile fine...and started crashing again. I'm not sure what's going on exactly but I suspect make clean doesn't actually completely clean everything and that causes issues. When it started working I had done a completely fresh clone while now that I think about it when it was crashing I was using make clean in between tries. I deleted the folder and cloned it fresh, same checkout, and it works. I'm attaching both 3dsx builds

Video_player_for_3DS_GOOD-BAD_02568be.zip

Core-2-Extreme commented 2 years ago

I reproduced your situation by using make clean and I found that it cleans too much even necessary files. I updated make file and it should work now with make clean.

Yrouel commented 2 years ago

Ok yeah I jumped around again with builds and it works now, thanks.

Slightly related: can you make it so it uses by default makerom and bannertool from the PATH?

Core-2-Extreme commented 2 years ago

I changed it so.

Yrouel commented 2 years ago

Awesome thank you very much. Just did a "final" fresh clone and build with this last commit and it works fine. I guess you can close this (it was quite the head-scratcher I think)