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

ConEmu doesn't play well with Rust #1596

Closed
Maximus5 opened this issue Jul 31, 2015 · 18 comments
Closed

ConEmu doesn't play well with Rust #1596

Maximus5 opened this issue Jul 31, 2015 · 18 comments

Comments

@Maximus5
Copy link
Owner

Originally reported on Google Code with ID 1596

OS version: Win7 SP1 x64
ConEmu version: 140505

ConEmu apparently doesn't play well with Rust console apps on my system. Running the
Rust compiler or any console application compiled with it results in "memory cannot
be read" error. Everything works fine when I compile/run from a plain cmd window. 

*Steps to reproduction*
1. Install the latest Rust like described here: https://github.com/mozilla/rust/wiki/Using-Rust-on-Windows
2. Run "rustc" in ConEmu.
3. If that doesn't break, you can try compiling any console application (e.g. the example
on http://www.rust-lang.org/) and running it from ConEmu again. 


Reported by tp7ptr on 2014-05-30 22:35:24

@Maximus5
Copy link
Owner Author

ConEmuHk?

Reported by ConEmu.Maximus5 on 2014-05-30 22:37:07

@Maximus5
Copy link
Owner Author

Yeah, it works if I disable injection in settings.

Reported by tp7ptr on 2014-05-30 22:42:32

@Maximus5
Copy link
Owner Author

https://github.com/Maximus5/ConEmu/issues/12

Reported by ConEmu.Maximus5 on 2014-06-02 11:33:44

@Maximus5
Copy link
Owner Author

Fallback from using mingw-w64 4.8.x to 4.7.x to link Rust binaries would help as well
https://github.com/mozilla/rust/issues/14600

Reported by webmaster@webmaster.ms on 2014-06-02 11:36:49

@Maximus5
Copy link
Owner Author

Reported by webmaster@webmaster.ms on 2014-06-02 11:44:35


- _Attachment: [rust-test-exe.zip](https://storage.googleapis.com/google-code-attachments/conemu-maximus5/issue-1596/comment-5/rust-test-exe.zip)_

@Maximus5
Copy link
Owner Author

Interesting, but I have different backtrace than mentioned on github (for hi.exe).

Reported by ConEmu.Maximus5 on 2014-06-02 12:42:09

@Maximus5
Copy link
Owner Author

That backtrace is from ConEmu 130427

With ConEmu 140529 it looks like:
(gdb) backtrace
#0  0x77368e19 in ntdll!RtlIntegerToUnicodeString () from C:\Windows\system32\ntdll.dll
#1  0x77368d28 in ntdll!RtlIntegerToUnicodeString () from C:\Windows\system32\ntdll.dll
#2  0x004b254d in malloc_init_hard ()
#3  0x00512d4d in jemalloc_constructor ()
#4  0x005104da in __do_global_ctors ()
#5  0x00000000 in ?? ()

BTW, this can be related https://github.com/mozilla/rust/issues/14403#issuecomment-44222920

Reported by webmaster@webmaster.ms on 2014-06-02 15:22:22

@Maximus5
Copy link
Owner Author

Backtrace of rustc.exe is the same with ConEmu 130xxx and 140xxx (and different from
both stacktraces of hi.exe)

To reproduce the bug, you may install Rust from here: http://static.rust-lang.org/dist/rust-nightly-install.exe
(archived version with the bug: http://www.webcitation.org/6Q27DY0DY) ant try to run
"rustc.exe" or "rustc.exe --help"

Reported by webmaster@webmaster.ms on 2014-06-02 15:30:16

@Maximus5
Copy link
Owner Author

Try this patch
https://www.dropbox.com/s/ojxrg8l4ztf5d6l/ConEmuHk.140529a.dll.7z

Reported by ConEmu.Maximus5 on 2014-06-02 15:34:48

@Maximus5
Copy link
Owner Author

hi.exe works ok, rustc.exe still crashes

Reported by webmaster@webmaster.ms on 2014-06-02 15:39:26

@Maximus5
Copy link
Owner Author

Neither "rustc" nor "rustc --help" not crashed on my Win8x64. Trying from cmd started
in ConEmu.

Create please MemoryDump of crashed rustc and upload to DropBox for example.

Reported by ConEmu.Maximus5 on 2014-06-02 15:57:36

@Maximus5
Copy link
Owner Author

https://mega.co.nz/#!gpRi0CxB!yGHEk9_5nORJy1wt6EafOIhGgVU0nehkyqGnBzKxL7Y

Reported by webmaster@webmaster.ms on 2014-06-02 16:43:59

@Maximus5
Copy link
Owner Author

Hi I am currently also having this problem but with no conEmu https://github.com/mozilla/rust/issues/14403
so this may be a more of just a general problem right now

Reported by Shogeluk on 2014-06-02 22:54:48

@Maximus5
Copy link
Owner Author

rustc 0.11.0-pre-nightly on Win7-64 crashing here as well inside ConEmu, but not in
normal cmd.

The crash is in ConEmuHk.dll!7e142e4b, which appears to be reading hUser32 at https://github.com/Maximus5/ConEmu/blob/828897c300edb4114b8fd7eb7b24d4ff766cfdbd/src/ConEmuHk/UserImp.cpp#L153

I have no idea how this works, but since there is only one global user object, could
a new object have been loaded making the current this pointer invalid?

Reported by jibsen on 2014-06-17 07:44:25

@Maximus5
Copy link
Owner Author

I need stack at least, MiniDump better.

Reported by ConEmu.Maximus5 on 2014-06-17 07:50:18

@Maximus5
Copy link
Owner Author

Try this patch
https://www.dropbox.com/s/snn6sqhu3becxcx/ConEmuHk.140617.dll.7z

Reported by ConEmu.Maximus5 on 2014-06-18 07:51:00

@Maximus5
Copy link
Owner Author

Seems to work here, compiled a rust program and ran it without any problems.

Thanks!

Reported by jibsen on 2014-06-18 19:06:33

@Maximus5
Copy link
Owner Author

Reported by ConEmu.Maximus5 on 2014-06-18 21:00:10

  • Status changed: Fixed

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

No branches or pull requests

1 participant