FlashBuilder started going REALLY slow. Also, profiler doesn't work - actionscript-3

I've got a Flash project that was occasionally freezing, then after a few seconds catching back up. I figured it was probably just spending too much time processing unnecessary data, so I wanted to look under the hood and see what was going on.
I popped open my project in Flash Builder, hit "Profile ", then the project launched… and nothing else happened. I stared at it for a while wondering where the profiler was. No dialog opened up with profiler options or anything. After 60 seconds I got an error. I wish I could reproduce this error again now, but it was along the lines of "Unable to connect to the profiler after 60 seconds."
Google'd around and no one could really help. Debugging was already enabled, I'm using the debug flash player, all the project configuration was correct… I tried right-clicking the video while it was playing and clicking "Debugger" to manually connect to the profiler, however when I tried this it just said "A connection to the debugger or profiler could not be established". I tried connecting with the IP and port, as well, but no luck.
So I gave up and decided to just insert several trace() statements to figure out where I was getting lost. After adding a few I hit Run and nothing happened… I waited for a bit then hit Run again. Still nothing. I walked away to get a drink, came back, and my browser was open to a blank page. No project. I tried right-clicking and the right-click menu wouldn't open. I closed the browser, removed all the trace() statements, then before I could click run the right-click menu popped up… It was the Flash Player menu even though the browser was now closed and I was in Flash Builder.
I cleaned the project, tried Run again, it took FIFTEEN MINUTES for my project to display in the browser. (It used to take just seconds)
I tried restarting my computer but that didn't fix it. I tried rolling back to an old git commit in case something changed in the project settings but that didn't fix it.
When I go to other sites Flash loads just fine. When I compile a build release and open this in my browser it loads just fine. But when I try to open the development release it all but crashes my machine.
Any ideas?

After paying to speak with a Flash consultant, I've been informed that Flash just doesn't play nicely with profilers. When I informed him that I tried to plug in a profiler he laughed and said "Crashed, didn't it?"
Although not an ideal response, the only safe way to trace execution in Flash is the old fashioned way - lots of trace() statements and break points.
As for fixing the really slow playback, I resolved it by re-installing Flash Player.

Related

5 seconds delay(pause) from django+apache

I am running a site with django+apache+ssl+mysql+cloudfron+s3.
However, I discovered that the ttfb time increases significantly when the first connection and caching setup time ends at some point.
(response starts after pause for about 5 seconds)
After uninstalling Apache, I tried debugging in debug mode and in Gunicorn.
There were no issues with ttfb in debug mode. However, I found out that I had the same problem when using Gunicorn.
So I looked all over apache, db, ssl, django template rendering, etc.
I don't know what's causing the bottleneck.
Which part should I look at more?
Oh, and I also found that if I send a request twice in a row, I get a response right away without any pause.
Please advise. I think my head is going to break...
edit : I tested it without any cdn or database page, but the result was the same.

UFT Exception while putting breakpoint

I am getting the below exception whenever I am putting a break-point in the script and running it. UFT throws the below exception and asks me to quit or restart the application(UFT). This is specific to a project only and I know this is because of some code changes that I did a day back. Ideally any code change should not impact the functionality of the IDE or the driving application.
We use to get those pretty consistently and it started all of sudden, so we ended up reinstalling UFT.
It was very annoying as we have to stop the development and spend time in breaking the locks in QC and restarting QTP.
So if nothing helps,try doing that.
Check your microsoft script debugger version. Upgrade it and see if the issue goes away
download link here.
https://www.microsoft.com/en-us/download/details.aspx?id=22185
Please accept if this helps.

Windows Phone background task stops prematurely

