libretro / RetroArch

Cross-platform, sophisticated frontend for the libretro API. Licensed GPLv3.
http://www.libretro.com
GNU General Public License v3.0
10.24k stars 1.83k forks source link

Cheevos SIGSEGV: can't start PSX game on latest nightly. #4884

Closed ofry closed 7 years ago

ofry commented 7 years ago

First and foremost consider this:

Description

I opened Retroarch. Tried to start PSX game. Got crash.

Got this:

RetroArch [INFO] :: CHEEVOS system RAM: 0000000000000000 0
RetroArch [INFO] :: CHEEVOS save RAM:   0000000010442661 131072
RetroArch [INFO] :: CHEEVOS video RAM:  0000000000000000 0
RetroArch [INFO] :: CHEEVOS RTC:        0000000000000000 0
[New Thread 7840.0x20d8]

Program received signal SIGSEGV, Segmentation fault.
0x00000000006b9449 in cheevos_djb2 (str=0x0, length=3)
    at tasks/task_cheevos.c:716
716 tasks/task_cheevos.c: No such file or directory.

Full GDB session output: retroarch-46b1b11.txt

Bisect Results

[Try to bisect and tell us when this started happening]

Version/Commit

Retroarch 46b1b113e02e68ef8d34e1f7d19ffc2796ea950b (it's latest nightly)

Environment information

ofry commented 7 years ago

de8067165857f2283ba45c3b4c5fa87c1183dea1 doesn't fix this issue.

inactive123 commented 7 years ago

@leiradel Can you look into this?

I have moved the cheevos files over to tasks/task_cheevos.c.

Also, I'd really appreciate it if you started taking steps towards turning this into a task. The cheevos part of the code is really dragging the codebase down now, and I need this to be a 'task' type operation. It's best you work on this since you wrote most of this code.

@ofry For now, disable cheevos.

inactive123 commented 7 years ago

@ofry Try to bisect this for me, that could help.

leiradel commented 7 years ago

@ofry can you provide a backtrace in GDB? Thanks. @twinaphex I'm already doing it

ofry commented 7 years ago
(gdb) backtrace
#0  0x00000000006b93c9 in cheevos_djb2 (str=0x0, length=3)
    at tasks/task_cheevos.c:716
#1  0x00000000006bce5c in cheevos_load (cheevos_enable=true, info=0x699bc00)
    at tasks/task_cheevos.c:3055
#2  0x000000000041b1fb in content_file_load (info=0x699bc00,
    content=0x699b8f0, content_ctx=0x23b9b0, error_string=0x23b9a8,
    special=0x0) at tasks/task_content.c:595
#3  0x000000000041b761 in content_file_init (content_ctx=0x23b9b0,
    error_string=0x23b9a8) at tasks/task_content.c:758
#4  0x000000000041cdab in content_init () at tasks/task_content.c:1663
#5  0x000000000040a608 in event_init_content () at command.c:1345
#6  0x000000000040a758 in command_event_init_core (
    data=0x9f12a0 <current_core_type>) at command.c:1403
#7  0x000000000040bf62 in command_event (cmd=CMD_EVENT_CORE_INIT,
    data=0x9f12a0 <current_core_type>) at command.c:2244
#8  0x00000000004050ad in retroarch_main_init (argc=11, argv=0x23bef0)
    at retroarch.c:1084
#9  0x000000000041a723 in content_load (info=0x23d300)
    at tasks/task_content.c:281
#10 0x000000000041b9bc in task_load_content (content_info=0x23d300,
    content_ctx=0x23d360, launched_from_menu=false, launched_from_cli=false,
    error_string=0x23d358) at tasks/task_content.c:831
#11 0x000000000041bdca in command_event_cmd_exec (
ofry commented 7 years ago

On 77a56f5 it's working fine.

inactive123 commented 7 years ago

Yes, @leiradel pushed some commits.

ofry commented 7 years ago

So I close it ^^ Thanks.