cancel
Showing results for 
Search instead for 
Did you mean: 

Object reference not set to an instance of an object error when running generate using CLI on a windows-container

sagarzong
Associate

Hello,

Let me describe the scenario

Version: 4.23.2

Succesfull Tests:

- Environment: Local Machine: Windows 11, touchgfx installed the same as using the dockerfile the command works

-Command Run:

-> powershell -Command 'C:\TouchGFX\4.23.2\designer\tgfx.exe generate -p C:\builds\TouchGFX'

Generates the files in the folder C:\builds\TouchGFX\generated

Issues:

- Environment: windows container based on image mcr.microsoft.com/windows:ltsc2019

- Installation method: Dockerfile, download the executable, place it on C:\install and running:

   RUN msiexec /i "C:\install\TouchGFX-4.23.2.msi" /quiet /norestart

   The Docker image builds ok and I have confirmed it has the .exe in the path C:\TouchGFX\4.23.2\designer

- Container command: Launching the container with: docker run -it -v ${PWD}:"C:\builds" afl-touchgfx:2.0 powershell.exe

- Command approaches: 

-> powershell -Command 'C:\TouchGFX\4.23.2\designer\tgfx.exe generate -p C:\builds\TouchGFX'

-> powershell -Command 'C:\TouchGFX\4.23.2\designer\tgfx.exe generate -p C:\builds\TouchGFX'powershell -Command 'C:\TouchGFX\4.23.2\designer\tgfx.exe generate -p C:\builds\TouchGFX'

Throws the error: Object reference not set to an instance of an object.

Notes:

I have checked a similar issue as someone reports changing locale but both locales are set the same (checked with Get-WinSystemLocale, both are en-US English (United States))

Have tested both with .touchgfx file UTF-8-BOM and UTF-8

 

Thanks in advance for your help

1 REPLY 1
LouisB
ST Employee

Hello @sagarzong ,

The error message you get is only Object reference not set to an instance of an object or do you get more information ? 

BR,

 

Louis BOUDO
ST Software Developer | TouchGFX