0

I'm writing a Windows 8 app using Javascript. I got this problem when testing my app using Windows 8 emulator. This seems a bug of ui.js.

Exception was thrown but not handled in user code at line 22600, column 25 in ms-appx://microsoft.winjs.1.0.rc/js/ui.js

0x800a138f - JavaScript runtime error: Unable to get property 'style' of undefined or null reference

If there is a handler for this exception, the program may be safely cont

It points to this line.

that._viewport.style.opacity = 1.0;

Console log

SCRIPT5007: Exception was thrown but not handled in user code at line 22600, column 25 in ms-appx://microsoft.winjs.1.0.rc/js/ui.js
0x800a138f - JavaScript runtime error: Unable to get property 'style' of undefined or null reference
File: ui.js, line: 22600 column: 25

Update: Today 2012/08/09. When I run my app, it generates one more strange error in jquery.js and ui.js. What's wrong with them???

'WWAHost.exe' (Script): Loaded 'Script Code (MSAppHost/1.0)'. 
Exception was thrown at line 5200, column 4 in ms-appx://7034140f-baab-4c76-b27c-2a4c76641550/js/jquery.js
0x800a139e - JavaScript runtime error: SyntaxError
Exception was thrown at line 28908, column 30 in ms-appx://microsoft.winjs.1.0.rc/js/ui.js
0x80004005 - JavaScript runtime error: Incorrect function.
emeraldhieu
  • 9,380
  • 19
  • 81
  • 139
  • 1
    So the error says that `that._viewport` is undefined. Have you checked what `that._viewport` reference to at this line. Maybe you should shows soem more code. – Andreas Köberle Sep 02 '12 at 11:50
  • That file is from Windows SDK. How could it throws an exception? :-S – emeraldhieu Sep 02 '12 at 16:58
  • do you u have an encapsulated test case you can pop onto dropbox or the like? What's the code you have written that results in the error? – Jim O'Neil Sep 02 '12 at 19:06
  • My app loads content from cloud and even uses JQuery. I think JQuery is the problem. I don't know why sometimes when starting my app, it crashes and throws it. I tried this http://stackoverflow.com/questions/10859523/using-jquery-with-windows-8-metro-javascript-app-causes-security-error but it still generates some strange errors. – emeraldhieu Sep 03 '12 at 03:21

1 Answers1

1

Sadly, this is a known bug in WinJS in the RC build of Windows 8. The good news is that the bug is fixed in the RTM build.

Raymond Chen
  • 44,448
  • 11
  • 96
  • 135