APE-Project / APE_Server

Ajax Push Engine : Lightweight HTTP Streaming server. Fully written in C language, it provides best performances, making it the faster Comet server to date. APE now support server-side javascript modules through spidermonkey

Home Page:www.ape-project.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Segfault in 2 lines of code

verpeteren opened this issue · comments

Ape.addEvent("beforeJoin", function(user, channel) {
    user.quit();
});
Program received signal SIGSEGV, Segmentation fault.
json_set_property_strN (obj=obj@entry=0x8138448, key=key@entry=0x8064070 "pubid", keylen=keylen@entry=5, 
    value=0x59 <Address 0x59 out of bounds>, valuelen=valuelen@entry=32) at src/json.c:638
638     if (*value != '\0') {
(gdb) bt
#0  json_set_property_strN (obj=obj@entry=0x8138448, key=key@entry=0x8064070 "pubid", keylen=keylen@entry=5, 
    value=0x59 <Address 0x59 out of bounds>, valuelen=valuelen@entry=32) at src/json.c:638
#1  0x0805fb42 in get_json_object_user (user=0x81617c0) at src/users.c:690
#2  0x0804f5b2 in join (user=0x81617c0, chan=0x81356d8, g_ape=0x806c6f0) at src/channel.c:180
#3  0xb7b34164 in ape_cb_join (user=0x81617c0, chan=0x81356d8, g_ape=0x806c6f0) at libape-spidermonkey.c:5866
#4  0x0804f4fe in join (user=0x81617c0, chan=0x81356d8, g_ape=0x806c6f0) at src/channel.c:138
#5  0x0804fcc1 in cmd_join (callbacki=0xbffff050) at src/cmd.c:508
#6  0x08050668 in process_cmd (ijson=ijson@entry=0x81606e0, pc=pc@entry=0xbffff0c4, iuser=iuser@entry=0xbffff16c, 
    g_ape=g_ape@entry=0x806c6f0) at src/cmd.c:266
#7  0x08050a45 in checkcmd (cget=cget@entry=0xbffff17c, transport=TRANSPORT_LONGPOLLING, iuser=iuser@entry=0xbffff16c, 
    g_ape=g_ape@entry=0x806c6f0) at src/cmd.c:385
#8  0x08051f51 in checkrecv (co=0x81616d0, g_ape=g_ape@entry=0x806c6f0) at src/handle_http.c:265
#9  0x08059681 in parser_ready_http (http_parser=0x81616ec, g_ape=0x806c6f0) at src/parser.c:43
#10 0x08053b44 in process_http (co=0x81616d0, g_ape=0x806c6f0) at src/http.c:613
#11 0x0805d9d1 in sockroutine (g_ape=g_ape@entry=0x806c6f0) at src/sock.c:488
#12 0x0804d831 in main (argc=1, argv=0xbffff684) at src/entry.c:332
(gdb)