{"action":"created","issue":{"url":"https://api.github.com/repos/bitsuperlab/cpp-play/issues/162","labels_url":"https://api.github.com/repos/bitsuperlab/cpp-play/issues/162/labels{/name}","comments_url":"https://api.github.com/repos/bitsuperlab/cpp-play/issues/162/comments","events_url":"https://api.github.com/repos/bitsuperlab/cpp-play/issues/162/events","html_url":"https://github.com/bitsuperlab/cpp-play/issues/162","id":110582838,"number":162,"title":"[game] crash when using game_play","user":{"login":"HackFisher","id":1070122,"avatar_url":"https://avatars.githubusercontent.com/u/1070122?v=3","gravatar_id":"","url":"https://api.github.com/users/HackFisher","html_url":"https://github.com/HackFisher","followers_url":"https://api.github.com/users/HackFisher/followers","following_url":"https://api.github.com/users/HackFisher/following{/other_user}","gists_url":"https://api.github.com/users/HackFisher/gists{/gist_id}","starred_url":"https://api.github.com/users/HackFisher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HackFisher/subscriptions","organizations_url":"https://api.github.com/users/HackFisher/orgs","repos_url":"https://api.github.com/users/HackFisher/repos","events_url":"https://api.github.com/users/HackFisher/events{/privacy}","received_events_url":"https://api.github.com/users/HackFisher/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-09T03:43:06Z","updated_at":"2015-10-09T12:45:36Z","closed_at":null,"body":"```\r\nProcess 1070 stopped\r\n* thread #1: tid = 0xf42b, 0x00002684ed019c13, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)\r\n    frame #0: 0x00002684ed019c13\r\n->  0x2684ed019c13: pushq  (%r10)\r\n    0x2684ed019c16: addq   $0x1, %rcx\r\n    0x2684ed019c1a: cmpq   %rax, %rcx\r\n    0x2684ed019c1d: jne    0x2684ed019c0f\r\n(lldb) up\r\nframe #1: 0x00002684ed018a62\r\n    0x2684ed018a62: movabsq $0x10529b2d8, %r10\r\n    0x2684ed018a6c: popq   (%r10)\r\n    0x2684ed018a6f: addq   $0x0, %rsp\r\n    0x2684ed018a73: popq   %rbx\r\n(lldb) up\r\nframe #2: 0x0000000100e89a3e play_testnet_client`v8::internal::Invoke(is_construct=<unavailable>, function=<unavailable>, receiver=<unavailable>, argc=3, args=0x00000001046efe90) + 766 at execution.cc:128\r\n   125 \t    Object*** argv = reinterpret_cast<Object***>(args);\r\n   126 \t    if (FLAG_profile_deserialization) PrintDeserializedCodeInfo(function);\r\n   127 \t    value =\r\n-> 128 \t        CALL_GENERATED_CODE(stub_entry, function_entry, func, recv, argc, argv);\r\n   129 \t  }\r\n   130\r\n   131 \t#ifdef VERIFY_HEAP\r\n(lldb) up\r\nframe #3: 0x0000000100e89573 play_testnet_client`v8::internal::Execution::Call(isolate=<unavailable>, callable=<unavailable>, receiver=<unavailable>, argc=3, argv=0x00000001046efe90, convert_receiver=<unavailable>) + 371 at execution.cc:179\r\n   176 \t    }\r\n   177 \t  }\r\n   178\r\n-> 179 \t  return Invoke(false, func, receiver, argc, argv);\r\n   180 \t}\r\n   181\r\n   182\r\n(lldb) up\r\nframe #4: 0x0000000100cfc411 play_testnet_client`v8::Function::Call(this=0x00000001044cc040, context=<unavailable>, recv=<unavailable>, argc=3, argv=0x00000001046efe90) + 289 at api.cc:4397\r\n   4394\t  Local<Value> result;\r\n   4395\t  has_pending_exception =\r\n   4396\t      !ToLocal<Value>(\r\n-> 4397\t          i::Execution::Call(isolate, self, recv_obj, argc, args, true),\r\n   4398\t          &result);\r\n   4399\t  RETURN_ON_FAILED_EXECUTION(Value);\r\n   4400\t  RETURN_ESCAPED(result);\r\n(lldb) up\r\nframe #5: 0x0000000100a2afbc play_testnet_client`bts::game::v8_game_engine::play(this=<unavailable>, game_id=<unavailable>, blockchain=bts::blockchain::chain_database_ptr at 0x00000001046f00d0, w=bts::wallet::wallet_ptr at 0x00000001046f00c0, var=0x00000001046f0c90, sign=<unavailable>) + 1532 at v8_game.cpp:268\r\n   265 \t           argv[2] = v8_helper::cpp_to_json(isolate, _input);\r\n   266\r\n   267 \t           wlog(\"Start game play script.. with var ${v}\", (\"v\", var));\r\n-> 268 \t           Local<Value> result = play_func->Call(context->Global(), 3, argv);\r\n   269\r\n   270 \t           if ( result.IsEmpty() )\r\n   271 \t           {\r\n(lldb) up\r\nframe #6: 0x000000010015068e play_testnet_client`bts::wallet::wallet::play_game(this=<unavailable>, game_name=<unavailable>, params=<unavailable>, sign=<unavailable>) + 2142 at wallet.cpp:3712\r\n   3709\t           FC_CAPTURE_AND_THROW( unknown_game_id, (game_name) );\r\n   3710\r\n   3711\t       auto engine = my->_game_client->get_v8_engine( game_name );\r\n-> 3712\t       auto record = engine->play(game_rec->id, my->_blockchain, shared_from_this(), params, sign);\r\n   3713\r\n   3714\t       return record;\r\n   3715\r\n(lldb) up\r\nframe #7: 0x000000010081b057 play_testnet_client`bts::client::detail::client_impl::game_play(this=0x0000000104454b00, game_name=<unavailable>, param=<unavailable>) + 39 at game_api.cpp:40\r\n   37\r\n   38  \twallet_transaction_record client_impl::game_play(const std::string& game_name, const fc::variant& param )\r\n   39  \t{\r\n-> 40  \t    auto record = _wallet->play_game(game_name, param, true);\r\n   41  \t    _wallet->cache_transaction(record);\r\n   42  \t    network_broadcast_transaction(record.trx);\r\n   43  \t    return record;\r\n```"},"comment":{"url":"https://api.github.com/repos/bitsuperlab/cpp-play/issues/comments/146858059","html_url":"https://github.com/bitsuperlab/cpp-play/issues/162#issuecomment-146858059","issue_url":"https://api.github.com/repos/bitsuperlab/cpp-play/issues/162","id":146858059,"user":{"login":"HackFisher","id":1070122,"avatar_url":"https://avatars.githubusercontent.com/u/1070122?v=3","gravatar_id":"","url":"https://api.github.com/users/HackFisher","html_url":"https://github.com/HackFisher","followers_url":"https://api.github.com/users/HackFisher/followers","following_url":"https://api.github.com/users/HackFisher/following{/other_user}","gists_url":"https://api.github.com/users/HackFisher/gists{/gist_id}","starred_url":"https://api.github.com/users/HackFisher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HackFisher/subscriptions","organizations_url":"https://api.github.com/users/HackFisher/orgs","repos_url":"https://api.github.com/users/HackFisher/repos","events_url":"https://api.github.com/users/HackFisher/events{/privacy}","received_events_url":"https://api.github.com/users/HackFisher/received_events","type":"User","site_admin":false},"created_at":"2015-10-09T12:45:36Z","updated_at":"2015-10-09T12:45:36Z","body":"Seems have relation to this line:\r\n\r\nJSON:Parser?"}}