Showing posts with label Eclipse. Show all posts
Showing posts with label Eclipse. Show all posts

Monday, June 9, 2008

Flex debugger crashing Eclipse, Safari then syslogd hogging CPU on Mac OS X (10.5.3)

Yesterday I had one of those nightmare days when suddenly your development environment no longer works for no apparent reason.

What was happening is that I was using the Eclipse Flex 3 plugin to develop an application. Nothing out of the ordinary and I've been doing this for sometime with no major issuers - yes occasionally Safari would crash but that is expected when your developing apps. Yesterday I was trying to profile my app and didn't seem to work. I thought OK my app isn't profiling and wasn't too concerned about it so went back to developing. Next thing I knew I could no longer debug.

First sign was Safari was hanging followed by the syslogd process eating up the processor. Then after a while Eclipse would also become unresponsive. My gut feeling was that this process called syslogd was the culprit but I was wrong - it was just a symptom. syslogd is just a daemon for syslog calls and killing the process might free up resources but did not resolved the issue. In my searching I found that syslogd will hog your processor if you have an application causing some sort of error. This was exactly what was occurring for me and my efforts to kill it and then reset it was a waste of time. I noticed my log file for errors was huge ~ 1 G plus and for a new MacBook Pro I knew it was something else but what? Last week I installed the new update for OS X 10.5.3 but that was not the issue either. My logs were filled with the same message over and over again.

!ENTRY com.adobe.flexbuilder.debug 4 2 2008-06-10 08:50:16.797
!MESSAGE Problems occurred when invoking code from plug-in: "com.adobe.flexbuilder.debug".
!STACK 0
java.lang.NullPointerException
at com.adobe.flexbuilder.debug.breakpoints.FlexLineBreakpoint.findSourceFiles(FlexLineBreakpoint.java:388)
at com.adobe.flexbuilder.debug.breakpoints.FlexLineBreakpoint.instantiate(FlexLineBreakpoint.java:442)
at com.adobe.flexbuilder.debug.model.FlexDebugTarget.breakpointAdded(FlexDebugTarget.java:889)
at com.adobe.flexbuilder.debug.model.FlexDebugTarget$FdbThread.installDeferredBreakpoints(FlexDebugTarget.java:539)
at com.adobe.flexbuilder.debug.model.FlexDebugTarget$FdbThread.advanceStateMachine(FlexDebugTarget.java:570)
at com.adobe.flexbuilder.debug.model.FlexDebugTarget$FdbThread.access$6(FlexDebugTarget.java:544)
at com.adobe.flexbuilder.debug.model.FlexDebugTarget$1.run(FlexDebugTarget.java:646)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:843)
at com.adobe.flexbuilder.debug.model.FlexDebugTarget$FdbThread.eventLoop(FlexDebugTarget.java:626)
at com.adobe.flexbuilder.debug.model.FlexDebugTarget$FdbThread.run(FlexDebugTarget.java:687)
at java.lang.Thread.run(Thread.java:613)



I tried reinstalling Flex 3, using Eclipse 3.3 instead of 3.2.2, installing Flex 3 Builder as standalone app, installing the flash debugger again and new versions of it. I was also googling for my life trying to find an issue but with these types of bugs you really need the right keyword to strike gold. Fortunately I did and found a thread on ProfilerAgent.swf preventing debugging which described my situation and had a solution. For whatever reasons the Flex profiler was the reason my debugger would crash and all I had to do was to delete the first line from mm.cfg file. The first line had the following

PreloadSwf=/Users/[username]/Documents/workspace/
.metadata/.plugins/com.adobe.flash.profiler/
ProfilerAgent.swf?host=localhost&port=9999


So each time the debugger would start it would start up the profiler as well. It was creating all the errors which syslogd was trying to handle. Really a question for Flex team on how it got there but for the moment it is gone. I haven't tried profiling again but will do so once I've caught up on the day I lost to this bug. I hope this post is helpful to others effected by this bug.

Sunday, February 10, 2008

New things are happening!

Well after about 6 months or so off the blog I'm back and hopefully will be back for a bit longer! I went about trying to set up my site with my new domain fingersdancing.com but screwed it up... I'll sort it out next week but at the moment I've got fingersdancing.net.

So what is the big thing happening at the mo for me? Well I'm going contracting! So I'm looking forward to do more things which interested me and I hope to blog about it. Hence getting the domain set up ;-)

I'm having a go at creating an Eclipse plug-in but early days at the moment.

Oh you might be asking why I'm going with blogging instead of the huge social network app Facebook. Well for me Facebook = Spam just not of the email kind but spam nonetheless. I'll still be using it to keep in contact with some peeps but not much else.