Skip to content

GC endless Loop on Java -> JS -> Java Conversion #320

Closed
@NathanaelA

Description

@NathanaelA

I'm not sure why this is causing issues; but I can duplicate the issue NathanaelA/nativescript-websockets#5 that was reported to me. Basically trying to create a SSL connection in JavaScript goes into a endless GC loop.
The Code:

if (this._url.indexOf("wss:") === 0) {
        var sslContext = javax.net.ssl.SSLContext.getInstance( "TLS" );
        sslContext.init( null, null, null );
        var socketFactory = sslContext.getSocketFactory();
    var CS = socketFactory.createSocket();

        // This line is where it goes into its endless loop.  Outputting the typeof CS = [object Object]
        this._socket.setSocket( CS );
    }

So I assume the issue is when it tries to marshall the CS variable back into Java that it must be having some weird problem to be causing a bazillion GC messages to appear (until you kill the app).

Test Application:
testComm.zip

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions