Hello Klaus, hello community!
I was just implementing the new krPano v1.16.2 which should fix the onready/onerror-bugs while embedding the player. As expected my ready-function now gets properly executed. But…
Sadly the only thing I’m now seeing when loading the tour in IE7 or IE8 is a black screen. I have set up the following events to monitor where the loading stops:
onxmlcomplete -> pass
onproeviewcomplete -> pass (although the preview is neither loaded nor displayed)
onloadcomplete -> never called
A little bit strange is, that after clearing the IE browser cache, the panorama will be displayed and all events are properly called. But only on the first load of the tour after clearing the cache. All following reloads will only display a black screen.
So I wanted to make an example based on the download package from krPano v1.16.2 to replicate the described error and everything got even stranger.
First I must say, that I could not duplicate the error, but instead found out, that passing 'null' as value for the initial xml while embedding the player does not work correctly. Here are the examples:
Works – load an xml file called 'cube-multires.xml'
http://goo.gl/1TQAt
Does not work – loads no xml file, instead a string is passed after player has been embedded
http://goo.gl/xRrve
WTF…? –sorry-
The odd part is, that passing 'null' like that, works in my tour without problems. At least I get no error message and the network inspector shows no sign of any xml being loaded at all.
So Klaus, any idea why?
Now let’s move back to my original problem (the one where IE7 and IE8 won’t display anything besides a black screen)
Since replicating is not an option anymore, I tried to narrow the problem down a little more.
First I changed my loading order and called the krPano-loadxml-function immediately after the player is ready (normally afterwards some more loading of necessary files is done).
This got me the following error message (in the krPano error log)
Google Chrome or Firefox:
Internet Explorer:
ERROR: XML parsing failed – TypeError: Error #1009: Der Zugriff auf eine Eigenschaft oder eine Methode eines null-Objektverweises ist nicht möglich.
Again WTF? Again –sorry-
Then I removed node after node from my xml string, to see if the strange behavior has something to do with it.
I removed all hotspots, the view setting, the lensflare but nothing changed until I removed my '<display … />' node. After removing it no browser had any problem with displaying the panorama.
I added the display-node again and started to remove its attributes until it became clear that the 'flash10="on"' leads to this error. Why? I don’t know…
Also strange is, that I am able to leave 'flash10="on"' in the display-node, but then I am not able to call
directly anymore but have to wrap it into a timeout like so:
So why does it work with 'flash10="on"' after I cleared the cache in Internet Explorer? I think the loading of the other necessary files that are normally needed, takes some time because they are no longer cached and this leads to the same behavior like using a timeout.
After this error or the just black screen I can load the same or another pano-file via console commands without problems.
It seems to me, that maybe the krPano is not so ready in its onready-function as one would expect it to be…?