OpenOrbis / mira-project

mira rewrite in cxx
GNU General Public License v3.0
293 stars 64 forks source link

[6.72] Crash when entering network settings with Mira enabled #134

Open sleirsgoevy opened 4 years ago

sleirsgoevy commented 4 years ago

Steps to reproduce:

  1. Start Mira
  2. Go to Settings -> Network -> Test Internet connection
  3. Go back to homescreen and launch any app. The system will freeze.

The bug is present with both ps4jb and ChendoChap's implementation of the kexploit.

EDIT: The issue does not reproduce on ps4jb before b0a79c, which uses an older version of Mira.

kiwidoggie commented 4 years ago

Will need to re-verify with my fork (which will be replacing the current develop build) to see if it's a patch issue, or a bad exploit issue.

0x199 commented 3 years ago

To add to this issue, this also appears to be a bug on 5.05. Launching an application with Mira and without a internet connection freezes the system.

sleirsgoevy commented 2 years ago

Found it out with LightningMods' help. The issue is that when Mira's initialization thread dies, the whole Mira process gets terminated, and the pointer to it that's cached inside Mira (m_InitParams.process) becomes invalid.

sleirsgoevy commented 2 years ago

Adding this to kernel/src/Mira.cpp fixes the issue:

    // Try not to exit
    int pipe_fds[2];
    kpipe_t(pipe_fds, curthread);
    char cha;
    kread_t(pipe_fds[0], &cha, 1, curthread);

    kthread_exit();
sleirsgoevy commented 2 years ago

Fixed by #156 #157 #159 #160.