ZDoom / gzdoom

GZDoom is a feature centric port for all Doom engine games, based on ZDoom, adding an OpenGL renderer and powerful scripting capabilities
http://zdoom.org
GNU General Public License v3.0
2.33k stars 526 forks source link

[BUG] Regression: "crashout" no longer lets you copy the log easily. #2589

Open GrayFace opened 1 month ago

GrayFace commented 1 month ago

GZDoom version

GZDoom 4.12.2

Which game are you running with GZDoom?

None

What Operating System are you using?

Windows 10

Please describe your specific OS version

No response

Relevant hardware info

No response

Have you checked that no other similar issue already exists?

A clear and concise description of what the bug is.

crashout console command no longer displays the console log. Log.rtf can't displayed in the error window either. The only way to access the log is by saving the whole crash report and peeking inside.

crashout is the only way to copy something from the log I know. It's far from perfect, but it's at least something. The only other alternative is the command that starts recording log to a file, but it's more cumbersome (compared to how crashout used to work) and doesn't save what happened before it was called.

Of course, the perfect solution would instead be a separate command that would show that widow with the log without crashing the game, or even simply copy whole log to clipboard.

Steps to reproduce the behaviour.

Explain how to reproduce

  1. Type crashout in the console.
  2. Only 1 window pops up instead of 2. The window that lets you save crash report is there, but a window showing the log in a multi-line edit control is absent.

Your configuration

No response

Provide a Log

No response

madame-rachelle commented 1 month ago

You are not supposed to copy that. You're supposed to save the CrashReport.zip and submit that, that stuff in that window is useless.

MajorCooke commented 1 month ago

If you're looking to use what's in the console log, you can try using error_fatal. I use this to get map checksums.

GrayFace commented 1 month ago

You are not supposed to copy that. You're supposed to save the CrashReport.zip and submit that, that stuff in that window is useless.

You misunderstood. I need to copy what's in the console log, that's the only reason I call crashout. It used to be the least cumbersome method of doing it.

MajorCooke commented 1 month ago

You misunderstood. I need to copy what's in the console log, that's the only reason I call crashout. It used to be the least cumbersome method of doing it.

Then error_fatal is what you need. It's simple to use, you just do error_fatal ... and that'll bring the console back with Execution could not continue so you can get what's desired.

madame-rachelle commented 1 month ago

You can't copy from the error_fatal console window either. I reopened this because it shows a bit of the urgency needed with providing both a copy of GZDoom for both subsystems (Windows/Console). Unfortunately you can blame Microsoft for this jacked mess we have right now - they stuck to the 1985 way of "it's either one or the other and not both" which makes it impossible to launch without a console window for a console app, which people do not like.

In Both Mac and Linux - everything is a console app, and they are never required to open a console if executed from the GUI but they'll use one if they run from one.

@GrayFace Do you use shortcuts, or maybe a launcher to run the game? You can append -stdout to force GZDoom to open a console window in the background while it is running.

RicardoLuis0 commented 1 month ago

What about adding a "Save log" button to the vm crash window?

GrayFace commented 1 week ago

@MajorCooke @madame-rachelle Thanks. -stdout is probably the best way of getting setslot output, while error_fatal would be the way to go when investigating mod issues with actorlist and other commands.

This issue is situational, it just rubbed me the wrong way that a thing that worked before stopped working. The fatal error screen (the one for startup errors and error_fatal command) also seems like a clear downgrade. I already had a situation where there was a syntax error on startup and I would've preferred to just select the line number and copy it rather than typing it. I assume there was some reason for switching from rich edit control to this unselectable one, but it's probably for some exceedingly rare niche cases, e.g. maybe when console log is gigantic.

@RicardoLuis0

What about adding a "Save log" button to the vm crash window?

I don't think it's worth adding. For vm crashes it would be best if it could display contents of log.rtf when you select it in Details pane of the "Very Fatal Error" window. This would make my old approach of crashout for copying console contents viable again too. Meanwhile the best option for copying the console log would be a copylog console command, thus not needing to crash the game in the first place.