rb_gc_mark(): unknown data type...non object

Ask a Question related to Ruby, Design and Development.

  1. #1

    Default rb_gc_mark(): unknown data type...non object

    I figure I'm getting this because I've got a VALUE that's not a Ruby
    object. Has anyone figured out a good way to track down such a bug?


    Jim Cain Guest

  2. Similar Questions and Discussions

    1. ASP - MSAccess (OLE Object Data Type)
      Is it possible for me to retrieve an OLE Object(.JPEG format) datatype and display it on the browser?
    2. [BUG] unknown node type 0
      Hello, all. Who else has seen this error? unknown node type 0 ruby 1.8.0 (2003-08-04) Aborted (core dumped) I'm on a quest to...
    3. #24752 [Opn->Csd]: unknown column type "uniqueidentifier", type 35
      ID: 24752 Updated by: iliaa@php.net Reported By: s dot sonnenberg at coolspot dot de -Status: Open +Status: ...
    4. #24752 [NEW]: unknown column type "uniqueidentifier", type 35
      From: s dot sonnenberg at coolspot dot de Operating system: Linux PHP version: 4.3.2 PHP Bug Type: MSSQL related Bug...
    5. unknown user type
      Power Users members show up in this way. "scott" <taylorms@aol.com> wrote in message news:08f101c33fcb$c885f8c0$a501280a@phx.gbl...
  3. #2

    Default Re: rb_gc_mark(): unknown data type...non object

    Yukihiro Matsumoto wrote:
    > Hi,
    >
    > In message "rb_gc_mark(): unknown data type...non object"
    > on 03/07/04, Jim Cain <list@jimcain.us> writes:
    >
    > |I figure I'm getting this because I've got a VALUE that's not a Ruby
    > |object. Has anyone figured out a good way to track down such a bug?
    >
    > I use gdb. If you're not using your own extension, show us the
    > backtrace (output from gdb "where" command). We may be able to help
    > you.
    >
    > matz.
    >
    >
    Thanks; it's my Ruby9i extension. I've wasted two days on this and
    haven't found anything definitive. Even when I would explicitly start
    the gc, sometimes I would get the error and sometimes not. I began to
    suspect that it wasn't a bad VALUE but rather a buffer overrun elsewhere
    that was corrupting a VALUE.

    In the meantime, I was reading some previous posts about rb_obj_alloc
    "only working for T_OBJECT classes" in 1.6.x. Just what exactly are
    T_OBJECT classes? Non-builtin classes? I wasn't sure just what was meant
    by that, and I do use rb_obj_alloc in a few cases, so out of curiosity I
    built my extension on 1.8, and now I don't get the gc "unknown data
    type" error. At least not yet. Maybe just a coincidence. We'll see.


    Jim Cain Guest

  4. #3

    Default Re: rb_gc_mark(): unknown data type...non object

    Hi,

    In message "Re: rb_gc_mark(): unknown data type...non object"
    on 03/07/04, Jim Cain <list@jimcain.us> writes:

    |In the meantime, I was reading some previous posts about rb_obj_alloc
    |"only working for T_OBJECT classes" in 1.6.x. Just what exactly are
    |T_OBJECT classes? Non-builtin classes? I wasn't sure just what was meant
    |by that, and I do use rb_obj_alloc in a few cases, so out of curiosity I
    |built my extension on 1.8, and now I don't get the gc "unknown data
    |type" error. At least not yet. Maybe just a coincidence. We'll see.

    Each object has its "type". "type" is not a class. It describes the
    structure that object has. For example an object with T_OBJECT type
    is implemented by "struct RObject". In 1.6.8, classes does not have
    information about the type of its instances, so that rb_obj_alloc()
    produces T_OBJECT object, no matter what type it should be. In 1.8.0
    each type knows its instance type, so that rb_obj_alloc() work fine
    with all classes. But you have to define allocation function using
    new rb_define_alloc_func() API.


    matz.

    Yukihiro Matsumoto Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139