{"issue":{"state":"open","pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"user":{"avatar_url":"https://secure.gravatar.com/avatar/74321b95e2c8122a7d781f1f1b158b51?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"74321b95e2c8122a7d781f1f1b158b51","url":"https://api.github.com/users/bergie","login":"bergie","id":3346},"milestone":null,"assignee":null,"labels":[],"updated_at":"2011-11-04T16:13:26Z","comments":0,"closed_at":null,"url":"https://api.github.com/repos/midgardproject/midgard-core/issues/126","body":"PHP code to reproduce:\r\n\r\n    <?php\r\n    $filepath = ini_get(\"midgard.configuration_file\");\r\n    $config = new midgard_config();\r\n    $config->read_file_at_path($filepath);\r\n    $mgd = midgard_connection::get_instance();\r\n    $mgd->open_config($config);\r\n    $mgd->set_loglevel('debug');\r\n\r\n    $person = new midgard_person();\r\n    $person->set_guid(\"d1eeb24ae38c11df92307f77dcafaed7aed7\");\r\n    // Crash\r\n    $person->create();\r\n\r\nDebug log:\r\n\r\n    midgard-core (pid:14040):(debug): midgard_person::__construct(...)\r\n    midgard-core (pid:14040):(debug): midgard_person::set_guid(...)\r\n    midgard-core (pid:14040):(debug):QuerySelect: SELECT \r\n\t    t1.guid AS reference, \r\n\t    t1.typename AS type, \r\n\t    t1.object_action AS action, \r\n\t    t1.midgard_ws_id AS workspace, \r\n\t    t1.midgard_ws_oid_id AS workspaceoid\r\n    FROM repligard AS t1\r\n    WHERE (t1.guid = 'd1eeb24ae38c11df92307f77dcafaed7aed7') AND 0<1\r\n    midgard-core (pid:14040):(debug): midgard_person::create(...)\r\n\r\nBacktrace:\r\n\r\n    (gdb) run -c php.ini test.php\r\n    Starting program: /usr/bin/php -c php.ini test.php\r\n    [Thread debugging using libthread_db enabled]\r\n    PHP Warning:  Module 'midgard2' already loaded in Unknown on line 0\r\n\r\n    (process:13974): GLib-GObject-CRITICAL **: g_object_get: assertion `G_IS_OBJECT (object)' failed\r\n\r\n    (process:13974): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed\r\n\r\n    (process:13974): GLib-GObject-WARNING **: invalid cast from `midgard_person' to `(null)'\r\n\r\n    (process:13974): GLib-GObject-WARNING **: /build/buildd/glib2.0-2.28.8/./gobject/gsignal.c:2924: signal id `10' is invalid for instance `0x106b200'\r\n\r\n    (process:13974): GLib-GObject-WARNING **: /build/buildd/glib2.0-2.28.8/./gobject/gsignal.c:2924: signal id `9' is invalid for instance `0x106b200'\r\n\r\n    (process:13974): GLib-GObject-CRITICAL **: g_param_spec_get_redirect_target: assertion `G_IS_PARAM_SPEC (pspec)' failed\r\n\r\n    Program received signal SIGSEGV, Segmentation fault.\r\n    0x00007ffff44b8fb1 in g_type_instance_get_private ()\r\n       from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0\r\n    (gdb) bt full\r\n    #0  0x00007ffff44b8fb1 in g_type_instance_get_private ()\r\n       from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0\r\n    No symbol table info available.\r\n    #1  0x00007ffff46ef2be in ?? () from /usr/lib/libmidgard2.so.2010\r\n    No symbol table info available.\r\n    #2  0x00007ffff4499304 in g_object_get_valist ()\r\n       from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0\r\n    No symbol table info available.\r\n    #3  0x00007ffff4499704 in g_object_get ()\r\n       from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0\r\n    No symbol table info available.\r\n    #4  0x00007ffff4733671 in midgard_core_object_is_valid ()\r\n       from /usr/lib/libmidgard2.so.2010\r\n    No symbol table info available.\r\n    #5  0x00007ffff46f0859 in _midgard_object_create ()\r\n       from /usr/lib/libmidgard2.so.2010\r\n    No symbol table info available.\r\n    #6  0x00007ffff46f11dd in midgard_object_create ()\r\n       from /usr/lib/libmidgard2.so.2010\r\n    No symbol table info available.\r\n    #7  0x00007ffff4982d00 in zif__midgard_php_object_create ()\r\n       from /usr/lib/php5/20090626/midgard2.so\r\n    No symbol table info available.\r\n    #8  0x00007ffff4bbcc5d in xdebug_execute_internal (\r\n        current_execute_data=0x7ffff7eb7068, return_value_used=0)\r\n        at /build/buildd/xdebug-2.1.0/build-php5/xdebug.c:1339\r\n            edata = 0x7ffff7eb7068\r\n            fse = 0x1596a60\r\n            cur_opcode = 0xdd28e0\r\n            do_return = 0\r\n            function_nr = 9\r\n    #9  0x00000000006de2dc in ?? ()\r\n    No symbol table info available.\r\n    #10 0x00000000006b8044 in execute ()\r\n    No symbol table info available.\r\n    #11 0x00007ffff4bbc8b5 in xdebug_execute (op_array=0x11bf210)\r\n    ---Type <return> to continue, or q <return> to quit---\r\n        at /build/buildd/xdebug-2.1.0/build-php5/xdebug.c:1272\r\n            dummy = 0x7fffffffe060\r\n            edata = 0x0\r\n            fse = 0x11e1120\r\n            xfse = 0x687972\r\n            magic_cookie = 0x0\r\n            do_return = 0\r\n            function_nr = 0\r\n            le = 0x0\r\n            eval_id = 0\r\n    #12 0x0000000000692f29 in zend_execute_scripts ()\r\n    No symbol table info available.\r\n    #13 0x000000000063fc83 in php_execute_script ()\r\n    No symbol table info available.\r\n    #14 0x000000000072d644 in ?? ()\r\n    No symbol table info available.\r\n    #15 0x00007ffff55f5eff in __libc_start_main (main=0x72bf70, argc=4, \r\n        ubp_av=0x7fffffffe268, init=<value optimized out>, \r\n        fini=<value optimized out>, rtld_fini=<value optimized out>, \r\n        stack_end=0x7fffffffe258) at libc-start.c:226\r\n            result = <value optimized out>\r\n            unwind_buf = {cancel_jmp_buf = {{jmp_buf = {0, \r\n                    -6393718823463822328, 4360240, 140737488347744, 0, 0, \r\n                    6393718824475417608, 6393730639966886920}, \r\n                  mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, \r\n                  0x7ffff7deaa17, 0x0}, data = {prev = 0x0, cleanup = 0x0, \r\n                  canceltype = -136402409}}}\r\n            not_first_call = <value optimized out>\r\n    #16 0x0000000000428859 in _start ()\r\n    No symbol table info available.\r\n","html_url":"https://github.com/midgardproject/midgard-core/issues/126","title":"`set_guid()` crashes object creation","number":126,"id":2145500,"created_at":"2011-11-04T16:13:26Z"},"action":"opened"}