ansicon icon indicating copy to clipboard operation
ansicon copied to clipboard

Ansicon166 x64 interrupts Ruby interpreter 2.0.0p481

Open jguglielmi opened this issue 11 years ago • 13 comments

As stated in previously closed defects, v 1.66 did not fix anything with ruby 2.0.0p481. The only workaround is to uninstall it.

jguglielmi avatar May 22 '14 12:05 jguglielmi

Here's the progress I made on 1.70 before getting sidetracked (and it'll be a bit longer before I get back to it). It uses yet another method of injection, which hopefully fixes the problem. If not, set ANSICON_EXC=ruby should allow you to keep using ANSICON without having to uninstall.

adoxa avatar May 23 '14 06:05 adoxa

Unfortunately, the workaround still freezes up the ruby interpreter for me. I'll wait for 1.70. In the meantime, I'll just remove that annoying message from Cucumber.

jguglielmi avatar May 23 '14 11:05 jguglielmi

Are you using 32- or 64-bit Ruby (I'd rather only download one)?

adoxa avatar May 24 '14 01:05 adoxa

64-bit On May 23, 2014 9:38 PM, "Jason Hood" [email protected] wrote:

Are you using 32- or 64-bit Ruby (I'd rather only download one)?

— Reply to this email directly or view it on GitHubhttps://github.com/adoxa/ansicon/issues/71#issuecomment-44074272 .

jguglielmi avatar May 24 '14 01:05 jguglielmi

Well, this is annoying - both 1.66 and 1.70 work fine for me.

T:\>ver

Microsoft Windows [Version 6.1.7601]

T:\>ansicon --version
ANSICON (64-bit) version 1.66 (21 September, 2013).

T:\>ruby --version
ruby 2.0.0p481 (2014-05-08) [x64-mingw32]

T:\>cucumber --version
*** WARNING: You must use ANSICON 1.31 or higher (https://github.com/adoxa/ansicon/) to get coloured output on Windows
1.3.15

T:\>ansicon cucumber.bat --version
1.3.15

Could you run ansicon -l2 cucumber.bat --version and post %temp%\ansicon.log?

adoxa avatar May 24 '14 05:05 adoxa

Wish I could say the same thing. No log file is being generated.

error

jguglielmi avatar May 29 '14 11:05 jguglielmi

No log file is being generated.

I find that hard to believe, since the log is created as soon as -l is seen and ANSICON has to at least run cmd.exe in order to run cucumber.bat and ruby.exe.

C:\Language\ruby-2.0.0-p481-x64-mingw32\bin>ansicon -l1 cucumber.bat --version
1.3.15

C:\Language\ruby-2.0.0-p481-x64-mingw32\bin>type %temp%\ansicon.log
ANSICON (64-bit) v1.66 log (1) started 2014-05-30 12:03:09
ansicon (7212): cucumber.bat (10788)
ansicon (7212):   64-bit console (base = 000000004A5B0000)
cmd (10788): hDllInstance = 00000000AC000000
cmd (10788): CreateProcessW: (11160) "C:\Language\ruby-2.0.0-p481-x64-mingw32\bin\ruby.exe", ""ruby.exe"  "C:\Language\ruby-2.0.0-p481-x64-mingw32\bin\cucumber" --version"
cmd (10788):   64-bit console (base = 0000000000400000)
ruby (11160): hDllInstance = 00000000AC000000
ruby (11160): Terminating
cmd (10788): Terminating

adoxa avatar May 30 '14 02:05 adoxa

If the process is immediately locking up, I don't expect any log output. I get a temp .xml file being generated which vanishes as soon as I kill the process.

Sent from my iPad

On May 29, 2014, at 10:21 PM, Jason Hood [email protected] wrote:

No log file is being generated.

I find that hard to believe, since the log is created as soon as -l is seen and ANSICON has to at least run cmd.exe in order to run cucumber.bat and ruby.exe.

C:\Language\ruby-2.0.0-p481-x64-mingw32\bin>ansicon -l1 cucumber.bat --version 1.3.15

C:\Language\ruby-2.0.0-p481-x64-mingw32\bin>type %temp%\ansicon.log

ANSICON (64-bit) v1.66 log (1) started 2014-05-30 12:03:09 ansicon (7212): cucumber.bat (10788) ansicon (7212): 64-bit console (base = 000000004A5B0000) cmd (10788): hDllInstance = 00000000AC000000 cmd (10788): CreateProcessW: (11160) "C:\Language\ruby-2.0.0-p481-x64-mingw32\bin\ruby.exe", ""ruby.exe" "C:\Language\ruby-2.0.0-p481-x64-mingw32\bin\cucumber" --version" cmd (10788): 64-bit console (base = 0000000000400000) ruby (11160): hDllInstance = 00000000AC000000 ruby (11160): Terminating cmd (10788): Terminating — Reply to this email directly or view it on GitHub.

jguglielmi avatar May 30 '14 08:05 jguglielmi

The log is created before the process, so if there's no log, ANSICON is not creating the process, or you're not instructing ANSICON to create the log (it's dash ell two). The .xml has nothing to do with ANSICON.

adoxa avatar May 30 '14 14:05 adoxa

Restarting my computer solves the problem for some hours of work, but found another (related) problem.

Using 'autotest', with 'minitest' and 'pry-rescue/minitest'. When tests find an error, the pry console opens, but codes and colours are messed. Sometimes shows an error like "Can`t find c:\windows\system32\ansicon'.

Tried replacing in registry c:\windows\system32\ansicon for c:\windows\system32\ansicon.exe but the same result.

Then, tried copying the three ansicon files to c:\windows\syswow64, and everything works. I have perfect coloring inside minitest -> pry console, and by now there's no error with Ruby.

ferfebles avatar Sep 16 '14 19:09 ferfebles

Sounds like a good reason not to install to %windir%\system32, since, as you've inadvertently discovered, Windows automatically redirects 32-bit programs referencing it to %windir%\syswow64.

adoxa avatar Sep 17 '14 08:09 adoxa

Seems that should be installed to both paths: %windir%\system32 and %windir%\syswow64, in order to support 32 and 64bit apps.

ferfebles avatar Sep 17 '14 13:09 ferfebles

Or just install it anywhere else (and using -i means it doesn't need to be on the PATH at all).

adoxa avatar Sep 18 '14 00:09 adoxa