I'm developing a WP8.1 SL app which uses background tasks (not agents!).
My task is triggered by a TimerTrigger - once every 30 minutes (which I believe is the minimum interval for Windows Phone, right?). It is doing a lot of work, and for some reason, sometimes it gets interrupted - that is, it stops in the middle of it. The way I know it's in the middle of it is because I log what's happening and the task's work is basically the same every time.
I deployed the app to my device yesterday to test a new approach, and everything was working fine - the background task was doing everything every time it was started - worked like a charm. Today my device needed a soft reset, so I did it (nothing was working, it happens from time to time since I updated to WP8.1). Since that moment, the background task gets interrupted every time, right in the middle of it, just as with the previous approach.
Any ideas what can cause this? I'm thinking it may be connected to the soft reset, because - 100% success rate before it, 0% after that.
What I've tried so far:
I'm logging errors, I have a try-catch around everything, I've subscribed to the UnobservedException event and to the task's Canceled event, and I'm logging the suspension count - none of these things help. There seem to be no errors, it's not suspended, and it's not canceled.
I'm logging the current memory usage from time to time, and it's about 16-17MB. On my device, the limit should be 30MB, so I don't think that's a problem.
I'm calling RequestAccessAsync wherever I can. I thought once should be enough, but since that soft-reset issue, i decided to put it in 1-2 other places to check if it's causing the issue. Well, it's not, or at least this didn't fix it.
What I'm not sure about:
I have no idea how to check the CPU time my task has consumed. I can't find a good/reliable way to do so. Also, I can't find any info that would explain why the task would be stopped in the middle sometimes, and other times - it would work fine.
Any ideas why my background task is sometimes stopped at the middle? I'm really having a hard time determining how to fix/improve the app and will it work at all.
Thanks.
So, I think I found what my problem was.
First of all, the background task just needed a lot of CPU time, more than the limit, and that's why it was getting killed in the middle.
The reason why it was working sometimes, was because sometimes the device on which I was testing treated the app as being in debug (or with attached debugger). In this case the restriction on CPU time is removed.
So, even if I uninstall the app and rebuild it in Release and redeploy, and start it without the debugger attached, the device was NOT enforcing the constraints. That only happens, if I have started the app with the debugger at least once (or maybe the first time) after it's deployed. Restarting the device (just power off and then turn on) fixes this.
While I was testing, using the same build of an app, its background task ran for 40 MINUTES on one device, and just 3-4 seconds on another. After I restarted the first device, the background task started behaving normally (running for just a few seconds).
So, if you want to test your background task for the CPU constraint:
You must be testing on a device, not on the Emulator.
Uninstall the app, if it's installed.
Restart the device.
Deploy a Release build of the app.
Run the app, so that it can register the background task, and then close it.
Wait for the background task to be invoked. (You could add a trigger that can be forced, like TimeZoneChanged or UserPresent, so that you could quickly test it.)
P.S. This may not be the perfect answer, but these are my observations, and they helped me solve my problem. This by far is the best method I have found for testing the CPU time, and it's far from perfect. So, if anyone has better ideas, please share them.

Adobe Air app stucks after being in background (or inactive) to much time

We have an air application (native for windows) that after being unused or background for about some hours after you try to use it it got stuck and "not responding" windows message.
No log or error or crash just got stuck.
The best behaviour that we have got is that after some seconds it unstucks but then stucks and unstucks every 30 seconds aprox, so it is anusable.
We have tried some "ugly" tricks like after being out of focus/background for some minutes, goes into front, it goes, but this haven't resolved the above problems.
I understand clearly, that SO (Windows) has removed the cached memory pages associated to this process, however, this is normal for each program, so, it is normal that program (specially visually heavy like ours) come back to use, it takes some seconds to go into memory again.
However after that time of re caching into memory any programs (most) works like a charm.
This is not the case of air app.
is there any trick or recommendation for fixing this?
Maybe we should combine the "to front" trick with some other "dumb processing" to keep the program in memory?
thanks in advance.

Flash CS5 not responding when saving

I have a project that is getting pretty large. Large meaning lots of library assets and a pretty complicated folder structure in the library. The FLA file itself is 3,700kb and exporting a 630kb SWF …not too big. I’ve done much larger.
Starting yesterday when I save the FLA, the saving dialog appears and then I get a not responding on the dialog and I have to ctrl-alt-delete out of the flash. It happened at least 5 times yesterday over the day. It doesn't do it every time, but after I first open it, it gets progressively slower at saving then the not responding occurs.
I googled around and there’s a big thread on the adobe forum about it, but no real solution. People say its fixed in CS5 .5 but that isn’t an option for me. Has anyone experienced this or have a solution?
I've experienced this before and have tracked it down to a corrupt image in my library. First, try a Save & Compact.
If Flash crashes during this process, or if it still doesn't work when you do a regular save, go through your library and click on the images one at a time with the library preview open. One of the items in the library should cause Flash to freeze up, and that is your problem image.
Reopen Flash, hide the preview window of the library, and then delete the offending file. Try a regular save now. If it still crashes repeat the step above with the remaining images to find more corrupt ones. Hopefully this works for you, your milage may vary.