Maximus5 / conemu-inside

An example, how to embed http://conemu.github.io/ into another graphical application
57 stars 42 forks source link

Compatability issue with csc.exe and ConEmu Inside (but not ConEmu) #38

Closed AndrewBragdon closed 7 years ago

AndrewBragdon commented 7 years ago

When running the C# compiler (CSC.exe) from inside ConEmu Inside demo app it crashes. However when running CSC.exe from the main ConEmu release it works.

Here are the repro steps:

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe

Expected: CSC.exe runs and outputs normally Actual: CSC.exe crashes - see attached screenshot

image

Maximus5 commented 7 years ago

ConEmu binaries in the inside demo are rather old. Just update them.

AndrewBragdon commented 7 years ago

Good idea. I tried changing the path to the EXE to be ConEmuPack.161206. Unfortunately csc.exe still crashes. I tried both 32-bit and 64-bit. Interesntly, if I run ConEmu64.exe from the same pack, it actually works fine:

image

I also tried coyping the ConEmu executables directly into the bin/Debug/ConEmu folder for ConEmu Inside and I got the same crashes.

Is it possible there is something specific with ConEmu Inside that is causing the problem?

Maximus5 commented 7 years ago

Width/height of the console?

AndrewBragdon commented 7 years ago

Hmm, I tried different widths/heights but it still seems to be crashing. Any other ideas?

Maximus5 commented 7 years ago

Finally. I found the problem and it is the bug in csc.exe.

csc.exe crashes always if the console output codepage is UTF-8. So it does not depends on ConEmu at all. If you want to use it, just call chcp 850 or something like this. But if you call chcp 65001 before csc, it would crash every time even in bare conhost window.

It would be easy to find it by comparing Settings/Info in working and not working ConEmu instances.

@miniksa I'm not sure, but may be you can check this?