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

m64p crashes after clicking on advanced settings #157

Closed
Turaltay opened this issue Apr 30, 2021 · 33 comments
Closed

m64p crashes after clicking on advanced settings #157

Turaltay opened this issue Apr 30, 2021 · 33 comments
Assignees

Comments

@Turaltay
Copy link

I downloaded the latest build of m64p and it crashes immediately after i click on advanced settings. Is this a known problem and fixable?

@loganmc10
Copy link
Member

Sorry I can't reproduce this, can you post some more details, like what OS you're using? Are you trying to do this while a game is running, or when the game is stopped?

@Turaltay
Copy link
Author

Turaltay commented Apr 30, 2021

Sorry I can't reproduce this, can you post some more details, like what OS you're using? Are you trying to do this while a game is running, or when the game is stopped?

I use a Windows 10 64-bit system. My GPU is a Nvidia Geforce GTX 970. I downloaded the file m64p-win64-a0367b2.zip, started it, clicked on advanced settings and it crashed. I just started the emulator without any additional settings. I will try it on a different PC too and check if there is the same problem.

@Turaltay
Copy link
Author

Tried it on my brothers PC too. He has a Windows 10 system too and a AMD Fury X. Same thing happens. If you click on advanced settings the emulator crashes. Doesn't matter if a game runs or not.

@Jj0YzL5nvJ
Copy link

I downloaded the latest build of m64p and it crashes immediately after i click on advanced settings. Is this a known problem and fixable?

I downloaded the file m64p-win64-a0367b2.zip, started it, clicked on advanced settings and it crashed.

The crash is perfectly normal if you don't unzip.

@Turaltay
Copy link
Author

Turaltay commented May 1, 2021

I downloaded the latest build of m64p and it crashes immediately after i click on advanced settings. Is this a known problem and fixable?

I downloaded the file m64p-win64-a0367b2.zip, started it, clicked on advanced settings and it crashed.

The crash is perfectly normal if you don't unzip.

I unzipped the emulator before starting it. Sorry that i didn't mention that.

@Jj0YzL5nvJ
Copy link

I tested on Win10 Enterprise LTSC 2019 (version 1809) and Win10 Professional (version 2004). I can't reproduce with the unzipped files.

  • Try closing the applications that are running in the background (tray icons) and that you have in common with the affected computers (chrome, spotify, afterburner, etc).
  • Make sure you don't have any strange executable or library files in your user profile (*.exe, *.dll):
explorer "%LOCALAPPDATA%\VirtualStore"
explorer "%USERPROFILE%"

What's your "Language for non-Unicode programs" (aka ASCII)?

@Turaltay
Copy link
Author

Turaltay commented May 1, 2021

I tested on Win10 Enterprise LTSC 2019 (version 1809) and Win10 Professional (version 2004). I can't reproduce with the unzipped files.

* Try closing the applications that are running in the background (tray icons) and that you have in common with the affected computers (chrome, spotify, afterburner, etc).

* Make sure you don't have any strange executable or library files in your user profile (*.exe, *.dll):
explorer "%LOCALAPPDATA%\VirtualStore"
explorer "%USERPROFILE%"

What's your "Language for non-Unicode programs" (aka ASCII)?

My language for non-Unicode programs is german because i am from germany. Could that be the problem?

@Jj0YzL5nvJ
Copy link

My language for non-Unicode programs is german because i am from germany. Could that be the problem?

In theory no, in practice maybe... Spanish is especially problematic, some programs only work correctly with the Spanish from Spain and fail with the Spanish from any other country. SolidWorks for instance.
ePSXe doesn't display valid icons in Windows Explorer in French and Russian, but it does when switching to Spanish or English and vice versa, etc.

Try to run bcdedit /enum as administrator. If nx has a value other than OptIn, restore it with bcdedit /set nx OptIn and reboot.

@Turaltay
Copy link
Author

Turaltay commented May 1, 2021

My language for non-Unicode programs is german because i am from germany. Could that be the problem?

In theory no, in practice maybe... Spanish is especially problematic, some programs only work correctly with the Spanish from Spain and fail with the Spanish from any other country. SolidWorks for instance.
ePSXe doesn't display valid icons in Windows Explorer in French and Russian, but it does when switching to Spanish or English and vice versa, etc.

Try to run bcdedit /enum as administrator. If nx has a value other than OptIn, restore it with bcdedit /set nx OptIn and reboot.

The value for nx is already OptIn. It seems like that i maybe found the problem. We have the letters Ö, Ä and Ü in our language. My username has a Ö as a letter inside it. My brother has a Ö too in his username and on his PC. I tried the advanced settings of m64p on a third PC without a username that has these letters. It worked. I know that some programs struggle with these letters. Question is if that is fixable.

@Jj0YzL5nvJ
Copy link

Jj0YzL5nvJ commented May 1, 2021

The classic cp1252 vs utf-8?

Now I can reproduce the crash

test.zip

Question is if that is fixable.

Yes.

@Turaltay
Copy link
Author

Turaltay commented May 2, 2021

Would be happy if you could fix and implement this in future builds.

@Jj0YzL5nvJ
Copy link

UI-Console shows a wrong configuration path but uses the correct one.
mupen64plus/mupen64plus-ui-console#71

@loganmc10
Copy link
Member

@Turaltay can you try the latest release? https://github.com/loganmc10/m64p/releases/tag/v2021.5.30

I tried to make some changes to support non-Latin characters in the path, although I didn't test it..

@Turaltay
Copy link
Author

@loganmc10 Thank you i tried it but it still crashes.

@loganmc10
Copy link
Member

Are you able to launch games that exist in the path with non Latin characters? Is it just the advanced settings that crashes?

@Turaltay
Copy link
Author

@loganmc10 Launching games from that path works without any problem. Only two things are not working. Advanced settings and the changing of anything in the controller settings. Seems like everything that includes reading works. Writing not.

@loganmc10
Copy link
Member

Ok, I'm not sure what else I could do to reproduce this. I do all my development on Linux, I tried putting the emulator in:

~/Documents/LogÖn/m64p

And set the config_dir to that path, but it didn't crash or anything, it seemed to work normally

@loganmc10
Copy link
Member

What I would recommend in your case, is to put the emulator somewhere outside the path with the non-Latin character (like C:\m64p or something)

And then in mupen64plus-gui.ini set:

configDirPath=some-path-that-has-only-latin-characters 

That should make it save mupen64plus.cfg to that path, then there shouldn't be any reading/writing inside your home directory.

@Turaltay
Copy link
Author

@loganmc10 Wow that actually worked! It is not crashing anymore and i can save my settings. Thank you for the hint! It is good that it works now for me but it would be nice if we could find a solution that works out of the box. I am pretty sure that not every m64plus user with the same problem will look here to use this workaround.

@loganmc10
Copy link
Member

Ok can you try one more build?
https://github.com/loganmc10/m64p/suites/2869204394/artifacts/64101547

You'll need to unzip it twice (it's a zip inside a zip, that's how GitHub Actions builds them), when you open it, it'll prompt you to update, just choose "no". Let me know if that works inside your home directory

@Turaltay
Copy link
Author

Same as before. It crashes. It works if i change configDirPath=$CONFIG_PATH$ to configDirPath=$APP_PATH$.

@loganmc10
Copy link
Member

I gave it one more try here: https://github.com/loganmc10/m64p/suites/2875625642/artifacts/64289182

That's probably as good as I can get it, if it's still having issues I assume there might be some work that needs to be done inside mupen64plus-core to get it working.

@Turaltay
Copy link
Author

Unfortunately it is still crashing. As already mentioned i had fixed it by setting $CONFIG_PATH$ to $APP_PATH$ for configDirPath. Is it important that there is $CONFIG_PATH$ set? Because the app path and config path are the same.

@loganmc10
Copy link
Member

CONFIG_PATH is where mupen64plus.cfg and the input settings are written, it can be anywhere, some people make it the same as APP_PATH to make the application portable.

@loganmc10
Copy link
Member

So I do think I have it working now: https://github.com/loganmc10/m64p/suites/2876226489/artifacts/64305285

I tested it on my computer inside a path with a non-Latin character. However, I did look through the code for mupen64plus-core, there are a lot of cases where it calls fopen to open files, which doesn't work on Windows for Unicode characters.

So you can give it a try, I don't think it will crash anymore, but it might have issues saving screenshots, save games, etc... I would still recommend putting things in a path with only Latin characters if possible.

@Turaltay
Copy link
Author

This fixed one of the problems. I am now able to save my controller profile. The emulator is still crashing while clicking on advanced settings. I moved it to a folder in D: without any special characters but it still crashed. I looked the data up and it seems like m64p saves some files in:

  • C:\Users\my username with Ö\AppData\Local\Temp
  • C:\Users\my username with Ö\AppData\Local\CrashDumps
  • C:\Users\my username with Ö\AppData\Roaming\Mupen64Plus --> mupen64plus.cfg file is here

Something in this structure seems to make problems. There are some DMP-Files in the CrashDumps folder. I attached you one. Maybe you can analyse it?

mupen64plus-gui.exe.6732.dmp.zip

@loganmc10
Copy link
Member

Ok I think I'm starting to understand this problem better, @Turaltay can you give this build a try?

https://github.com/loganmc10/m64p/suites/2878187738/artifacts/64359083

If it works, I wouldn't mind if you tried the following:

  • Saving/loading a save state
  • Taking a screenshot

All of that stuff should appear in C:\Users\my username with Ö\AppData\Roaming\Mupen64Plus

@Turaltay
Copy link
Author

Turaltay commented Jun 1, 2021

Wow you fixed it! It is not crashing anymore if i click on advanced settings. Taking a screenshot works too. Only thing that doesn't work is saving and loading a save state. Clicking on Save State to... or Load State From leads to the same result.

@loganmc10
Copy link
Member

What happens when you try to save or load a save state. Does it crash, or just do nothing?

@Turaltay
Copy link
Author

Turaltay commented Jun 1, 2021

Nothing happens. The emulator and the game are still working but it doesn't save or load anything.

@loganmc10
Copy link
Member

Ok I believe I have save states fixed: https://github.com/loganmc10/m64p/suites/2882605683/artifacts/64491409

Let me know if you see any other issues, if it looks good, I've got a patch I can submit to mupen64plus-core

@Turaltay
Copy link
Author

Turaltay commented Jun 1, 2021

Yes it is working now:

  • Advanced settings is not crashing anymore
  • Controller profile can be saved
  • Save state can be made and loaded
  • Screenshots can be made

Seems like this problem is solved. Thank you very much!

@loganmc10
Copy link
Member

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

No branches or pull requests

3 participants