tychota / pyv8

Automatically exported from code.google.com/p/pyv8
0 stars 0 forks source link

Sporadic crash #44

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
First off all, thanks for all the help lately!

I'm having a sporadic crash. It happens after calling this module a couple
of times (from the same process):

--++--++--++--++--++--++--++--++--++--++--++--++--++--
from pyv8 import PyV8
def extractor(scripts):
    global_object = GlobalObject()
    with PyV8.JSContext(global_object) as js_context:
        for script in scripts:
            js_context.eval(str(script))
    return global_object.interesting_lines
--++--++--++--++--++--++--++--++--++--++--++--++--++--

("GlobalObject" just checks against some regexps if the line of code
executed/value returned is interesting)

I can't easily reproduce it, but I always get the following stack trace:

-[]--[]--[]--[]--[]--[]--[]--[]--[]--[]--[]--[]--[]--[]--[]--[]--
#
# Fatal error in w:\external\lib\v8\src\objects-inl.h, line 1586
# CHECK(object->IsJSObject()) failed
#

==== Stack trace ============================================

Security context: 05D754FD <JS Object>#0#
    1: /* anonymous */(this=05D75AA9 <JS Object>#1#)

==== Details ================================================

[1]: /* anonymous */(this=05D75AA9 <JS Object>#1#) {
  // stack-allocated locals
  var .result = 03290135 <undefined>
  // expression stack (top to bottom)
  [01] : 0
--------- s o u r c e   c o d e ---------
???????????????????????????????????????????const
$Object=global.Object;?const $Array=global.Array;?const
$String=global.String;?const $Number=global.Number;?const
$Function=global.Function;?const $Boolean=global.Boolean;?const
$NaN=0/0;????function EQUALS(a){?if((typeof(this)==='string')&&(typeof(a)...

-----------------------------------------
}

==== Key         ============================================

 #0# 05D754FD: 05D754FD <JS Object>
 #1# 05D75AA9: 05D75AA9 <JS Object>
=====================
-[]--[]--[]--[]--[]--[]--[]--[]--[]--[]--[]--[]--[]--[]--[]--[]--

My application has an embedded Python (2.5) with some custom modifications.
Also, Boost version is 1.41.0. V8 trunk, rev 4135. PyV8 trunk, rev 241.

It may have something to do with my custom scenario. Any help would be
appreciated. Thanks!

Original issue reported on code.google.com by mmura...@dieresys.com.ar on 19 Mar 2010 at 8:41

GoogleCodeExporter commented 9 years ago
Could you give me a core dump file? or more call stack including the v8 parts?

#
# Fatal error in w:\external\lib\v8\src\objects-inl.h, line 1586
# CHECK(object->IsJSObject()) failed
#

This error hits the following line to cast type, it seems a situation that pyv8 
try to 
cast a invalid object to JSObject, so I should know where the issue occured.

CAST_ACCESSOR(JSObject)

#define CAST_ACCESSOR(type)                     \
  type* type::cast(Object* object) {            \
    ASSERT(object->Is##type());                 \
    return reinterpret_cast<type*>(object);     \
  }

Thanks

Original comment by flier...@gmail.com on 20 Mar 2010 at 1:55

GoogleCodeExporter commented 9 years ago
Please reopen it when you could reproduce it, thanks.

Original comment by flier...@gmail.com on 10 Aug 2011 at 5:27