2 Replies Latest reply on Jul 29, 2010 12:37 AM by Anirudh Sasikumar

    Weird behavior: Throws an error while debugging/Run mode, but doesn't when project is built

    oskouidev Level 1

      Hi there,


      I am trying to see if I could get some help on a strange situation:


      I am developing a desktop application with few window components (like music window, rss feeds, photos window, etc). I am trying to have a checkbox in the "preferences" component which will disable or enable the appropriate window component.


      When I am trying to test this checkbox in my application (in either debug mode or 'run' mode) an error is being thrown which I am not able to figure out why this error occurs (though I know its complaining about Null object reference). But when I am building the application with "Export Release Build" option and installing the application on my desktop to test the same checkbox - it works!! I am not sure why this is happening. Any help?


      Can you tell me why it's not complaining about Null object when I build the project or how to overcome this problem?


      This is the error:


      TypeError: Error #1009: Cannot access a property or method of a null object reference.
      at Components::ComponentContainer/getComponentData()[/Users/Desktop/projects/DesktopLauncher /src/MyComponents/ComponentContainer.as:48]
      at SetIntervalTimer/onTimer()
      at flash.utils::Timer/_timerDispatch()
      at flash.utils::Timer/tick()
      Thanks in advance.