Skip to content
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

Coredumps from json parsing on chat branch #179

Open
leto opened this issue May 9, 2020 · 2 comments
Open

Coredumps from json parsing on chat branch #179

leto opened this issue May 9, 2020 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@leto
Copy link
Member

leto commented May 9, 2020

I seem to be getting coredumps very often now on my chat branch. It is not clear what RPC or whatever is causing it:

RPC: "getinfo" "{\"id\":\"42\",\"jsonrpc\":\"1.0\",\"method\":\"getinfo\"}"
Timer timeout!
Sent ping,  23  bytes
RPC: "z_getoperationstatus" "{\"id\":\"42\",\"jsonrpc\":\"1.0\",\"method\":\"z_getoperationstatus\"}"
Websocket received msg:  "{\n    \"ping\": \"ping\"\n}\n"
processMessage message
Timer timeout!
Sent ping,  23  bytes
Websocket received msg:  "{\n    \"ping\": \"ping\"\n}\n"
processMessage message
RPC: "getinfo" "{\"id\":\"42\",\"jsonrpc\":\"1.0\",\"method\":\"getinfo\"}"
RPC: "z_getoperationstatus" "{\"id\":\"42\",\"jsonrpc\":\"1.0\",\"method\":\"z_getoperationstatus\"}"
RPC: "getinfo" "{\"id\":\"42\",\"jsonrpc\":\"1.0\",\"method\":\"getinfo\"}"
RPC: "z_getoperationstatus" "{\"id\":\"42\",\"jsonrpc\":\"1.0\",\"method\":\"z_getoperationstatus\"}"
RPC: "getinfo" "{\"id\":\"42\",\"jsonrpc\":\"1.0\",\"method\":\"getinfo\"}"
RPC: "z_getoperationstatus" "{\"id\":\"42\",\"jsonrpc\":\"1.0\",\"method\":\"z_getoperationstatus\"}"
RPC: "getinfo" "{\"id\":\"42\",\"jsonrpc\":\"1.0\",\"method\":\"getinfo\"}"
RPC: "z_getoperationstatus" "{\"id\":\"42\",\"jsonrpc\":\"1.0\",\"method\":\"z_getoperationstatus\"}"
RPC: "getinfo" "{\"id\":\"42\",\"jsonrpc\":\"1.0\",\"method\":\"getinfo\"}"
RPC: "z_getoperationstatus" "{\"id\":\"42\",\"jsonrpc\":\"1.0\",\"method\":\"z_getoperationstatus\"}"
RPC: "getinfo" "{\"id\":\"42\",\"jsonrpc\":\"1.0\",\"method\":\"getinfo\"}"
"{\"error\":{\"code\":-5,\"message\":\"Invalid or non-wallet transaction id\"},\"id\":\"gettx\",\"result\":null}"
"Error transferring http://127.0.0.1:18031 - server replied: Internal Server Error"
"{\"error\":{\"code\":-5,\"message\":\"Invalid or non-wallet transaction id\"},\"id\":\"gettx\",\"result\":null}"
"Error transferring http://127.0.0.1:18031 - server replied: Internal Server Error"
Timer timeout!
Sent ping,  23  bytes
RPC: "z_getoperationstatus" "{\"id\":\"42\",\"jsonrpc\":\"1.0\",\"method\":\"z_getoperationstatus\"}"
Websocket received msg:  "{\n    \"ping\": \"ping\"\n}\n"
processMessage message
"{\"error\":{\"code\":-5,\"message\":\"Invalid or non-wallet transaction id\"},\"id\":\"gettx\",\"result\":null}"
"Error transferring http://127.0.0.1:18031 - server replied: Internal Server Error"
Timer timeout!
Sent ping,  23  bytes
Websocket received msg:  "{\n    \"ping\": \"ping\"\n}\n"
processMessage message
terminate called after throwing an instance of 'nlohmann::detail::type_error'
  what():  [json.exception.type_error.302] type must be number, but is null
Aborted (core dumped)
@leto
Copy link
Member Author

leto commented May 9, 2020

Full backtrace from the coredump shows the culprit: https://gist.github.com/leto/2891b5384125d783dc6e710199796d39

#11 0x00000000004908d0 in RPC::refreshReceivedZTrans(QList<QString>):......
    at src/rpc.cpp:512

We likely need to catch exceptions from our JSON library but nothing is there to catch it, so an exception from JSON parsing bubbles all the way up to the main call stack.

@leto
Copy link
Member Author

leto commented Jun 19, 2020

We now use QT json lib on master, so we will merge that in and get new bugz soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant