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

[Windows] "ue4 editor" crashes if editor's executable does not exist #73

Open
sleeptightAnsiC opened this issue May 24, 2024 · 0 comments

Comments

@sleeptightAnsiC
Copy link
Contributor

sleeptightAnsiC commented May 24, 2024

I've spotted this on my personal branch, but this would be part of a problem that #65 tries to address.

I tried to "ue4 editor" without bootstraping the Engine, which means that UnrealEditor executable did not exist at the moment.

This resulted in:

C:\Users\korn\Desktop>python ue4cli editor
(ue4cli) Using user-specified engine root: C:\Users\korn\Desktop\UnrealEngine
(ue4cli) EXECUTE COMMAND: ['C:\\Users\\korn\\Desktop\\UnrealEngine\\Engine\\Binaries\\Win64\\UnrealEditor-Cmd.exe', '', '-stdout', '-FullStdOutLogOutput']
(ue4cli) Unhandled exception! Crashing...
ERROR:ue4cli.cli:[WinError 2] The system cannot find the file specified
Traceback (most recent call last):
  File "C:\Users\korn\Desktop\ue4cli\ue4cli\cli.py", line 227, in main
    SUPPORTED_COMMANDS[command]['action'](manager, args)
  File "C:\Users\korn\Desktop\ue4cli\ue4cli\cli.py", line 50, in <lambda>
    'action': lambda m, args: m.runEditor(None, False, args, args.pop(0) if (len(args) > 0) else 'Development'),
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\korn\Desktop\ue4cli\ue4cli\UnrealManagerBase.py", line 421, in runEditor
    Utility.run([self.getEditorBinary(True, configuration), projectFile] + extraFlags + ['-stdout', '-FullStdOutLogOutput'], raiseOnError=True)
  File "C:\Users\korn\Desktop\ue4cli\ue4cli\Utility.py", line 181, in run
    returncode = subprocess.call(command, cwd=cwd, shell=shell)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\subprocess.py", line 389, in call
    with Popen(*popenargs, **kwargs) as p:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\subprocess.py", line 1538, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [WinError 2] The system cannot find the file specified
(ue4cli) ue4cli has crashed! Please, report it at: https://github.com/adamrehn/ue4cli/issues                                                                                                                         

Either, the Try/Catch block is missing there or it does not catch WinError.

I'll fix this later and push into #65

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

1 participant