[TxMt] Re: Is there a limited heap or stack for running ruby in textmate?
rburrowes
r.burrowes at auckland.ac.nz
Fri Apr 10 21:32:59 UTC 2009
I could email you a copy if you wanted, but it is about 500K. It is online at
Rubyforge, both through their web interfaces and via git. I haven't packaged
the version that causes the problems, but could. I really need to sit down
and isolate what causes the problem.
I have tried just creating lots of strings and tried doing this with a lot
of recursion, both of which the code base does. I couldn't reproduce it. The
code does produces a lot of objects, so I will try experimenting with this
to see if I can reproduce it.
The code is not threaded, so it shouldn't have race conditions and the error
printing the string is consistent. I can print the string, getting the
error. Output the string to a file and not get the error, and print the same
string again and get the error again. I can also print the string reversed,
and I don't get the error.
The code reads a GEDCOM file (GEDCOM is a text base DB file), parsing the
records into an object hierarchy. I get the error when I am testing the
result of this code, by walking a small subset of the object hierarchy and
producing GEDCOM text records as output to the Textmate output window.
The error is printed while outputting the string, but the Textmate window
doesn't stop printing the rest of the same string. That seems odd to me.
The code is on Rubyforge in
http://gedcom.rubyforge.org/git?p=gedcom.git;a=tree
Or via git using
git clone git://rubyforge.org/gedcom.git
Running test/gedcom, after removing the comments from around
lib/gedcom/transmission.rb's summary method, will print the string, print
the string to /tmp/xx.txt and print the string again. Both prints give the
error, but the file copy is correct.
The string is produced calling f.to_gedcom, which is a method in
lib/gedcom/gedcom_base.rb. This actually walks through all the other objects
that were created from the classes in lib/gedcom/*.rb. It isn't that easy to
follow.
The error will go away if @@tabs = false, rather than true. This stops the
leading spaces being added to the lines in the string (in method
GedcomBase.tabstop in gedcom_base.rb). The line " 3 Time ..." becoming
"3 TIME ...". The error is there for Ruby 1.8.6 and Ruby 1.9.1.
Allan Odgaard-4 wrote:
>
> On 08 Apr 2009, at 00:03, rburrowes wrote:
>
>> I get the following error running a ruby program in Textmate [...]
>
> Looks like normal ruby error (stack dump) intermixed with regular
> output. Are you using fork()?
>
>> So is there a heap or stack size issue running ruby from textmate?
>> Any other
>> guesses at what is happening?
>
> Maybe your program has a race condition and the different timings in
> the TM environment triggers it.
>
> Can you include code which cause the error?
>
>
>
> _______________________________________________
> textmate mailing list
> textmate at lists.macromates.com
> http://lists.macromates.com/listinfo/textmate
>
>
--
View this message in context: http://www.nabble.com/Is-there-a-limited-heap-or-stack-for-running-ruby-in-textmate--tp22675345p22995010.html
Sent from the textmate users mailing list archive at Nabble.com.
More information about the textmate
mailing list