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

Invalid handle null #43

Closed
amarzavery opened this issue Feb 13, 2018 · 1 comment
Closed

Invalid handle null #43

amarzavery opened this issue Feb 13, 2018 · 1 comment

Comments

@amarzavery
Copy link
Collaborator

stack trace

Exception has occurred: Error
Error: Invalid handle null
    at Session._get_link (d:\sdk\rhea\lib\session.js:641:15)
    at Session.on_flow (d:\sdk\rhea\lib\session.js:626:14)
    at Connection.(anonymous function) [as on_flow] (d:\sdk\rhea\lib\connection.js:646:30)
    at c.dispatch (d:\sdk\rhea\lib\types.js:904:33)
    at Transport.read (d:\sdk\rhea\lib\transport.js:95:36)
    at SaslClient.read (d:\sdk\rhea\lib\sasl.js:252:26)
    at Connection.input (d:\sdk\rhea\lib\connection.js:424:35)
    at emitOne (events.js:116:13)
    at TLSSocket.emit (events.js:211:7)
    at addChunk (_stream_readable.js:263:12)

This condition failure causes the exception.

frame.handle is null and the if condition is checking if(frame.handle != undefined)

Here is how the frame object looks like in the debug window

Object {size: 35, type: 0, channel: 0, performative: c}
VM255:1
channel:0
performative:c {value: Array(11)}
available:null
delivery_count:null
drain:null
echo:true
handle:null
incoming_window:5000
link_credit:null
next_incoming_id:1
next_outgoing_id:1
outgoing_window:2048
properties:null
value:Array(11) [Typed, Typed, Typed, …]
length:11
__proto__:Array(0) [, …]
0:Typed {type: TypeDesc, value: 1}
1:Typed {type: TypeDesc, value: 5000}
2:Typed {type: TypeDesc, value: 1}
3:Typed {type: TypeDesc, value: 2048}
4:Typed {type: TypeDesc, value: null}
5:Typed {type: TypeDesc, value: null}
6:Typed {type: TypeDesc, value: null}
7:Typed {type: TypeDesc, value: null}
8:Typed {type: TypeDesc, value: null}
9:Typed {type: TypeDesc, value: true}
10:Typed {type: TypeDesc, value: null}
__proto__:Object {dispatch: , next_incoming_id: <accessor>, incoming_window: <accessor>, …}
size:35
type:0
__proto__:Object {constructor: , __defineGetter__: , __defineSetter__: , …}

and you can rightly see that handle is null

What could be possibly happening?

@grs grs closed this as completed in 40142ab Feb 13, 2018
@grs
Copy link
Member

grs commented Feb 13, 2018

The check should be also checking for null. If the field is not specified at all (i.e. the performative is a list with largest index lower than the index for this field) it will be undefined, if however it is explicitly null, as it is here, that will fail the check but is essentially the same condition (i.e. flow is not associated with a particular link).

I've put in a more complete check; does that fix it for you?

This issue was closed.
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