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

Memory Overrun on unhandled exception #481

Closed
PutzWorks opened this issue Nov 15, 2022 · 2 comments
Closed

Memory Overrun on unhandled exception #481

PutzWorks opened this issue Nov 15, 2022 · 2 comments
Milestone

Comments

@PutzWorks
Copy link

PutzWorks commented Nov 15, 2022

If the this.onFrame call inside parser.js causes an unhandled exception (due to poor developer code in the subscription function, like mine) this causes the this._initState function to not get called. Then the next message received on the socket thinks that it's still part of the previous message. This continues until the page crashes due to a memory overrun (the Page in Chrome displays "Aw Snap: Breakpoint").

If stomp-handler.js -> serverFrameHandler (or parser.js this.onFrame) was inside a try/catch block that would stop this problem from happening. Since serverFrameHandler ends up being external to the stomp library it's definitely safest to catch any errors created by developers, like me...

Another option is to not allow the _bodyBytesRemaining to be negative.

@kum-deepak kum-deepak added this to the v7 milestone Nov 17, 2022
@kum-deepak
Copy link
Member

Thanks for pointing this out. This will be included in the next release.

@kum-deepak
Copy link
Member

Fixed in the develop branch, to be released as part of v7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants