Jump to content
Search Community

XMLLoader Issue

MrHalodri test
Moderator Tag

Recommended Posts

Hey Jack!

 

Fantastic Loader! Loving it… I just ran into an issue. I had an empty data.xml (created from an ant task) that I wanted to load using the XMLLoader class. Obviously the xml file was loaded, since there was no error thrown… but the LoaderEvent was never dispatched an event to my onComplete listener. I think this should somehow invoke either an onComplete-event or onError-event don't you agree? I know this case is rather unusual… but anyhow ;-)

Link to comment
Share on other sites

Hi Jack, i´m having a similar issue. I load a dynamic XML, and when there is no content, the xml would be like this:

<?xml version="1.0" encoding="UTF-8"?>

 

In this particular case, the loader never completes. When i saw this post, i updated to the latest version: 1.191. Now, if i test directly from the flash ide it loads OK (before it also failed) but when i test it online, it never completes loading.

 

One curious thing is that it only fails in Firefox (latest version), in Chrome loads OK. i´ve tested this 2 browsers in my pc (Windows 7 64 bit), and my mac (snow leopard) qith the same results, so i think it´s a firefox related issue.

Link to comment
Share on other sites

Have you tested to see if a regular URLLoader completes appropriately? (remove LoaderMax/XMLLoader from the mix)

 

Also, please check the bytesLoaded and bytesTotal that the URLLoader reports upon completion. I've noticed a bug in Chrome where it reports very large XML files as always having bytesTotal of 0 (which I worked around in the latest version of XMLLoader) but maybe there's another bug in the FireFox flavor of the Flash Player that needs working around (so much fun patching Adobe's [alleged] bugs) :) Any info you can feed me would be great. I'm heading out right now, but I'll check into this further later.

Link to comment
Share on other sites

I´m leaving work now, so i´m checking it tomorrow. Meanwhile, i´ll prevented the bug by adding some stuff when there are no records to bring in the xml, like this:

<?xml version="1.0" encoding="UTF-8"?>

 

I think it´s something related to the xml size, cause i needed 3 blocks to make it load.

 

Also, by your response i think that maybe you read it wrong, in CHROME works OK, Firefox is the problem.

 

When i have more info to help you i´ll post it here.

 

Thanks!

Link to comment
Share on other sites

Also, by your response i think that maybe you read it wrong, in CHROME works OK, Firefox is the problem.

No no - I understood that Firefox was the problem. I was just saying that Chrome definitely had a problem with large XML files (which is worked around in the latest version of XMLLoader).

 

I just tried loading a completely blank XML file in Firefox and it worked fine for me. Could you send me an FLA that demonstrates the problem? Just something SUPER simple is great. No need to send your production files.

Link to comment
Share on other sites

Steven, i´ve made a sample test for you. You should test it in a remote server with PHP.

Upload the contents of the deploy folder and try index.php with these 4 different parameters:

 

1) index.php?loadType=php_empty -> DOESN´T COMPLETE

2) index.php?loadType=php_full -> LOADS OK

3) index.php?loadType=xml_empty -> LOADS OK

4) index.php?loadType=xml_full -> LOADS OK

 

The results should be visible in the swf, i´ve put lots of traces for you to check it, it´s pretty intuitive.

 

If you need anything else, ask me.

 

PS: Remember to test it on Firefox 3.6.6

Link to comment
Share on other sites

First of all, thanks for putting together the great test file!

 

I'm a little confused - both php_full and php_empty failed for me due to security sandbox restrictions, meaning you need to have a crossdomain.xml file in place if you want Flash to allow loading across domains. That's a Flash requirement, not LoaderMax. Am I missing something?

Link to comment
Share on other sites

Oh, sorry, i think it was late and i forgot to make the PHP URLs relative:

Line 33

urlToLoad = "php/index.php?action=getWinners&type=full";

Line 37

urlToLoad = "php/index.php?action=getWinners&type=empty";

 

I wanted you to upload all this files to your own remote server and test it there (so if they are all in the same domain you won´t need the crossdomain), that´s why i put the php files and the fla, so you could see exactly ALL i was doing.

 

(don´t test it in a local web server because there it works ok)

 

Edit: i´ve uploaded a crossdomain to my server in case you couldn´t test it with relative URLs.

Link to comment
Share on other sites

Worked great on my server, but it did burp when I tried loading from your server. The difference appears to be that your server has gzip enabled which triggered a bug in Adobe's URLLoader where it doesn't accurately report its bytesLoaded (bytesLoaded is less than bytesTotal even after the URLLoader dispatches its COMPLETE event!). The bug in Adobe's class was causing the trouble in XMLLoader, but I worked around it in the latest version of XMLLoader, just uploaded to http://www.LoaderMax.com. Please get the latest version and I think you'll see it works even when you've got gzip enabled on your server and are loading a very small file.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...