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:
  • Twitter
  • del.icio.us
  • Google Bookmarks
  • StumbleUpon
  • Digg
  • Technorati
  • Reddit
  • Live
  • Tumblr
  • Yahoo! Buzz

17 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!

  10. Thank you so much. This has to be the dumbest thing ever. So very thankful, because of this post I only had to spend 15 minutes on the issue. Unreal! THANK YOU!

  11. Thanks a lot. You are a savior. Adobe should pull up its socks for not putting this info in an accessible manner.

    THANK YOU VERY MUCH.

  12. thx for your share.

  13. Saved my bacon, and egg. Nice one!

  14. thx. This helps!

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