Ruby - Running External Ruby script crashes TCC

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
Jun 6, 2009
14
0
#1
Hi,

I've seen other comments related to problems with Ruby but most seemed related to the embedded Ruby.

I'm just trying to run an external script that runs successfully from aWindows VISTA's cmd.exe console. I'm using the version v13.00.27 of TakeCommand and this version of Ruby

ruby 1.9.2p290 (2011-07-09) [i386-mingw32]

Anyway, the Ruby script crashes the TCC console every time. Suggestions?

thanks
rick
 

rconn

Administrator
Staff member
May 14, 2008
10,100
85
#2
> Anyway, the Ruby script crashes the TCC console every time. Suggestions?
Did you disable the internal TCC Ruby support? (OPTION / Startup /
Scripting, uncheck "Ruby".) If so, it cannot possibly be a TCC issue.

Are you getting a TCC error (please post it), a Windows error report popup
(please post the contents), or is it just blowing up the console (which
would be a Windows console manager problem)? If it's a TCC crash (which it
cannot be if you disabled the internal Ruby support), you'll get a TCC.GPF
file (usually in the same directory as your TCMD.INI).
 
Jun 6, 2009
14
0
#3
I forgot to include the Ruby script that causes the crash. Just about anything will do. For example, calling the script testTCC.rb does the trick.

# testTCC.rb

puts "hello"


FWIW, the exception is

0040103E mov eax,dword ptr [ecx+3Ch]

thanks
rick
 
Jun 6, 2009
14
0
#4
See inside the quote and below.

Did you disable the internal TCC Ruby support? (OPTION / Startup /
Scripting, uncheck "Ruby".) If so, it cannot possibly be a TCC issue.

No.

Are you getting a TCC error (please post it)

Just the message that TCC has stopped working and the option to debug. I sent the debug info earlier.

, a Windows error report popup
(please post the contents), or is it just blowing up the console (which
would be a Windows console manager problem)? If it's a TCC crash (which it
cannot be if you disabled the internal Ruby support), you'll get a TCC.GPF
file (usually in the same directory as your TCMD.INI).
I can not locate a TCMD.INI or TCC.GPF on my system. Here is the Windows Problem report:

Problem signature
Problem Event Name: APPCRASH
Application Name: TCC.EXE
Application Version: 13.0.0.27
Application Timestamp: 4e9ce0dc
Fault Module Name: TCC.EXE
Fault Module Version: 13.0.0.27
Fault Module Timestamp: 4e9ce0dc
Exception Code: c0000005
Exception Offset: 0000103e
OS Version: 6.0.6002.2.2.0.256.6
Locale ID: 1033
Additional Information 1: 6d0a
Additional Information 2: 07d19bf731583ca4adf08c5be3993ee2
Additional Information 3: bfd2
Additional Information 4: c87ab400bdd9d23ced87b517636397be

hth
rick
 
Jun 6, 2009
14
0
#6
Not sure. Here's more info:

The VS 2010 popup displays:
Unhandled exception at 0x0040103e in tcc.exe: 0xC0000005: Access violation reading location 0x0000003c.

The Disassembly shows (as before):
0040103E mov eax,dword ptr [ecx+3Ch]

Not sure how to find the module.

rick
 

rconn

Administrator
Staff member
May 14, 2008
10,100
85
#8
> Did you disable the internal TCC Ruby support? (OPTION / Startup /
> Scripting, uncheck "Ruby".) If so, it cannot possibly be a TCC issue.
>
> *No.*
You've lost me here -- are you saying that Ruby *is* checked in the OPTION
dialog? If so, TCC is running the embedded Ruby (which seems to contradict
your first post). If you don't want the embedded Ruby, you must uncheck
that option.
 
Jun 6, 2009
14
0
#10
You've lost me here -- are you saying that Ruby *is* checked in the OPTION
dialog? If so, TCC is running the embedded Ruby (which seems to contradict
your first post). If you don't want the embedded Ruby, you must uncheck
that option.

Sorry to have wasted your time. I was under the impression that embedded Ruby was triggered through the use of the %@Ruby syntax only (so I have avoided it). I apologize for wasting your time. Unchecking the box solved all of my Ruby/TCC problems.

Once again my apologies.

thanks
rick
 
Jun 6, 2009
14
0
#12
I just tried the embedded Ruby 1.9.2 with TCC and your example script, and everything worked as expected.

Are you running TCC x64? That will definitely will *not* work, since AFAIK the Ruby developers don't have an x64 version yet (and the 32-bit Ruby dll doesn't play well with x64 processes).
I don't believe so. However, after unchecking the Ruby scripting in the options dialog box, all is well. Ruby scripts seem to run just fine.

Once again, apologies for all of the confusion.

regards
rick