0 Replies Latest reply on Dec 18, 2012 9:09 PM by huangxinghui

    StackOverFlow Error in release mode

    huangxinghui Level 1

      Use Flex SDK3.5

       

      the exmaple code:

      <?xml version="1.0" encoding="utf-8"?>
       <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
          creationComplete="init()">
      
       <mx:Script>
        <![CDATA[
         import mx.collections.ArrayCollection;
         
         private function init():void
         {
          qryAlarmMemoHandler(new ArrayCollection());
         }
         
         private function qryAlarmMemoHandler(result:Object):void
         {
          var scheduleArr:ArrayCollection = new ArrayCollection();
          for (var i:int=0;i<5,i<result.length;i++)
          {
           var item:Object = result[i];
           item.date = item.BEGIN_DATE;
           item.content = item.TITLE;
           scheduleArr.addItem(item);
          }
         }
        ]]>
       </mx:Script>
      
      </mx:Application>
      
      

       

      the problem:

       

      when compile this code in debug mode, it works fine.

       

      but when compile the code in release mode, it works wrong,

       

      the error message:

       

      VerifyError: Error #1023: Stack overflow occurred.
       at StackOverflowExample/init()
       at StackOverflowExample/___StackOverflowExample_Application1_creationComplete()
       at flash.events::EventDispatcher/dispatchEventFunction()
       at flash.events::EventDispatcher/dispatchEvent()
       at mx.core::UIComponent/dispatchEvent()
       at mx.core::UIComponent/set initialized()
       at mx.managers::LayoutManager/doPhasedInstantiation()
       at Function/http://adobe.com/AS3/2006/builtin::apply()
       at mx.core::UIComponent/callLaterDispatcher2()
       at mx.core::UIComponent/callLaterDispatcher()
      
      

       

      when i annotate this code

       

           //item.date = item.BEGIN_DATE;
           //item.content = item.TITLE;
      

       

      it works fine again.

       

      i don't know what cause this problem.

       

      Thanks for any help!

       

      Best Regards!

       

      Huang