8000 line 14362: Uncaught TypeError: Cannot read property 'GetState' of null · Issue #1 · sq/SampleFNA · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

line 14362: Uncaught TypeError: Cannot read property 'GetState' of null #1

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

Open
iamthefaker opened this issue Jul 31, 2015 · 3 comments

Comments

@iamthefaker
Copy link

Apologies if this is the wrong place to ask for help.

I have installed the SDKs, built the content, run the .bat files ...

When I load the index page, it gives a bunch of loading messages,
then I get the "Starting" message, and then I get this:

Loading data ... done.
OpenGL Device: WebKit WebGL
OpenGL Driver: WebGL 1.0 (OpenGL ES 2.0 Chromium)
OpenGL Vendor: WebKit
Using EXT_swap_control_tear VSync!
Unhandled exception at http://192.168.1.80:8080/SampleFNA/bin/JSIL/FNA,%20Version=0.0.0.1,%20Culture=neutral,%20PublicKeyToken=null.js line 14362:
Uncaught TypeError: Cannot read property 'GetState' of null

Thanks if you could point me in the right direction. :-)
Andrew

@iamthefaker
Copy link
Author

Further to the above, here is the console output:

Loading '../JSIL/Libraries/Polyfills.js'...
Loading '../JSIL/Libraries/mersenne.js'...
Loading '../JSIL/Libraries/JSIL.Core.js'...
Loading '../JSIL/Libraries/JSIL.Host.js'...
Loading '../JSIL/Libraries/JSIL.Browser.js'...
Loading '../JSIL/Libraries/JSIL.Browser.Audio.js'...
Loading '../JSIL/Libraries/JSIL.Browser.Loaders.js'...
Loading '../JSIL/Libraries/JSIL.Browser.Touch.js'...
Loading '../JSIL/Libraries/JSIL.Core.Types.js'...
Loading '../JSIL/Libraries/JSIL.Core.Reflection.js'...
Loading '../JSIL/Libraries/JSIL.References.js'...
Loading '../JSIL/Libraries/JSIL.Unsafe.js'...
Loading '../JSIL/Libraries/JSIL.PInvoke.js'...
Loading '../JSIL/Libraries/JSIL.Bootstrap.js'...
Loading '../JSIL/Libraries/JSIL.Bootstrap.Int64.js'...
Loading '../JSIL/Libraries/JSIL.Bootstrap.DateTime.js'...
Loading '../JSIL/Libraries/JSIL.Bootstrap.Text.js'...
Loading '../JSIL/Libraries/JSIL.Bootstrap.Resources.js'...
Loading '../JSIL/Libraries/JSIL.Bootstrap.Linq.js'...
Loading '../JSIL/Libraries/JSIL.Bootstrap.Async.js'...
Loading 'bin/JSIL/Platformer2D.exe.manifest.js'...
Loading 'bin/JSIL/../../Platformer2D.mgcb.manifest.js'...
Loading 'bin/JSIL/../../SDL2.dll.manifest.js'...
Loading 'bin/JSIL/../../soft_oal.dll.manifest.js'...
pre-main prep time: 1 ms
pre-main prep time: 1 ms

