Ruby - Running External Ruby script crashes TCC

Jun 6, 2009
21
0
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
12,356
150
> 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
21
0
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
21
0
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
21
0
In what module?

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
12,356
150
> 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
21
0
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
 

rconn

Administrator
Staff member
May 14, 2008
12,356
150
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).
 
Jun 6, 2009
21
0
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
 
Similar threads
Thread starter Title Forum Replies Date
jwiede Is Ruby support EoL in "modern" TCC/TCmd? Support 1
noahcoad @ruby closes console Support 2
fromano WAD Support for Ruby 1.9.3 Support 5
Timothy Byrd Direct execution of Ruby in TCC 9.02.146 Support 3
vefatica Running services.msc? Support 1
gentzel Directory stack empty when running TCEXIT? Support 9
A Fixed [23.0.22]: TCMD crashes shortly after start, TCC keeps running in background Support 6
MickeyF running program from script and (not) returning to script Support 12
J Error running Python at command line Support 9
Peter Murschall Uninstall CMDEBUG is not running Support 3
T Fixed IDE locks up if edit window for running batch is closed Support 6
C Running PowerShell_ISE in a Tab Support 7
B How to get window status of a running app Support 3
rconn News Website & Forums now running PHP 7 Support 0
D Running v19 breaks v18 Support 1
vefatica JUMPLIST item when pinned TCMD isn't running? Support 0
MickeyF running a program from cmdline versus in batch file Support 1
B Batch file won't run if there is already an instance of TC 17 running Support 9
rjperrella start /tabna leaves blank windows when running batch scripts Support 10
T Fixed TCC 17: Error running Chocolatey Package Manager Support 3
vefatica Caption when running elevated? Support 4
C Determine process svchost is running Support 13
F Minimising the command window running from a batch file Support 19
D How to? Problem running Mercurial with Araxis Merge Support 3
vefatica Running TCMD's help on the services desktop Support 0
J TC12 Win7 console, running gawk scripts Support 0
M Running a batch file at Windows startup... Support 8
vefatica Browser doesn't start while IDE is running Support 12
J Crash in 12.00.27: Running any git command from Git for Windows Support 10
nikbackm Running several TCMD versions side-by-side - config files Support 7
R No Error Message when running mklink as limited user Support 3
B Installed/Running in Windows 7? Support 3
mscheuner Running one tab as Vista admin - ERROR Support 1
deleyd command that launches batch file running TCMD? Support 6
J 4NT Error when running 'system' from a program to execute a .BTM Support 3
p.f.moore Running another batch file without CALL Support 7
vefatica IDE external command syntax color? Support 1
gentzel Bug launching external commands in 20.11.43 Support 11
D Fixed 20.10 strangeness with external commands Support 9
Stefano Piccardi list of TCC commands for external editors Support 4
A How to? Run a TCC command from external program Support 2
T How to? Logging Output from External Programs Support 4
M How to? Get the return code from an external program... Support 8
nikbackm Alias - launch external program - batch file Support 16
R Don't wake up external drives on startup Support 2

Similar threads