Anonymous | Login | 2024-04-26 12:00 CEST |
Main | My View | View Issues | Change Log | Wiki | Tavern | News |
Viewing Issue Simple Details [ Jump to Notes ] [ Wiki ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||
0008773 | [DCSS] Bug Report | major | always | 2014-07-09 04:51 | 2014-08-05 03:40 | ||
Reporter | johnnyzero | View Status | public | ||||
Assigned To | neil | ||||||
Priority | normal | Resolution | done | ||||
Status | closed | Product Branch | 0.15 ancient branch | ||||
Summary | 0008773: Cannot view stdout/stderr output on Windows | ||||||
Description |
When something goes wrong during Crawl's initialization, typically the error is handled gracefully with Crawl printing an error message and prompting for input before exit. However, under Windows, no text is output to the console. On my Windows test machine (Vista x64) this error message and prompt is not displayed, although pressing enter will cause crawl to exit. Even after setting the console's current codepage to UTF-8, no output appears.C:\%CRAWL%>chcp Active code page: 437 C:\%CRAWL%>chcp 65001 Active code page: 65001 For example, moving the contents of %CRAWL%\data\des causes the following error to be printed to the console after starting Crawl: C:\%CRAWL%>crawl.exe Cannot find data file 'des/sprint/meat.des' anywhere, aborting Hit Enter to continue... This is a big issue, as Windows users cannot report many startup issues they encounter. Instead, the best report a Windows user can give is, "Well, after I start Crawl the window leaves a blinking cursor until I hit enter". Commenting out lines 273-274 from source/main.cc (or removing the whole block from 262-275) allows these stdout/stderr messages to appear. 262 #ifdef TARGET_OS_WINDOWS 263 // No documentation about resetting this, nor about which versions of 264 // Windows is required. Previous ones can't handle writing to the console 265 // outside ancient locales AT ALL via standard means. 266 // Even with _O_U8TEXT, output tends to fail unless the user manually 267 // switches the terminal to a truetype font. And even that fails for 268 // anything not directly in the font, above U+FFFF, or within Arabic or 269 // any complex scripts. 270 # ifndef _O_U8TEXT 271 # define _O_U8TEXT 0x40000 272 # endif 273 _setmode(_fileno(stdout), _O_U8TEXT); 274 _setmode(_fileno(stderr), _O_U8TEXT); 275 #endif This issue affects the current windows trunk builds posted on CDO, as well as my personal builds using the i686-w64-mingw32 toolchain. I have not tested a build compiled with MSVC. Removing these stdout/stderr mode sets does not seem to affect the crawl console gameplay, although I've only tested against Vista x64. Unicode console mode still works fine, for example, as Crawl's console mode implementation in source/libwin32c.cc uses the Windows Console API. For more reading: http://alfps.wordpress.com/2011/11/22/unicode-part-1-windows-console-io-approaches/ [^] |
||||||
Additional Information | |||||||
Tags | No tags attached. | ||||||
Attached Files | |||||||
|
Relationships | ||||||
|
Notes | |
(0026719) johnnyzero (reporter) 2014-07-10 03:33 |
Relevant commits:
(Thanks Grunt!) |
(0026949) neil (administrator) 2014-08-05 02:36 |
Fixed in trunk (0.16-a0-46-ge5829e7) and prerelease (0.15-b1-33-g66304f2), thanks! |
(0026950) johnnyzero (reporter) 2014-08-05 03:39 |
Confirmed. Tested a git e5829e7 console build (i686-w64-mingw32 toolchain) under Vista x64. I renamed des/sprint/meat.des to des/sprint/meat.des.bak and tried running crawl after clearing out the saves subdirectory. Crawl successfully printed the expected error message to console. Unicode char_set mode still works fine, as do character + crash log dumps. |
Mantis 1.1.8[^] Copyright © 2000 - 2009 Mantis Group |