Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashing with UWP Xbox #1110

Open
3UR opened this issue Feb 14, 2025 · 8 comments
Open

Crashing with UWP Xbox #1110

3UR opened this issue Feb 14, 2025 · 8 comments

Comments

@3UR
Copy link

3UR commented Feb 14, 2025

I am porting a game to UWP for Xbox and I came across this issue with OpenAL do I need to change code on my side? or is this an issue with OpenAL library?

I am using VCPkg and the triplet I use is x64-uwp

Info

File: core/helpers.cpp
Line: 105

Debugger Screenshot:

Image

Callstack Screenshot:

Image

This is how I initialize OpenAL

Image

Exception

Exception thrown: read access violation.
*****(__imp___p___wargv(...)) was nullptr.

@3UR
Copy link
Author

3UR commented Feb 14, 2025

Hm maybe this is why?

Image

Image

for some reason that if check is not actually doing anything 🤔

@3UR
Copy link
Author

3UR commented Feb 14, 2025

Guess I could define it in my project and see what happens

@3UR
Copy link
Author

3UR commented Feb 14, 2025

Nope :( Defined it in my project and it still happens

@kcat
Copy link
Owner

kcat commented Feb 14, 2025

Line 362 would be this:

path = fs::u8path(GetProcBinary().path);

It's that GetProcBinary() call, which tries to read __wargv[0] to get the executable path and name of the process on UWP. On non-UWP Windows, it uses GetModuleFileNameW(nullptr, ...) instead, but that's apparently not available on UWP. If __wargv can also be a null pointer, that may need checking.

@3UR
Copy link
Author

3UR commented Feb 14, 2025

Line 362 would be this:

path = fs::u8path(GetProcBinary().path);
It's that GetProcBinary() call, which tries to read __wargv[0] to get the executable path and name of the process on UWP. On non-UWP Windows, it uses GetModuleFileNameW(nullptr, ...) instead, but that's apparently not available on UWP. If __wargv can also be a null pointer, that may need checking.

Is there anything that can be done on my end to workaround this?

@kcat
Copy link
Owner

kcat commented Feb 14, 2025

Not unless you can figure out why __wargv may be null and can fix it. Otherwise you'll need to build OpenAL Soft from source and make sure to include commit c14554f (either patching 1.24.2 with it manually, or using the latest Git version).

@3UR
Copy link
Author

3UR commented Feb 14, 2025

Not unless you can figure out why __wargv may be null and can fix it. Otherwise you'll need to build OpenAL Soft from source and make sure to include commit c14554f (either patching 1.24.2 with it manually, or using the latest Git version).

Thanks I'll give the commit a try

@3UR
Copy link
Author

3UR commented Feb 14, 2025

Works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants