Hello.
I am trying to add a new target langague to Interrogate (Haxe). I based my implementation off of the C set of classes, but when I run I get segmentation faults. I assumed I had missed something, but I’ve encounted the same crash when trying to run interrogate with either of
[*C]
[*Python]
[*Python-Obj]
Im using the 1.8.1 and makepanda. I would really appreciate it if another person could try interrogate with any of the above three options to see if this is due to operator error
python makepanda/makepanda.py --nothing --use-python --use-direct --verbose --optimize 1 --threads 4
Thread 1 (Thread 0x7ffff7fc8740 (LWP 23933)):
#0 0x000000000042460c in InterfaceMaker::Object::check_protocols (this=0x281ea30) at dtool/src/interrogate/interfaceMaker.cxx:156
flags = 0
fi = {_M_current = 0x0}
stype = 0x25bef90
#1 0x00000000004266aa in InterfaceMaker::record_object (this=0x25bc880, type_index=1328) at dtool/src/interrogate/interfaceMaker.cxx:784
oi = {_M_node = 0x25bc8a8}
itype = @0x25bef18: {<InterrogateComponent> = {static _empty_string = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x7ffff763d3f8 <std::string::_Rep::_S_empty_rep_storage+24> ""}}, _def = 0x0, _name = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x25bec18 "atomic string"}}, _alt_names = {<std::_Vector_base<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >> = {_M_impl = {<std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >> = {<__gnu_cxx::new_allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >> = {<No data fields>}, <No data fields>}, _M_start = 0x0, _M_finish = 0x0, _M_end_of_storage = 0x0}}, <No data fields>}}, _flags = 2, _scoped_name = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x25bec18 "atomic string"}}, _true_name = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x25bec18 "atomic string"}}, _comment = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x7ffff763d3f8 <std::string::_Rep::_S_empty_rep_storage+24> ""}}, _outer_class = 0, _atomic_token = AT_string, _wrapped_type = 0, _constructors = {<std::_Vector_base<int, std::allocator<int> >> = {_M_impl = {<std::allocator<int>> = {<__gnu_cxx::new_allocator<int>> = {<No data fields>}, <No data fields>}, _M_start = 0x0, _M_finish = 0x0, _M_end_of_storage = 0x0}}, <No data fields>}, _destructor = 0, _elements = {<std::_Vector_base<int, std::allocator<int> >> = {_M_impl = {<std::allocator<int>> = {<__gnu_cxx::new_allocator<int>> = {<No data fields>}, <No data fields>}, _M_start = 0x0, _M_finish = 0x0, _M_end_of_storage = 0x0}}, <No data fields>}, _methods = {<std::_Vector_base<int, std::allocator<int> >> = {_M_impl = {<std::allocator<int>> = {<__gnu_cxx::new_allocator<int>> = {<No data fields>}, <No data fields>}, _M_start = 0x0, _M_finish = 0x0, _M_end_of_storage = 0x0}}, <No data fields>}, _casts = {<std::_Vector_base<int, std::allocator<int> >> = {_M_impl = {<std::allocator<int>> = {<__gnu_cxx::new_allocator<int>> = {<No data fields>}, <No data fields>}, _M_start = 0x0, _M_finish = 0x0, _M_end_of_storage = 0x0}}, <No data fields>}, _make_seqs = {<std::_Vector_base<int, std::allocator<int> >> = {_M_impl = {<std::allocator<int>> = {<__gnu_cxx::new_allocator<int>> = {<No data fields>}, <No data fields>}, _M_start = 0x0, _M_finish = 0x0, _M_end_of_storage = 0x0}}, <No data fields>}, _derivations = {<std::_Vector_base<InterrogateType::Derivation, std::allocator<InterrogateType::Derivation> >> = {_M_impl = {<std::allocator<InterrogateType::Derivation>> = {<__gnu_cxx::new_allocator<InterrogateType::Derivation>> = {<No data fields>}, <No data fields>}, _M_start = 0x0, _M_finish = 0x0, _M_end_of_storage = 0x0}}, <No data fields>}, _enum_values = {<std::_Vector_base<InterrogateType::EnumValue, std::allocator<InterrogateType::EnumValue> >> = {_M_impl = {<std::allocator<InterrogateType::EnumValue>> = {<__gnu_cxx::new_allocator<InterrogateType::EnumValue>> = {<No data fields>}, <No data fields>}, _M_start = 0x0, _M_finish = 0x0, _M_end_of_storage = 0x0}}, <No data fields>}, _nested_types = {<std::_Vector_base<int, std::allocator<int> >> = {_M_impl = {<std::allocator<int>> = {<__gnu_cxx::new_allocator<int>> = {<No data fields>}, <No data fields>}, _M_start = 0x0, _M_finish = 0x0, _M_end_of_storage = 0x0}}, <No data fields>}, _cpptype = 0x0, _cppscope = 0x0}
inserted = true
__PRETTY_FUNCTION__ = "virtual InterfaceMaker::Object* InterfaceMaker::record_object(TypeIndex)"
num_constructors = 0
num_methods = 0
num_casts = 0
num_elements = 0
idb = 0x201e4c0
function = 0x281d8e0
mi = 0
object = 0x281ea30
num_derivations = 0
num_nested = -141715815
#2 0x0000000000424d66 in InterfaceMaker::generate_wrappers (this=0x25bc880) at dtool/src/interrogate/interfaceMaker.cxx:254
type_index = 1328
idb = 0x201e4c0
num_manifests = 32767
num_elements = 4492235
ti = 113
num_global_elements = 32767
num_functions = 32767
#3 0x0000000000417524 in InterrogateBuilder::write_code (this=0x719020 <builder>, out_code=..., out_include=0x0, def=0x25b5040) at dtool/src/interrogate/interrogateBuilder.cxx:354
makers = {<std::_Vector_base<InterfaceMaker*, std::allocator<InterfaceMaker*> >> = {_M_impl = {<std::allocator<InterfaceMaker*>> = {<__gnu_cxx::new_allocator<InterfaceMaker*>> = {<No data fields>}, <No data fields>}, _M_start = 0x257b1d0, _M_finish = 0x257b1d8, _M_end_of_storage = 0x257b1d8}}, <No data fields>}
remaps = {<std::_Vector_base<FunctionRemap*, std::allocator<FunctionRemap*> >> = {_M_impl = {<std::allocator<FunctionRemap*>> = {<__gnu_cxx::new_allocator<FunctionRemap*>> = {<No data fields>}, <No data fields>}, _M_start = 0x7fffffffd300, _M_finish = 0xb, _M_end_of_storage = 0x99ee0d7d}}, <No data fields>}
__PRETTY_FUNCTION__ = "void InterrogateBuilder::write_code(std::ostream&, std::ostream*, InterrogateModuleDef*)"
mi = {_M_current = 0x257b1d0}
ifi = {_M_node = 0x123f763ce00}
num_wrappers = 291
wrappers_by_index = {_M_t = {_M_impl = {<std::allocator<std::_Rb_tree_node<std::pair<int const, FunctionRemap*> > >> = {<__gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<int const, FunctionRemap*> > >> = {<No data fields>}, <No data fields>}, _M_key_compare = {<std::binary_function<int, int, bool>> = {<No data fields>}, <No data fields>}, _M_header = {_M_color = (std::_S_black | unknown: 60), _M_parent = 0x267b835, _M_left = 0x7ffff7b52720, _M_right = 0x7ffff7b511bc}, _M_node_count = 0}}}
function_bodies = <incomplete type>
declaration_bodies = <incomplete type>
ri = {_M_current = 0x7fffffffdb80}
#4 0x00000000004683ba in main (argc=78, argv=0x7fffffffdc90) at dtool/src/interrogate/interrogate.cxx:599
output_code = {<std::basic_ostream<char, std::char_traits<char> >> = {<No data fields>}, _buf = {<std::basic_streambuf<char, std::char_traits<char> >> = {<No data fields>}, static _newline_mode = PandaFileStreamBuf::NM_native, _filename = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x25b7b88 "/home/colinn/Projects/gopokyo/pander/panda3d-1.8.1/built/tmp/libp3express_igate.cxx"}}, _is_open = true, _open_mode = (std::_S_out | std::_S_trunc), _last_read_nl = 0 '\000', _fd = 5, _buffer = 0x25ba5a8 "", _ppos = {_M_off = 0, _M_state = {__count = 0, __value = {__wch = 0, __wchb = "\000\000\000"}}}, _gpos = {_M_off = 0, _M_state = {__count = 0, __value = {__wch = 0, __wchb = "\000\000\000"}}}}}
flag = -1
def = 0x25b5040
output_include = {<std::basic_ostream<char, std::char_traits<char> >> = {<No data fields>}, _buf = {<std::basic_streambuf<char, std::char_traits<char> >> = {<No data fields>}, static _newline_mode = PandaFileStreamBuf::NM_native, _filename = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x7ffff763d3f8 <std::string::_Rep::_S_empty_rep_storage+24> ""}}, _is_open = false, _open_mode = (unknown: 0), _last_read_nl = 0 '\000', _fd = -1, _buffer = 0x25b8598 "\230\327\021\367\377\177", _ppos = {_M_off = 0, _M_state = {__count = 0, __value = {__wch = 0, __wchb = "\000\000\000"}}}, _gpos = {_M_off = 0, _M_state = {__count = 0, __value = {__wch = 0, __wchb = "\000\000\000"}}}}}
command_line = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x71caf8 "/home/colinn/Projects/gopokyo/pander/panda3d-1.8.1/built/bin/interrogate -srcdir panda/src/express -Ipanda/src/express -Dvolatile -Dmutable -DCPPPARSER -D__STDC__=1 -D__cplusplus -D__inline -D__const=const -D_LP64 -D_DEBUG -oc built/tmp/libp3express_igate.cxx -od built/pandac/input/libp3express.in -fnames -string -refcount -assert -python-native -haxe -Sbuilt/include/parser-inc -Ipanda/src/express -Sbuilt/tmp -Sbuilt/include -S/usr/include/python2.7 -DMAKEPANDA= -DBUILDING_PANDAEXPRESS -module pandaexpress -library libp3express buffer.h checksumHashGenerator.h circBuffer.h compress_string.h config_express.h copy_stream.h datagram.h datagramGenerator.h datagramIterator.h datagramSink.h dcast.h encrypt_string.h error_utils.h export_dtool.h fileReference.h hashGeneratorBase.h hashVal.h indirectLess.h memoryInfo.h memoryUsage.h memoryUsagePointerCounts.h memoryUsagePointers.h multifile.h namable.h nodePointerTo.h nodePointerToBase.h nodeReferenceCount.h openSSLWrapper.h ordered_vector.h p3express_composite1.cxx p3express_composite2.cxx pStatCollectorForwardBase.h password_hash.h patchfile.h pointerTo.h pointerToArray.h pointerToArrayBase.h pointerToBase.h pointerToVoid.h profileTimer.h pta_double.h pta_float.h pta_int.h pta_stdfloat.h pta_uchar.h ramfile.h referenceCount.h subStream.h subStreamBuf.h subfileInfo.h temporaryFile.h threadSafePointerTo.h threadSafePointerToBase.h trueClock.h typedReferenceCount.h typedef.h vector_double.h vector_float.h vector_stdfloat.h vector_uchar.h virtualFile.h virtualFileComposite.h virtualFileList.h virtualFileMount.h virtualFileMountMultifile.h virtualFileMountRamdisk.h virtualFileMountSystem.h virtualFileSimple.h virtualFileSystem.h weakPointerCallback.h weakPointerTo.h weakPointerToBase.h weakPointerToVoid.h weakReferenceList.h windowsRegistry.h zStream.h zStreamBuf.h "}}
i = 78
fn = {_filename = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x71e078 "/usr/include/python2.7"}}, _dirname_end = 12, _basename_start = 13, _basename_end = 20, _extension_start = 21, _hash_start = 18446744073709551615, _hash_end = 18446744073709551615, _flags = 0, static _filesystem_encoding = TextEncoder::E_utf8, static _home_directory = 0x0, static _temp_directory = 0x0, static _user_appdata_directory = 0x0, static _common_appdata_directory = 0x0, static _type_handle = {_index = 1, static _none = {_index = 0, static _none = <same as static member of an already seen type>}}}
file_identifier = 1372452922
the_output_include = 0x0
Command Arguments:
-srcdir panda/src/express -Ipanda/src/express -Dvolatile -Dmutable -DCPPPARSER -D__STDC__=1 -D__cplusplus -D__inline -D__const=const -D_LP64 -D_DEBUG -oc built/tmp/libp3express_igate.cxx -od built/pandac/input/libp3express.in -fnames -string -refcount -assert -python-native -haxe -Sbuilt/include/parser-inc -Ipanda/src/express -Sbuilt/tmp -Sbuilt/include -S/usr/include/python2.7 -DMAKEPANDA= -DBUILDING_PANDAEXPRESS -module pandaexpress -library libp3express buffer.h checksumHashGenerator.h circBuffer.h compress_string.h config_express.h copy_stream.h datagram.h datagramGenerator.h datagramIterator.h datagramSink.h dcast.h encrypt_string.h error_utils.h export_dtool.h fileReference.h hashGeneratorBase.h hashVal.h indirectLess.h memoryInfo.h memoryUsage.h memoryUsagePointerCounts.h memoryUsagePointers.h multifile.h namable.h nodePointerTo.h nodePointerToBase.h nodeReferenceCount.h openSSLWrapper.h ordered_vector.h p3express_composite1.cxx p3express_composite2.cxx pStatCollectorForwardBase.h password_hash.h patchfile.h pointerTo.h pointerToArray.h pointerToArrayBase.h pointerToBase.h pointerToVoid.h profileTimer.h pta_double.h pta_float.h pta_int.h pta_stdfloat.h pta_uchar.h ramfile.h referenceCount.h subStream.h subStreamBuf.h subfileInfo.h temporaryFile.h threadSafePointerTo.h threadSafePointerToBase.h trueClock.h typedReferenceCount.h typedef.h vector_double.h vector_float.h vector_stdfloat.h vector_uchar.h virtualFile.h virtualFileComposite.h virtualFileList.h virtualFileMount.h virtualFileMountMultifile.h virtualFileMountRamdisk.h virtualFileMountSystem.h virtualFileSimple.h virtualFileSystem.h weakPointerCallback.h weakPointerTo.h weakPointerToBase.h weakPointerToVoid.h weakReferenceList.h windowsRegistry.h zStream.h zStreamBuf.h