XLaunchXBE's descendant functions bugs
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- c
- Domain
- operating-systems
Research direction
Start by reading the linked code in lib/hal/fileio.c (lines 94–99) and lib/hal/xbox.c (lines 69–86), then compare the reported path outputs with the related issue #500. The issue describes inconsistent path conversion and launch path handling, but leaves the desired behavior and scope of the proposed rework unsettled. Done means the expected behavior is defined and the reported cases are addressed.
Written by the indexing model from the issue text.
Description
I ran a test on:
https://github.com/XboxDev/nxdk/blob/500354ef264f35a46a31643876b06ed614b0aed8/lib/hal/fileio.c#L94-L99
And its output are:
d:\foo\bar.txt test output: \??\D:\foo\bar.txt
.\foo\bar.txt test output: \Device\Harddisk0\Partition1\foo\bar.txt
\foo\bar.txt test output: \Device\Harddisk0\Partition1\foo\bar.txt
foo\bar.txt test output: \Device\Harddisk0\Partition1\foo\bar.txt
\\.\D:\foo\bar.txt test output: \??\D:\foo\bar.txt
\??\d:\foo\bar.txt test output: \??\D:\foo\bar.txt
The more I look at output result... the more it doesn't make any sense to me. Retail console doesn't accept \??\D:\foo\bar.txt path when it should be absolute path. In my opinion, it warrant for rehaul work since nxdk is relying on its own partition table than retrieve full path by using NtOpenSymbolicLinkObject and NtQuerySymbolicLinkObject functions for any mounted drive letter had been done by the title itself. Plus title has the ability to choose which drive letter can be mount on any partitions and child directory.
Seems to be relative to #500 problem. If this whole information should be transfer to #500's post, then I'll transfer it. Below research was done first on a new ticket then realize there are more problems from internal functions.
Below is the original draft issue I made but turns out there are even more issues with nxdk's launch xbe's descendant functions.
If I read XLaunchXBEEx function correctly, it does not look right. From else statement below, it doesn't check for semicolon first incase title wish to set D:\ mount to a parent directory or above by default from reboot process just like retail titles compiled with XDK did. Having two or more semicolons will cause reboot to dashboard or error screen. (For me, it boots to dashboard.)
https://github.com/XboxDev/nxdk/blob/500354ef264f35a46a31643876b06ed614b0aed8/lib/hal/xbox.c#L69-L86
Beside above issue, I wasn't really sure if it must have semicolon until I ran another test again without any semicolon. The result return as:
LaunchDataPage->Header.szLaunchPath: \Device\Harddisk0\Partition1\Games\reboot\default.xbe
XeImageFileName: \Device\Harddisk0\Partition1\Games\reboot\default.xbe
\??\D: == \Device\Harddisk0\Partition1\Games\reboot\
vs unmodified nxdk:
LaunchDataPage->Header.szLaunchPath: \Device\Harddisk0\Partition1\Games\reboot;default.xbe
XeImageFileName: \Device\Harddisk0\Partition1\Games\reboot\default.xbe
\??\D: == \Device\Harddisk0\Partition1\Games\reboot
The only difference is without semicolon will include backslash whilst with will exclude backslash. But it doesn't affect D drive mounted to read/write contents since I can read the updated log files just fine. If a backslash existed at end of file, in xbox environment it is act as a directory than a "possible" file. Yet the xbox kernel knows to mount it as a directory than a file.
With that said, why semicolon character is a requirement if title doesn't set semicolon in its path to xbe? If I recall, it is entirely optional for title to choose alternative mount point for D drive letter on reboot process.
// if we couldn't find a trailing slash, the conversion to // the xbox path mustn't have worked, so we will return
In my opinion, this comment isn't correct. For example, you can have multiple xbes, or re-use the same xbe, from root directory without need to have semicolon character. However, it is also not a requirement as well for child directory wherever xbe file reside in too.
- Dominant language
- C
- Stars
- 600
- Forks
- 97
- Avg merge
- 11h 48m
- Merged PRs (30d)
- 2
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from XboxDev/nxdk
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
Use faster memcpyOpen
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 1/5 Under an hour Newbie friendliness 38/100
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Broken links in reference manualPossibly taken @farisbasha claimed this 14 days ago. Opencore:meson
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
mpv-player/mpv#18934 · 3 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
libsndfile/libsndfile#1239 ·