Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stdout infinite loop and crash in Windows program #63

Open
jminer opened this issue Jan 5, 2014 · 0 comments
Open

Stdout infinite loop and crash in Windows program #63

jminer opened this issue Jan 5, 2014 · 0 comments

Comments

@jminer
Copy link

jminer commented Jan 5, 2014

With the following program:

import tango.io.Stdout;

extern(Windows)
int MessageBoxW(void* hWnd, const(wchar)* lpText, const(wchar)* lpCaption, uint uType);

void main() {
    Stdout.format("Bye, world").newline;
    MessageBoxW(null, "The program opened.", "Opened", 0);
}

On Windows 7 64-bit, if you compile the program as a Windows program instead of a console program using

rdmd -ofmain.exe -I..\Tango ..\Tango\libtango-dmd.lib -L/EXETYPE:NT -L/SUBSYSTEM:WINDOWS:4.0 main.d

Then when the program is run from the console, the process will go into an infinite loop instead of exiting. If you try double clicking the program in Explorer, it silently dies, presumably because it threw an exception. I tried on Windows XP, and the program opens when double clicked but still goes into an infinite loop at exit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant