Skip to content

Error: unhandled exception: errno: 9 `Bad file descriptor' [IOError] #16502

Closed
@retsyo

Description

@retsyo

I am using latest cloned&built nim

$ nim
Nim Compiler Version 1.5.1 [Windows: amd64]
Compiled at 2020-12-29
Copyright (c) 2006-2020 by Andreas Rumpf

Example

echo 1

Current Output

when I compile the a.nim with nim c -r --app:gui a.nim, I get an error msgbox

R:\a.nim(1)
a
E\msys64\home\USER\_nim\nim\lib\system\io.nim(791) echoBinSafe
E:\msys64\home\USER\_nim\nim\lib\system\io.nim(156) checkErr
E:\msys64\home\USER\_niminim\lib\system\io.nim(139) raiseEIO
Error: unhandled exception: errno: 9 `'Bad file descriptor` [IOError]

when I compile a.nim as nim c -r a.nim, I see

1

as expected

Expected Output

yes, I know --app:gui means to compile a GUI app without console, so I expect nim c -r --app:gui a.nim runs but without error msgbox. Why do I need this? Because I write some echo xx in my app which are used for debugging. When the app is finished, I need to release a GUI app to the user without console, but I am lazy to remove the echo xx statements.

thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions