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

Issue with working directory running NanoBoyAdvance through command-line #343

Open
ElektroStudios opened this issue Dec 14, 2023 · 2 comments
Assignees

Comments

@ElektroStudios
Copy link

ElektroStudios commented Dec 14, 2023

I think there is no documentation to know which command-line argument I need to use in order to just load a rom. Under windows (CMD).

For example:
NanoBoyAdvance.exe "C:\rom.gba"

That will not work. The emulator GUI will not open.

@ElektroStudios ElektroStudios changed the title Which command-line arguments to simply load a rom?. #2 Which command-line arguments to simply load a rom?. Dec 14, 2023
@fleroviux fleroviux self-assigned this Dec 14, 2023
@fleroviux
Copy link
Member

That command line should work normally, probably something broke.

@ElektroStudios
Copy link
Author

ElektroStudios commented Dec 14, 2023

I'm using NanoBoyAdvance v1.7.1 x64 under Windows 10.

If I open a CMD window inside the emulator directory (where NanoBoyAdvance.exe is) and I run this command, it will not work:

"NanoBoyAdvance.exe" "C:\full path to rom.gba"

Or these two commands which does the same:

PUSHD "C:\NanoBoyAdvance Directory\"
"NanoBoyAdvance.exe" "C:\full path to rom.gba"`

The program tries to load (I can see it for a moment in the task manager) but the user-interface is not shown, and the program closes instantly. There is no error message about a handled or unhandled exception, nothing happens, the program just fails to start up so it kills itself.

This is the log from Windows Event Viewer and translated to English (Google Translator):

Errored application name: NanoBoyAdvance.exe, version: 1.7.1.0, timestamp: 0x64629636
Errored module name: NanoBoyAdvance.exe, version: 1.7.1.0, timestamp: 0x64629636
Exception code: 0x40000015
Error offset: 0x0000000000db5576
Errored process identifier: 0x33ac
Errored application start time: 0x01da2ee23283e109
Path of the failed application: C:\Users\Administrator\Desktop\Emulators\NanoBoyAdvance\NanoBoyAdvance.exe

- System 
  - Provider 
   [ Name]  Application Error 
 
  - EventID 1000 
   [ Qualifiers]  0 
   Version 0 
   Level 2 
   Task 100 
   Opcode 0 
   Keywords 0x80000000000000 
 
  - TimeCreated 
   [ SystemTime]  2023-12-14T23:06:55.6484209Z 
   EventRecordID 62021 
   Correlation 
 
  - Execution 
   [ ProcessID]  0 
   [ ThreadID]  0 
   Channel Application 
   Computer ELEKTRO-PC 
   Security 
 
- EventData 
   NanoBoyAdvance.exe 
   1.7.1.0 
   64629636 
   NanoBoyAdvance.exe 
   1.7.1.0 
   64629636 
   40000015 
   0000000000db5576 
   33ac 
   01da2ee23283e109 
   C:\Users\Administrador\Desktop\Emulators\NanoBoyAdvance\NanoBoyAdvance.exe 
   C:\Users\Administrador\Desktop\Emulators\NanoBoyAdvance\NanoBoyAdvance.exe 
   d737283c-1413-4a2b-9aaa-393fc9f7e77a 

I discovered that in order to avoid the strange issue, I must specify the full path to the NanoBoyAdvance.exe executable, even if the CMD working directory is the same directory of the NanoBoyAdvance.exe file, so this command now will work as expected:

"C:\full path to NanoBoyAdvance.exe" "C:\full path to rom.gba"

Using relative path for the current working directory (".\") will also work:

PUSHD "C:\NanoBoyAdvance Directory\"
".\NanoBoyAdvance.exe" "C:\full path to rom.gba"`

But this will NOT work as I said before:

PUSHD "C:\NanoBoyAdvance Directory\"
"NanoBoyAdvance.exe" "C:\full path to rom.gba"`

@ElektroStudios ElektroStudios changed the title Which command-line arguments to simply load a rom?. Issue with working directory running NanoBoyAdvance through command-line Dec 14, 2023
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

2 participants