Warning: JSIL.Browser.js:199
The external method 'void .ctor()' of type 'System.IO.Stream' has not been implemented;
calling inherited method.
at Object.JSIL.Host.warning (http://192.168.1.80:8080/JSIL/Libraries/JSIL.Host.js:152:15)
at Object.JSIL.WarningFormat (http://192.168.1.80:8080/JSIL/Libraries/JSIL.Core.js:10486:13)
at Object.ExternalMemberStub (http://192.168.1.80:8080/JSIL/Libraries/JSIL.Core.js:1291:14)
at ctorBytesImpl (http://192.168.1.80:8080/JSIL/Libraries/JSIL.IO.js:760:38)
at Object._ctor as _ctor$489[637],28=void
at Object.System_IO_MemoryStream__ctor as _ctor
at Object.System_IO_MemoryStream (jsil://closure/System.IO.MemoryStream:23:21)
at Object.GetManifestResourceStream (http://192.168.1.80:8080/JSIL/Libraries/JSIL.Core.Reflection.js:1343:20)
at Function.Effect_LoadEffectResource (http://192.168.1.80:8080/SampleFNA/bin/JSIL/FNA,%20Version=0.0.0.1,%20Culture=neutral,%20PublicKeyToken=null.js:62073:43

Warning: JSIL.Browser.js:199
The external method 'void .ctor()' of type 'System.MarshalByRefObject' has not been implemented;
calling inherited method.
at Object.JSIL.Host.warning (http://192.168.1.80:8080/JSIL/Libraries/JSIL.Host.js:152:15)
at Object.JSIL.WarningFormat (http://192.168.1.80:8080/JSIL/Libraries/JSIL.Core.js:10486:13)
at Object.ExternalMemberStub as _ctor$void=void
at Object.ExternalMemberStub (http://192.168.1.80:8080/JSIL/Libraries/JSIL.Core.js:1298:39)
at ctorBytesImpl (http://192.168.1.80:8080/JSIL/Libraries/JSIL.IO.js:760:38)
at Object._ctor as _ctor$489[637],28=void
at Object.System_IO_MemoryStream__ctor as _ctor
at Object.System_IO_MemoryStream (jsil://closure/System.IO.MemoryStream:23:21)
at Object.GetManifestResourceStream (http://192.168.1.80:8080/JSIL/Libraries/JSIL.Core.Reflection.js:1343:20

Error: 192:168.1.80/:146
Calling stub instead of sigaction()

module.printErr @ 192.168.1.80/:46

Warning
The external method 'System.Int32 GetBytes(System.String, System.Int32, System.Int32, System.Byte[], System.Int32)' of type 'System.Text.ASCIIEncoding' has not been implemented;
calling inherited method.
at Object.JSIL.Host.warning (http://192.168.1.80:8080/JSIL/Libraries/JSIL.Host.js:152:15)
at Object.JSIL.WarningFormat (http://192.168.1.80:8080/JSIL/Libraries/JSIL.Core.js:10486:13)
at Object.ExternalMemberStub as GetBytes$30,29,29,489[637],29=29
at Object.OverloadedMethod_InvokeDynamic (http://192.168.1.80:8080/JSIL/Libraries/JSIL.Core.js:3945:32)
at Object.System_Text_ASCIIEncoding_GetBytes as GetBytes
at StringMarshaller.JSIL.PInvoke.StringMarshaller.ManagedToNative (http://192.168.1.80:8080/JSIL/Libraries/JSIL.PInvoke.js:760:30)
at alcOpenDevice$30$eq629_PInvokeWrapper (jsil://closure/alcOpenDevice$30=629.PInvokeWrapper:6:24)
at Object.JSIL_PInvoke_ErrorHandler$lb1$rb (jsil://closure/JSIL.PInvoke.ErrorHandler[1]:8:10)
at Object.OpenALDevice__ctor (http://192.168.1.80:8080/SampleFNA/bin/JSIL/FNA,%20Version=0.0.0.1,%20Culture=neutral,%20PublicKeyToken=null.js:50009:28

Warning :8080/SampleFNA/soft_oal.js:4
setVelocity() is deprecated and will be removed in M45 when all doppler effects are removed

Error :8080/SampleFNA/bin/JSIL/FNA,%20Version=0.0.0.1,%20Culture=neutral,%20PublicKeyToken=null.js:14360
Uncaught TypeError: Cannot read property 'GetState' of null

@iamthefaker
Copy link
Author

I figured out it is because
virtualGamePad
is null on line 2640 of http://192.168.1.80:8080/SampleFNA/bin/JSIL/Platformer2D,%20Version=1.0.0.0,%20Culture=neutral,%20PublicKeyToken=null.js

... hmmm.

@iamthefaker
Copy link
Author

This in turn seems to be happening because LoadContent is not being called.
And LoadContent is not being called because "flag" is false at line 14258:

var flag = (this._graphicsDeviceService !== null) &&
($IM02().Call(this._graphicsDeviceService, null) > null);
if (flag) {
this.LoadContent();
}

graphicsDeviceService (and GraphicsDevice) are both not null ... so it is this call to $IM02 which is returning false.

$IM02 is calling this:

function InterfaceMethod_CallInterface_I753$get_GraphicsDevice$void$eq619(thisReference, ga) {
if (!thisReference["I753$get_GraphicsDevice$void=619"])
this.$StaticMethodNotFound(thisReference, "I753$get_GraphicsDevice$void=619");
return thisReference"I753$get_GraphicsDevice$void=619";
};
return InterfaceMethod_CallInterface_I753$get_GraphicsDevice$void$eq619;
})

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

1 participant
0