-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segmentation fault when parse json object #1561
Comments
Any help i am stuck |
Can the unit tests run properly on your platform? |
I having the same issue with the similar traceback. I run the unit test and fail here:
Also this fail before the above error:
|
Hi all.
Full log here |
I am getting segmentation fault error when trying to parse below json object.
{
"gameNo": "18858766608",
"uniqueId": "18858766608Kuchum3u1hfio4kcb",
"handSummary": [
"Main Pot: $7.34 Side Pot 1: $7.72 Side Pot 2: $0.69 Rake: $0.82",
"Board: [ 3c, Js, 6s, 4h, 4s ]",
"Kuchum balance $5, didn't bet (folded)",
"treblof899 balance $15.06, bet $4.64, collected $15.06, net +$10.42[ 9s, 9c ] [ two pairs, nines and fours -- Js,9s,9c,4h,4s ]",
"PiotrusPan24 balance $0.35, bet $5, collected $0.35, lost $4.65[ Ac, Kd ] [ a pair of fours -- Ac,Kd,Js,4h,4s ]",
"mitsos3 balance $0, lost $1.93[ 6c, Ad ] [ two pairs, sixes and fours -- Ad,6c,6s,4h,4s ]",
"mumucat balance $0.49, bet $5.15, collected $0.49, lost $4.66[ Kc, Ah ] [ a pair of fours -- Ah,Kc,Js,4h,4s ]",
"Dumle balance $4.79, didn't bet (folded)",
"** Account Info **",
"Kuchum - pp_Conrad_Brean",
"treblof899 - pp_treblof89",
"PiotrusPan24 - pp_PiotrusPan1997",
"mitsos3 - br_Sierra_296899",
"mumucat - pp_Dimitrios16",
"Dumle - ps_tomato_ketchup"
],
"createdDate": "2019-08-22T10:30:02Z",
"partitionDate": "2019-08-03T00:00:00Z",
"time": "2019-08-03T19:13:00Z",
"gameInfo": {
"game": "0.02/0.05 Texas Holdem Game Table (NL)",
"gameType": "cash",
"gameSubType": "Texas Holdem",
"gameLimit": "NL",
"tournamentId": "",
"table": "",
"money": "Real ",
"blinds": {
"small": "0.02",
"big": "0.05"
},
"RFI_NAI": [],
"RFI_AI": [],
"rfiOpportunity": [],
"ringType": "6-seater"
},
"tableInfo": {
"name": "Table 5892676",
"numPlayers": 6,
"maxPlayers": 6,
"buttonSeat": 1
},
"playerAlias": "Kuchum",
"Players": [
{
"alias": "Kuchum",
"seat": "1",
"startStack": 5,
"rake": 0,
"cards": [
"2c",
"Th"
],
"endStack": 5,
"plyAccountName": "pp_Conrad_Brean"
},
{
"alias": "treblof899",
"seat": "2",
"startStack": 4.64,
"rake": "0.24",
"endStack": 15.06,
"plyAccountName": "pp_treblof89"
},
{
"alias": "PiotrusPan24",
"seat": "3",
"startStack": 5,
"rake": "0.24",
"endStack": 0.35,
"plyAccountName": "pp_PiotrusPan1997"
},
{
"alias": "mitsos3",
"seat": "4",
"startStack": 1.93,
"rake": "0.10",
"endStack": 0,
"plyAccountName": "br_Sierra_296899"
},
{
"alias": "mumucat",
"seat": "5",
"startStack": 5.15,
"rake": "0.24",
"endStack": 0.49,
"plyAccountName": "pp_Dimitrios16"
},
{
"alias": "Dumle",
"seat": "6",
"startStack": 4.79,
"rake": 0,
"endStack": 4.79,
"plyAccountName": "ps_tomato_ketchup"
}
],
"currency": "USD",
"no_Players_in_Hand": {
"preflop": 6,
"flop": 0,
"turn": 0,
"river": 0,
"showdown": 4
},
"Actions": [
{
"sequence": 1,
"street": "preFlop",
"actor": "treblof899",
"amount": 0.02,
"action": "smallBlind"
},
{
"sequence": 2,
"street": "preFlop",
"actor": "PiotrusPan24",
"amount": 0.05,
"action": "bigBlind"
},
{
"sequence": 3,
"street": "preFlop",
"actor": "Kuchum",
"action": "hole cards",
"cards": [
"2c",
"Th"
]
},
{
"sequence": 4,
"street": "preFlop",
"actor": "mitsos3",
"amount": 0.1,
"action": "raise"
},
{
"sequence": 5,
"street": "preFlop",
"actor": "mumucat",
"amount": 0.1,
"action": "call"
},
{
"sequence": 6,
"street": "preFlop",
"actor": "Dumle",
"action": "fold"
},
{
"sequence": 7,
"street": "preFlop",
"actor": "Kuchum",
"action": "fold"
},
{
"sequence": 8,
"street": "preFlop",
"actor": "treblof899",
"amount": 0.08,
"action": "call"
},
{
"sequence": 9,
"street": "preFlop",
"actor": "PiotrusPan24",
"amount": 0.6,
"action": "raise"
},
{
"sequence": 10,
"street": "preFlop",
"actor": "mitsos3",
"amount": 0.55,
"action": "call"
},
{
"sequence": 11,
"street": "preFlop",
"actor": "mumucat",
"amount": 5.05,
"action": "raise"
},
{
"sequence": 12,
"street": "preFlop",
"actor": "mumucat",
"action": "allIn"
},
{
"sequence": 13,
"street": "preFlop",
"actor": "treblof899",
"amount": 4.54,
"action": "call"
},
{
"sequence": 14,
"street": "preFlop",
"actor": "treblof899",
"action": "allIn"
},
{
"sequence": 15,
"street": "preFlop",
"actor": "PiotrusPan24",
"amount": 4.35,
"action": "call"
},
{
"sequence": 16,
"street": "preFlop",
"actor": "PiotrusPan24",
"action": "allIn"
},
{
"sequence": 17,
"street": "preFlop",
"actor": "mitsos3",
"amount": 1.28,
"action": "call"
},
{
"sequence": 18,
"street": "preFlop",
"actor": "mitsos3",
"action": "allIn"
},
{
"sequence": 19,
"street": "flop",
"actor": "dealer",
"action": "flop",
"cards": [
"3c",
" Js",
" 6s"
]
},
{
"sequence": 20,
"street": "turn",
"actor": "dealer",
"action": "turn",
"cards": [
"4h"
]
},
{
"sequence": 21,
"street": "river",
"actor": "dealer",
"action": "river",
"cards": [
"4s"
]
},
{
"sequence": 25,
"street": "showdown",
"actor": "treblof899",
"action": "show",
"pokerRank": 8,
"highCard": 6,
"cards": [
"9s,",
"9c"
]
},
{
"sequence": 27,
"street": "showdown",
"actor": "PiotrusPan24",
"action": "show",
"pokerRank": 10,
"highCard": 13,
"cards": [
"Ac,",
"Kd"
]
},
{
"sequence": 28,
"street": "showdown",
"actor": "mitsos3",
"action": "show",
"pokerRank": 8,
"highCard": 9,
"cards": [
"6c,",
"Ad"
]
},
{
"sequence": 29,
"street": "showdown",
"actor": "mumucat",
"action": "show",
"pokerRank": 10,
"highCard": 13,
"cards": [
"Kc,",
"Ah"
]
}
],
"sidePot": [
"sidePot1_Value1_treblof899_7.72",
"sidePot1_Value1_PiotrusPan24_7.72",
"sidePot1_Value1_mumucat_7.72",
"sidePot2_Value2_PiotrusPan24_0.69",
"sidePot2_Value2_mumucat_0.69"
],
"rawEquity": [
{
"potName": "MainPot",
"pot": 7.34,
"playerName1": "treblof899",
"holeCard1": "9s9c",
"player1WinningAmt": 7.34,
"playerName2": "mitsos3",
"holeCard2": "6cAd",
"player2WinningAmt": 0,
"playerName3": "PiotrusPan24",
"holeCard3": "AcKd",
"player3WinningAmt": 0,
"playerName4": "mumucat",
"holeCard4": "KcAh",
"player4WinningAmt": 0
},
{
"potName": "SidePot1",
"pot": 7.72,
"playerName1": "treblof899",
"holeCard1": "9s9c",
"player1WinningAmt": 7.72,
"playerName2": "PiotrusPan24",
"holeCard2": "AcKd",
"player2WinningAmt": 0,
"playerName3": "mumucat",
"holeCard3": "KcAh",
"player3WinningAmt": 0
},
{
"potName": "SidePot2",
"pot": 0.69,
"playerName1": "PiotrusPan24",
"holeCard1": "AcKd",
"player1WinningAmt": 0.345,
"playerName2": "mumucat",
"holeCard2": "KcAh",
"player2WinningAmt": 0.345
}
],
"mainPot": 7.34,
"rake": 0.82,
"board": "3c Js 6s 4h",
"accountName": "pp_Conrad_Brean",
"playerStats": {
"alias": "Kuchum",
"vpip": 0,
"pfr": 0,
"flopCbetOpportunity": 0,
"flopBetsRaises": 0,
"flopCalls": 0,
"flopCbet": 0,
"flopCbetAmount": 0,
"flopCbetSuccess": 0,
"turnCbetOpportunity": 0,
"turnBetsRaises": 0,
"turnCalls": 0,
"turnCbet": 0,
"riverCbetOpportunity": 0,
"riverBetsRaises": 0,
"riverCalls": 0,
"riverCbet": 0,
"wentToShowdown": 0,
"wonAtShowdown": 0,
"winWhenFlopsaw": 0,
"sawFlop": 0,
"threeBet": 0,
"threeBetOpportunity": 1,
"fourBet": 0,
"fourBetOpportunity": 0,
"called3Bet": 0,
"fold3Bet": 0,
"stealInPosition": 0,
"stealOpportunity": 0,
"bbReraisesSteal": 0,
"sbReraisesSteal": 0,
"bbFacedSteal": 0,
"sbFacedSteal": 0,
"gameCount": 0,
"pfrOpportunity": 0,
"callOrFold3BetOpportunity": 0,
"wonNetAmount": 0,
"lostAmount": 0,
"rfiOpportunity": 0,
"preFlopRaiser": "mitsos3",
"facingRaise": 1,
"relativePosition": 0,
"cbet_Size": "",
"flop_High_Card": "Jack",
"uo_call": 0,
"uo_raise": 0,
"uo_fold": 0,
"unopened_Preflop_Pot": 0,
"result": "",
"bbFoldSteal": 0,
"sbFoldSteal": 0,
"plyAccountName": "pp_Conrad_Brean",
"rfiNonMonsterOpp": 0,
"rfiPokcetPairOpp": 0,
"playingMarginalHandsOpp": 0,
"threeBetOppMonsterHands": 0,
"threeBetOppNonPremiumHands": 0,
"calling3BetOppNonOptimalHands": 0,
"callingOpenShoveOppNonOptimalHandsCO": 0,
"callingOpenShoveOppNonOptimalHandsSB": 0,
"callingOpenShoveOppNonOptimalHandsBB": 0,
"callingOpenShoveOppNonOptimalHandsBtn": null,
"sidePot": [],
"startStack": 5,
"holeCards": "T2o",
"dealtToCards": [
"2c",
"Th"
],
"endStack": 5,
"rake": 0
}
}
Here is the gdb output.
[Current thread is 1 (Thread 0x7ff1d539b500 (LWP 2663))]
(gdb) bt
#0 _int_malloc (av=av@entry=0x7ff1d474fb20 <main_arena>, bytes=bytes@entry=65560) at malloc.c:3802
#1 0x00007ff1d440f184 in __GI___libc_malloc (bytes=65560) at malloc.c:2913
#2 0x000000000040a171 in rapidjson::CrtAllocator::Malloc (this=0x1d7cb10, size=65560)
at /usr/local/include/rapidjson/allocators.h:80
#3 0x000000000040fc80 in rapidjson::MemoryPoolAllocatorrapidjson::CrtAllocator::AddChunk (this=0x1d7cae0, capacity=65536)
at /usr/local/include/rapidjson/allocators.h:253
#4 0x000000000040ee99 in rapidjson::MemoryPoolAllocatorrapidjson::CrtAllocator::Malloc (this=0x1d7cae0, size=32)
at /usr/local/include/rapidjson/allocators.h:195
#5 0x000000000040e272 in rapidjson::GenericValue<rapidjson::UTF8, rapidjson::MemoryPoolAllocatorrapidjson::CrtAllocator >::SetStringRaw (this=0x1d7bc60, s=..., allocator=...) at /usr/local/include/rapidjson/document.h:2076
#6 0x000000000041371c in rapidjson::GenericValue<rapidjson::UTF8, rapidjson::MemoryPoolAllocatorrapidjson::CrtAllocator >::GenericValue (this=0x1d7bc60, s=0x1d7cc00 "18858766608Kuchum3u1hfio4kcb", length=28, allocator=...)
at /usr/local/include/rapidjson/document.h:763
#7 0x00000000004129e4 in rapidjson::GenericDocument<rapidjson::UTF8, rapidjson::MemoryPoolAllocatorrapidjson::CrtAllocator, rapidjson::CrtAllocator>::String (this=0x7fff134e7ad0, str=0x1d7cc00 "18858766608Kuchum3u1hfio4kcb", length=28, copy=true)
at /usr/local/include/rapidjson/document.h:2455
#8 0x0000000000410d62 in rapidjson::GenericReader<rapidjson::UTF8, rapidjson::UTF8, rapidjson::CrtAllocator>::ParseString<0u, rapidjson::GenericStringStream<rapidjson::UTF8 >, rapidjson::GenericDocument<rapidjson::UTF8, rapidjson::MemoryPoolAllocatorrapidjson::CrtAllocator, rapidjson::CrtAllocator> > (this=0x7fff134e7810, is=..., handler=..., isKey=false)
at /usr/local/include/rapidjson/reader.h:980
#9 0x000000000041055e in rapidjson::GenericReader<rapidjson::UTF8, rapidjson::UTF8, rapidjson::CrtAllocator>::ParseValue<0u, rapidjson::GenericStringStream<rapidjson::UTF8 >, rapidjson::GenericDocument<rapidjson::UTF8, rapidjson::MemoryPoolAllocatorrapidjson::CrtAllocator, rapidjson::CrtAllocator> > (this=0x7fff134e7810, is=..., handler=...)
at /usr/local/include/rapidjson/reader.h:1741
#10 0x0000000000411187 in rapidjson::GenericReader<rapidjson::UTF8, rapidjson::UTF8, rapidjson::CrtAllocator>::ParseObject<0u, rapidjson::GenericStringStream<rapidjson::UTF8 >, rapidjson::GenericDocument<rapidjson::UTF8, rapidjson::MemoryPoolAllocatorrapidjson::CrtAllocator, rapidjson::CrtAllocator> > (this=0x7fff134e7810, is=..., handler=...)
at /usr/local/include/rapidjson/reader.h:770
#11 0x0000000000410577 in rapidjson::GenericReader<rapidjson::UTF8, rapidjson::UTF8, rapidjson::CrtAllocator>::ParseValue<0u, rapidjson::GenericStringStream<rapidjson::UTF8 >, rapidjson::GenericDocument<rapidjson::UTF8, rapidjson::MemoryPoolAllocatorrapidjson::CrtAllocator, rapidjson::CrtAllocator> > (this=0x7fff134e7810, is=..., handler=...)
at /usr/local/include/rapidjson/reader.h:1742
#12 0x00000000004100d6 in rapidjson::GenericReader<rapidjson::UTF8, rapidjson::UTF8, rapidjson::CrtAllocator>::Parse<0u, rapidjson::GenericStringStream<rapidjson::UTF8 >, rapidjson::GenericDocument<rapidjson::UTF8, rapidjson::MemoryPoolAllocatorrapidjson::CrtAllocator, rapidjson::CrtAllocator> > (this=0x7fff134e7810, is=..., handler=...)
at /usr/local/include/rapidjson/reader.h:573
#13 0x000000000040fa1e in rapidjson::GenericDocument<rapidjson::UTF8, rapidjson::MemoryPoolAllocatorrapidjson::CrtAllocator, rapidjson::CrtAllocator>::ParseStream<0u, rapidjson::UTF8, rapidjson::GenericStringStream<rapidjson::UTF8 > > (
---Type to continue, or q to quit---
this=0x7fff134e7ad0, is=...) at /usr/local/include/rapidjson/document.h:2263
#14 0x000000000040ec31 in rapidjson::GenericDocument<rapidjson::UTF8, rapidjson::MemoryPoolAllocatorrapidjson::CrtAllocator, rapidjson::CrtAllocator>::Parse<0u, rapidjson::UTF8 > (this=0x7fff134e7ad0,
str=0x1db8db0 "{\n "gameNo": "18858766608",\n "uniqueId": "18858766608Kuchum3u1hfio4kcb",\n "handSummary": [\n "Main Pot: $7.34 Side Pot 1: $7.72 Side Pot 2: $0.69 Rake: $0.82",\n "Board: [ 3c, Js, 6s, 4h, 4s ]""...)
at /usr/local/include/rapidjson/document.h:2328
#15 0x000000000040df2b in rapidjson::GenericDocument<rapidjson::UTF8, rapidjson::MemoryPoolAllocatorrapidjson::CrtAllocator, rapidjson::CrtAllocator>::Parse<0u> (this=0x7fff134e7ad0,
str=0x1db8db0 "{\n "gameNo": "18858766608",\n "uniqueId": "18858766608Kuchum3u1hfio4kcb",\n "handSummary": [\n "Main Pot: $7.34 Side Pot 1: $7.72 Side Pot 2: $0.69 Rake: $0.82",\n "Board: [ 3c, Js, 6s, 4h, 4s ]""...)
at /usr/local/include/rapidjson/document.h:2337
#16 0x000000000040d073 in rapidjson::GenericDocument<rapidjson::UTF8, rapidjson::MemoryPoolAllocatorrapidjson::CrtAllocator, rapidjson::CrtAllocator>::Parse (this=0x7fff134e7ad0,
str=0x1db8db0 "{\n "gameNo": "18858766608",\n "uniqueId": "18858766608Kuchum3u1hfio4kcb",\n "handSummary": [\n "Main Pot: $7.34 Side Pot 1: $7.72 Side Pot 2: $0.69 Rake: $0.82",\n "Board: [ 3c, Js, 6s, 4h, 4s ]""...)
at /usr/local/include/rapidjson/document.h:2344
#17 0x00000000004092db in jsonParser::parseJsonPayload (this=0x7fff134e7d1e,
payloadOutput=0x1db8db0 "{\n "gameNo": "18858766608",\n "uniqueId": "18858766608Kuchum3u1hfio4kcb",\n "handSummary": [\n "Main Pot: $7.34 Side Pot 1: $7.72 Side Pot 2: $0.69 Rake: $0.82",\n "Board: [ 3c, Js, 6s, 4h, 4s ]""...,
jsonbuffer="") at source/jsonParser.cpp:125
#18 0x000000000040a052 in jsonParser::parsePayload (this=0x7fff134e7d1e,
payload="{"schema":{"type":"bytes","optional":false},"payload":"ewogICJnYW1lTm8iOiAiMTg4NTg3NjY2MDgiLAogICJ1bmlxdWVJZCI6ICIxODg1ODc2NjYwOEt1Y2h1bTN1MWhmaW80a2NiIiwKICAiaGFuZFN1bW1hcnkiOiBbCiAgICAiTWFpbiBQb3Q6I"..., jsonbuffer="")
at source/jsonParser.cpp:319
#19 0x0000000000406458 in msg_consume (message=0x1d7cb30, opaque=0x0) at source/consumer.cpp:211
#20 0x0000000000407877 in main (argc=6, argv=0x7fff134e8358) at source/consumer.cpp:487
(gdb)
Can any one look at it and let me know what is wrong here.
The text was updated successfully, but these errors were encountered: