VerifyError: Error #1025: An invalid register 3 was accessed

Working with XML in Flex or AIR can sometimes be very painfull if you mess with namespaces.
I just spent few hours figuring how to solve the «VerifyError» puzzle:

VerifyError: Error #1025: An invalid register 1 was accessed.
VerifyError: Error #1025: An invalid register 2 was accessed.
VerifyError: Error #1025: An invalid register 3 was accessed.
VerifyError: Error #1025: An invalid register 4 was accessed.
VerifyError: Error #1025: An invalid register 5 was accessed.

I was loading some fancy XML spitted by REST backend and had to set the default xml namespace in a function scope in order to access it:

default xml namespace = xml.namespace();

Don’t ask me why, but you have to «reset it» when you finish manipulating the XML otherwise you wont be able to call functions in the same scope:

default xml namespace = new Namespace( "" );
Zoidberg: Why? Why? Why?

Zoidberg: Why? Why? Why?

I hope that helps 8-)

Share this article:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Technorati
  • Blogosphere News
  • co.mments
  • Reddit
  • Slashdot
  • StumbleUpon
  • blogmarks
  • Fleck
  • LinkaGoGo
  • Live
  • MyShare
  • SphereIt
  • Tumblr
  • Yahoo! Buzz

10 Comments

  1. Thanks dude, your posting just saved me.

  2. Thanks for posting this, Adnan! I *never* would have guessed that I had to “reset” the default namespace before making a call to a static function.

    Much appreciated!

  3. THANK YOU!!! Like Taylor, I NEVER would have figured that out. Keep your reports coming.

  4. Thanks! Saved my day :)

  5. sjunnesson

    thx a lot you saved me big time!

  6. Ran in the same issue today while manipulating an update.xml for an AIR application. Thanks for posting it!

    -Jens

  7. avanlooveren

    Wow, I am still quite confused with XML namespace as it does seem to have side-effects that I can’t get my mind around. I found that the following expressions did NOT work only AFTER a default namespace directive was declared:

    _key.@id >> works
    _key.@["id"] >> does NOT work
    _key["@id"] >> works
    _key.@["id"] >> does NOT work
    _key.attribute(“id”) >> does NOT work

    Anyone got a good reference to what’s really happening when you use the directive?

  8. Thanks a gazillion! What little hair I have left is now safe.

  9. Thank you!

Trackbacks/Pingbacks

  1. Verify Error An Invalid Register Was Accessed | Internet.geek.nz - [...] Here are the other blog posts: http://warappa.wordpress.com/2008/12/19/runtime-error-1025-an-invalid-register-was-accessed/ http://www.adnandoric.com/2009/03/verifyerror-error-1025-an-invalid-register-3-was-accessed/ [...]

Leave a Reply