[win32 | ext | IE] 'stack level too deep' error

Discussion in 'Ruby' started by ruby.dev@gmail.com, Sep 19, 2005.

  1. Guest

    hi,

    I have a problem with this "stack level too deep" error in my extension
    and I hope someone can provide some hints in solving it as I banged my
    head to the wall for several days.

    input:
    * a program that uses embedded Ruby for scripting
    * extension creates a window with an embedded IE (IWebBrowser2)
    * extension extends window.external with a function that
    rb_eval_string_protect the argument (after converting from WideChar to
    MultiByte)

    host -> ruby -> extension -> IE window -> ruby

    info:
    * if I test outside the host program (normal ruby) I get after several
    calls - (eval):5: [BUG] cross-thread violation on rb_thread_schedule()

    * inside host program if the eval uses iterators with multiple items or
    string concatenation(<<) I get - (eval):128:in `method_missing': stack
    level too deep

    * I tried rb_gc_disable() but with no effect

    * if I Init_stack on window.external invoke it works as long as I am
    inside the IE window. on a second window activation I get 'stack level
    too deep' and I cannot open the window anymore

    versions:
    * normal ruby 1.8.2 (2004-12-25) [i386-mswin32]
    * hoster ruby 1.8.0 (2003-08-04) [i386-mswin32]

    thanks
    , Sep 19, 2005
    #1
    1. Advertising

  2. Ruby.Dev Guest

    Re: 'stack level too deep' error

    I want to thank Guy Decoux for the wonderfull tip - "don't try to mix
    OS thread with ruby thread"

    by changing the OS CreateThread(...) with rb_thread_create(...) solved
    the problem for those that encounter the same problem
    Ruby.Dev, Sep 26, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Eric Schwartz

    stack level too deep on ia64

    Eric Schwartz, Nov 10, 2003, in forum: Ruby
    Replies:
    3
    Views:
    142
    Eric Schwartz
    Nov 11, 2003
  2. Jean-Hugues ROBERT

    yaml, level too deep, stack error

    Jean-Hugues ROBERT, Apr 27, 2004, in forum: Ruby
    Replies:
    1
    Views:
    118
    why the lucky stiff
    Apr 27, 2004
  3. E.-R. Bruecklmeier

    [Q] YAML Error: stack level too deep

    E.-R. Bruecklmeier, Jul 6, 2004, in forum: Ruby
    Replies:
    4
    Views:
    193
    haldane
    Jul 6, 2004
  4. Sam Roberts
    Replies:
    1
    Views:
    211
    Yukihiro Matsumoto
    Feb 11, 2005
  5. Mrmaster Mrmaster
    Replies:
    6
    Views:
    162
    Mrmaster Mrmaster
    Aug 10, 2009
Loading...

Share This Page