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

endless loop in Json Parse #38

Open
gambol opened this issue May 15, 2018 · 4 comments
Open

endless loop in Json Parse #38

gambol opened this issue May 15, 2018 · 4 comments
Labels

Comments

@gambol
Copy link

gambol commented May 15, 2018

Code would go to an endless loop when get a big string. The stack are listed below

 at wf.bitcoin.krotjson.CrippledJavaScriptParser.parseJSHash(CrippledJavaScriptParser.java:156)
    at wf.bitcoin.krotjson.CrippledJavaScriptParser.parseJSExpr(CrippledJavaScriptParser.java:191)
    at wf.bitcoin.krotjson.CrippledJavaScriptParser.parseJSArray(CrippledJavaScriptParser.java:99)
    at wf.bitcoin.krotjson.CrippledJavaScriptParser.parseJSExpr(CrippledJavaScriptParser.java:189)
    at wf.bitcoin.krotjson.CrippledJavaScriptParser.parseJSHash(CrippledJavaScriptParser.java:146)
    at wf.bitcoin.krotjson.CrippledJavaScriptParser.parseJSExpr(CrippledJavaScriptParser.java:191)
    at wf.bitcoin.krotjson.CrippledJavaScriptParser.parseJSHash(CrippledJavaScriptParser.java:146)
    at wf.bitcoin.krotjson.CrippledJavaScriptParser.parseJSExpr(CrippledJavaScriptParser.java:191)
    at wf.bitcoin.krotjson.CrippledJavaScriptParser.parseJSExpr(CrippledJavaScriptParser.java:256)
    at wf.bitcoin.krotjson.JSON.parse(JSON.java:129)
    at wf.bitcoin.javabitcoindrpcclient.BitcoinJSONRPCClient.loadResponse(BitcoinJSONRPCClient.java:187)
    at wf.bitcoin.javabitcoindrpcclient.BitcoinJSONRPCClient.query(BitcoinJSONRPCClient.java:229)
    at wf.bitcoin.javabitcoindrpcclient.BitcoinJSONRPCClient.getRawTransaction(BitcoinJSONRPCClient.java:1283)

It would occurs every time when getRawTransaction("b6299d23e836d649a5a5012ebfebd2474b4d100d5334d7608d3c6c01b8204b45")

@Polve
Copy link
Owner

Polve commented May 15, 2018

Can you please enable FINE logging to understand what string is being parsed?

@tdiesler tdiesler self-assigned this Jun 28, 2018
@tdiesler tdiesler added the bug label Jun 28, 2018
@tdiesler tdiesler added this to the 0.16.1 milestone Jun 28, 2018
@tdiesler tdiesler modified the milestones: 0.16.1, 0.17.0 Nov 8, 2018
@tdiesler
Copy link
Collaborator

tdiesler commented Nov 8, 2018

That is indeed a large transaction. I wonder how often folks deal with Txs > 750 BTC ;-)

Could anyone pls paste the output from the console here?

@tdiesler tdiesler removed their assignment Nov 8, 2018
@tdiesler tdiesler removed this from the 1.0.0 milestone Nov 8, 2018
@Polve
Copy link
Owner

Polve commented Nov 8, 2018

Not difficult to generate those kind of transactions in testnet or regtest

@Malkhedkar-web

This comment was marked as spam.

@github-staff github-staff deleted a comment from AndreSabbagh Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants
@tdiesler @gambol @Polve @Malkhedkar-web and others