• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Adoe AIR Issue

New Here ,
Jul 24, 2014 Jul 24, 2014

Copy link to clipboard

Copied

I have an Adobe AIR application with a chart component displaying some online data. The chart component has to display a bunch of parameters about 10 of them. The application has a timer to display current system time.

The chart component is invoked from the timer(using a bindable object) as shown below. A separate bindable object is used to prevent delay in timer.

private function onTimerEvent(event:TimerEvent):void

{
//Update time in screen

oCurrDate = new Date(); 
curTime = oDateformatter.format(oCurrDate).toString(); 
oCurrDate = null;  
//oUpdate- Bindable object to inform chart about update 
//Call chart every 250 ms 
oUpdate.bUpdate = !oUpdate.bUpdate;  

}

Iam using a calllater function in chart's update event as shown below. updateParameter() will update the dataprovider of each of the parameter and draws it.

public function onUpdateEvent(evt:PropertyChangeEvent):void {

//aPlotIndex set to 0 for first parameter  
aPlotIndex.push(0);  
this.callLater(updateParameter, aPlotIndex);  

}

The problem is the timer and chart updation stops after running 20 to 21 days. After 20 or 21 days, the update happens only on mouse move. When I moved mouse the time displayed & data in chart are updated.

I profiled the application and found that there is no memory leakage issues. I am logging all the errors but I didn't get any error in the log also. Everything seems weird.

  1. Is it because of using the calllater function.
  2. Is it that the timer is still running but frame update not happening.

I am using Flex SDK3.3 and Flex AIR version 2.0.4.13090.

Please guide me to resolve this issue.

TOPICS
Performance issues

Views

383

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Aug 05, 2014 Aug 05, 2014

Copy link to clipboard

Copied

Are you using getTimer() or other relative timing functions? I did a quick calculation: The maximum value for an integer in AS3 is 2,147,483,647. getTimer() returns milliseconds passed since program start as an int. For 21 days that would be 1,814,400,000. So if you are just estimating and it were a couple of days more, you have an integer overflow.

In any case I would try to remove references to absolute numbers (if any) and base calculations on relative values only, for example using Event.ENTER_FRAME or TweenMax.delayedCall

Best,

Ruben

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 06, 2014 Aug 06, 2014

Copy link to clipboard

Copied

Hi Ruben,

Thank you for your reply.

We are using timers. I have noticed this reset counter in the AS Timer class.

So what we did was after 36 hours, the timer is stopped, reset and again started.

The system is running for the past 10 days.

Let me check it for few more days and I will send you an update for sure.

Best Regards,
Vidhya

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 12, 2014 Aug 12, 2014

Copy link to clipboard

Copied

LATEST

The system again stopped after 22 days.

In the current implementation after some interval, we stopped the timer, reset it and again started.

But still the same conditions are repeated. The frame update happens only on mouse move.

Is this have anything to do with frame update rate.

Please provide your valuable suggestions.

Thansk & Regards,
Vidhya

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines