Id like to start by saying I really appreciate this tool and as a dev, can only imagine the work it must have taken to get it to this point. Fantastic work on this thing, its quite impressive, if a bit unstable.
I’m trying to integrate some of its capabilities as a automation tool for tedious art tasks. To facilitate this, I wanted to setup a simple shell script which just runs the contents of a version controlled folder through PXC and spits the output into a separate version control. I don’t want to have to open the software GUI and run the process manually each time, just a simple shell script (or batch file) I can run.
The Actual Bug Report
I’m struggling to get Pixel Composer to work via command line. I have tried with windows(Power Shell, Command Prompt) and linux(ZSH).
I have tried with 1.20.6, 1.20.7 (beta and stable) for windows (and I think 1.19.?). They all result in the same behaviour. My screenshots use 1.20.6.
On Linux (Omarchy/Arch) I saw almost identical behavior.
STR (as recommend in the docs):
- Download pixel composer 1.20.7
- Download PXC.exe from Github releases page
- Place PXC.exe adjacent PixelComposer.exe
- Download the sample project (linked below) for Pixel Composer (or provide your own)
- Execute PXC.exe with the verbose flag (-v)
- Observe the error.
Note: the issue only occurs when I provide PXC with the argument for a project.
Sample Project:
SimpleShapes.pxc (3.7 KB)
Error Output
←[0mm-------------------------- Pixel Composer 1.20.6 Crashed --------------------------
←[0mm
←[0mmERROR in action number 1
←[0mmof Other Event: Game Start for object o_main:
←[0mmI32 argument is unset
←[0mmgml_Script___fnInit_Global
←[0mm
←[0mm-------------------------- STACK TRACE --------------------------
←[0mm
←[0mmgml_Script___fnInit_Global (line 26)
←[0mmgml_Script___fnInit (line 22)
←[0mmgml_Object_o_main_Other_2 (line 142)
←[0mm
←[0mm
←[0mm
←[0mm
←[0mm-------------------------- Device Info --------------------------
←[0mm
←[0mmVersion: 1.20.6 (120060)
←[0mmOperating system: Windows (655360)
←[0mmCPU: AMD Ryzen 9 3950X 16-Core Processor [16 cores]
←[0mmGPU: NVIDIA GeForce RTX 3080
←[0mmRAM: 174.27 MB/31.91 GB
←[0mmVRAM: 11.81 GB
←[0mm
←[0mm---------------------------- :( ----------------------------
I notice that if you run the PXC.exe without any project path it doesn’t crash:
I also notice that if I run Pixel Composer without the CLI wrapper, it does correctly open Pixel Composer. Then, appending a project does correctly open the project.
However, running it in headless mode and with no CLI Wrapper for feedback, it seemingly never outputs anything.
I also tried running the python script raw with the commented out log for the piped in data to print everything.
Output
PS C:\Users\xxxcs> python "C:\Users\xxxcs\Documents\PixelComposer\PixelComposer 1.20.6\python-cli.py" C:\Users\xxxcs\Documents\PixelComposer\Saves\SimpleShapes.pxc -v
-- Removed ASCII Art bc it caused issues --
>>>>>>>>>>>>>>>>>>>>> PixelComposer CLI v0.1 <<<<<<<<<<<<<<<<<<<<<
▶️ Initializing PixelComposer...
Setting scheduler resolution to 1
DirectX11: Using hardware device
Collision Event time(microsecs)=23
Variable_Global_Init()
PrepareGame()
Audio_Init()
Audio group 0 -> Loaded
Attempting to set gamepadcount to 12
Game_Prepare()
Script_Prepare()
winMan Stat: 1
TimeLine_Prepare()
Object_Prepare()
Room_Prepare()
Finished PrepareGame()
Run_Start
Done g_EffectsManager.Init()
Done RenderStateManager
CreateColPairs took 0.000000s 4 usecs for 92 object types obj_col_numb=0 physobjcount=0 resizes 0 final size 0
Done ObjectLists
Done Extension_Initialize
About to startroom
>>> params 0: C:\Users\xxxcs\Documents\PixelComposer\PixelComposer 1.20.6\PixelComposer.exe
>>> params 1: C:\Users\xxxcs\Documents\PixelComposer\Saves\SimpleShapes.pxc
>>> params 2: -v
>>> params 3: -h
>>> params 4: -output
>>> params 5: res
>>> params 6: |
>>> params 7: echo
CLI: Running PixelComposer 1.20.6
▶️ Running PixelComposer 1.20.6
App directory: C:/Users/xxxcs/AppData/Local/PixelComposer/
Persisted directory: C:/Users/xxxcs/AppData/Local/PixelComposer/persistPreference.json
Env directory: C:\Users\xxxcs\Documents\PixelComposer\PixelComposer 1.20.6\
===================== WORKING DIRECTORIES =====================
APP_DIRECTORY: C:/Users/xxxcs/AppData/Local/PixelComposer/
DIRECTORY: C:\Users\xxxcs\Documents\PixelComposer\PixelComposer 1.20.6\
PREFERENCES_DIR: C:\Users\xxxcs\Documents\PixelComposer\PixelComposer 1.20.6\Preferences/1171/
working_directory: C:\Users\xxxcs\
- Setup
STATUS: Loaded theme: default🠂
- init Preferences | complete in 25.22ms [96 KB]
Begin
DIRECTORY C:\Users\xxxcs\Documents\PixelComposer\PixelComposer 1.20.6\
WARNING: Surface format [4 bit RGBA] not supported on this device.
- init SurfaceFormat | complete in 34.21ms [20 KB]
- init User | complete in 9.89ms [4 KB]
[ERROR BEGIN]
←[0mm
-------------------------- Pixel Composer 1.20.6 Crashed --------------------------
←[0mm-------------------------- Pixel Composer 1.20.6 Crashed --------------------------
←[0mm
ERROR in action number 1
←[0mmERROR in action number 1
of Other Event: Game Start for object o_main:
←[0mmof Other Event: Game Start for object o_main:
I32 argument is unset
←[0mmI32 argument is unset
gml_Script___fnInit_Global
←[0mmgml_Script___fnInit_Global
←[0mm
-------------------------- STACK TRACE --------------------------
←[0mm-------------------------- STACK TRACE --------------------------
←[0mm
gml_Script___fnInit_Global (line 26)
←[0mmgml_Script___fnInit_Global (line 26)
gml_Script___fnInit (line 22)
←[0mmgml_Script___fnInit (line 22)
gml_Object_o_main_Other_2 (line 142)
←[0mmgml_Object_o_main_Other_2 (line 142)
←[0mm
←[0mm
←[0mm
←[0mm
-------------------------- Device Info --------------------------
←[0mm-------------------------- Device Info --------------------------
←[0mm
Version: 1.20.6 (120060)
←[0mmVersion: 1.20.6 (120060)
Operating system: Windows (655360)
←[0mmOperating system: Windows (655360)
CPU: AMD Ryzen 9 3950X 16-Core Processor [16 cores]
←[0mmCPU: AMD Ryzen 9 3950X 16-Core Processor [16 cores]
GPU: NVIDIA GeForce RTX 3080
←[0mmGPU: NVIDIA GeForce RTX 3080
RAM: 172.27 MB/31.91 GB
←[0mmRAM: 172.27 MB/31.91 GB
VRAM: 11.81 GB
←[0mmVRAM: 11.81 GB
←[0mm
---------------------------- :( ----------------------------
←[0mm---------------------------- :( ----------------------------
←[0mm
[ERROR END]
✔️ Operation completed in 2.32s.
All in all, it seems like there is issues with the CLI usage of pixel composer right now. Can you please confirm my setup is valid and whether its working on your end? Having looked in the discord it doesn’t look like its a heavily used feature of the tool so I wouldn’t be surprised if it broke at some point and went unnoticed.
Let me know if I can provide any more information!