ntutils icon indicating copy to clipboard operation
ntutils copied to clipboard

FTE Compile command fails in "new" Windows console

Open Gavin-Holt opened this issue 2 years ago • 2 comments

Hi

I have returned to FTE on Windows 10 after a long break and now find my "Compile" commands all fail - unless I revert to using the legacy console (which I don't want to do). I am getting the following fatal error with FTE-x64.exe and FTE-x86.exe:

  e.g. Compile "dir *.* /s/b"
  The application was unable to start correctly (0xc0000142)

Of interest, the "RunProgram" command works as normal:

  e.g. RunProgram $CurDirectory."makeit.bat"
  or   RunProgram "dir *.* /s/b && pause"

Is there any easy fix for this problem, as I would like to use the return values of the "Compile" command.

I know you are interested in these small efficient editors (https://virtuallyfun.com/wordpress/2018/02/15/wanted-console-text-editor-for-windows/) and experience tells me that reporting to the Windows Terminal team is not likely to help (https://github.com/microsoft/terminal/issues/3698).

Any help gratefully received.

Kind Regards Gavin Holt PS I don't have the tools/skills to compile from source - sorry.

Gavin-Holt avatar Jun 22 '22 23:06 Gavin-Holt

Hi, I can't promise anything but I can take a look. Could you please provide exact steps how to reproduce the error? Is "Compile" a menu option? Thanks.

tenox7 avatar Jun 28 '22 09:06 tenox7

Hi

Many thanks for looking at this problem.

Your versions of FTE-x64.exe/FTE-x86.exe both have a configured &tools menu with a &compile command which asks for a line to "compile" (shortcut F9)

There isn't much about this command in the help file, but it is the only way to run an external command and pipe the results into a buffer.

If I unzip your archive and try some examples:

Compile: set
Compile: dir *.* /s/b
Compile: where /R . *.*
Compile: findstr /npi /s  include *.cpp
Compile: findstr /npi Compile src\c_commands.h

With the default console set to legacy these commands all work:

image

However, the legacy console has display problems (flicker and vertical artefacts) common in ncurses TUI applications, and the cut paste doesn't work as expected.

With the default console not set to legacy the app looks great, cuts and pastes, but none of the Compile commands run correctly, neither direct nor when used in menu/shortcut definitions.

In fact, the Compile command halts the application and I have to kill it from the task manager.

image

If it is easy to change the spawning process, I would be very grateful.

Kind Regards Gavin Holt

Gavin-Holt avatar Jun 28 '22 13:06 Gavin-Holt