Opened 6 years ago

Last modified 6 years ago

#2946 assigned defect

Debug option --debug not working on Windows.

Reported by: goddard@… Owned by: Greg Couch
Priority: normal Milestone:
Component: Input/Output Version:
Keywords: Cc: Tristan Croll
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

The following bug report has been submitted:
Platform:        Windows-10-10.0.18362
ChimeraX Version: 0.93 (2020-03-11)
Description
Trying to start ChimeraX with --debug on windows from a cygwin shell and it exits immediately without showing any windows.

"/cygdrive/c/Program Files/ChimeraX-Mar-11-2020/bin/ChimeraX.exe" --debug

Log:
UCSF ChimeraX version: 0.93 (2020-03-11)  
© 2016-2020 Regents of the University of California. All rights reserved.  
How to cite UCSF ChimeraX  




OpenGL version: 3.3.0 NVIDIA 442.19
OpenGL renderer: GeForce GTX 1080 Ti/PCIe/SSE2
OpenGL vendor: NVIDIA Corporation
Manufacturer: Gigabyte Technology Co., Ltd.
Model: Z270X-Gaming K7
OS: Microsoft Windows 10 Home (Build 18362)
Memory: 17,129,693,184
MaxProcessMemory: 137,438,953,344
CPU: 8 Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz"

Change History (5)

in reply to:  1 ; comment:1 by goddard@…, 6 years ago

Surprisingly from a cygwin shell starting ChimeraX exits immediately

	ChimeraX-Mar-11-2020/bin/ChimeraX.exe --debug

but if I redirect stdout and stderr to a file it starts correctly

	ChimeraX-Mar-11-2020/bin/ChimeraX.exe --debug >& test.out

comment:2 by Tom Goddard, 6 years ago

Component: UnassignedInput/Output
Owner: set to Greg Couch
Platform: all
Project: ChimeraX
Status: newassigned
Summary: ChimeraX bug report submissionDebug option --debug not working on Windows.

comment:3 by Tristan Croll, 6 years ago

Cc: Tristan Croll added

Try ChimeraX-console.exe --debug (see #1563).

in reply to:  4 ; comment:4 by Conrad Huang, 6 years ago

Cygwin changed the way it handles "console" from the shell.  Building 
ChimeraX in "app" mode and running it from the shell use to work in 
Cygwin, but not in Windows Command Line (cmd).  When we updated Cygwin 
to latest (as of maybe a month ago), running app-mode ChimeraX did not 
work on either Cygwin or cmd.  Tristan filed some bug reports about that 
a while back, but we didn't deal with them until it broke for us.

That's why there is (only on Windows) a ChimeraX-console.exe in addition 
to ChimeraX.exe now.  ChimeraX-console.exe works for both the old and 
current Cygwin as well as cmd.  All the bundle Makefile's now use 
ChimeraX-console.exe.  Unfortunately, that's the Windows legacy that we 
have to deal with.

Conrad

On 3/11/2020 6:46 PM, Tom Goddard wrote:

in reply to:  5 ; comment:5 by goddard@…, 6 years ago

Ok, ideally ChimeraX.exe with command-line options would work in a cygwin shell or command prompt but it sounds like that is not possible because Windows GUI apps disconnect shell output.

Does Chimera 1 have the same issue?

I think the current solution of using ChimeraX-console.exe is fine, generally this is only used for debugging.  But I did not know about it and think it should be documented better.  It should go in the documentation somewhere (maybe it is already there).  But more important could we simply put a check in ChimeraX_main.py for sys.stdout being None and if --debug or --help is used don't exit, instead start ChimeraX with an error message shown in the GUI, saying to use ChimeraX-console.exe with --debug or --help because ChimeraX.exe is a GUI app that Windows does not allow to output anything to the shell.  This way when someone tries this they get immediate feedback how to fix it.

Note: See TracTickets for help on using tickets.