Colin Harrington

Archive for August, 2008

MacOSX :: FlexBuilder + symbolic links = badness

by Colin on Aug.30, 2008, under Flex, RIA

FlexAt work I use the FlexBuilder as an eclipse plugin.  I’m a fan of eclipse so far, it has served me well in the past for Java development.

I tried using symbolic links (ln –s, also called symlinks or soft-links) to manage switching between branches, etc.  Flex Builder didn’t like that. 
I didn’t have any source attachment, I had to do a clean to actually rebuild the application, and other badness (Eclipse resource exceptions).

for example:
machine-name% ln -s project-trunk project
machine-name% ls -lha
...
lrwxr-xr-x   1 username  DOMAIN\users    12B Jul 15 15:35 project -> project-trunk
drwxr-xr-x   2 username  DOMAIN\users    68B Jul 15 15:35 project-1.2.3
drwxr-xr-x   2 username  DOMAIN\users    68B Jul 15 15:35 project-trunk

What did I learn?  Don’t use symbolic links with Flex Builder 3.0.

Hope It saves someone some pain.  I’d guess something in the middle(OS Layer? Eclipse?) is actually walking the symlink inconsistently.  No resolution to this issue yet.  Is this the responsibility of the OS? Eclipse, Multi-platform code?  Let me know if you see a fix for this.

While I’m at it — I also ran into this one http://bugs.adobe.com/jira/browse/FBE-186

2 Comments :, more...

F3 = Fat FireFox

by Colin on Aug.28, 2008, under General

FireFox LogoWhy is everything so slow?  Why does it take forever for the laptop to go to sleep? 

Holy thrashing platters Batman — Firefox is taking up 1.25GB of Memory.  I guess it is partially my fault.  Having 126 Tabs open isn’t the nicest thing that you can do, but thats what I did during some intense research.  After I brought it down to about 30 tabs, it still held 1GB.  That is a little too much if you ask me. 

I’ve been a fan of Firefox for a while.  Its attractive because of its extensibility, flexibility, W3C dom, and rendering standards.  I’ve been a fan of good add ons like greasemonkey, Firebug, Better Gmail, View Source Chart, Fullerscreen.  I enjoy using these tools regularly.

I use IE7, and Safari 3, and rarely opera.  Usually its just to make sure my css and javascript are cross-browser compatible.  Each one has it’s strength’s and weaknesses.  Obviously with Firefox, Memory usage is not its strength :-)  

http://dotnetperls.com/Content/Browser-Memory.aspx

I’m hoping that Firefox 3 will help with the Memory usage.  I hope they can adhere to a different model; Weak references please?

I’m also excited to see what the IE8 team is cooking up.

Update:  I’m not so excited to see what IE8 is cooking up for Microsoft’s business plan.  Firefox 3 is Doing great on Mac, Windows and Linux for me.  Yea I wrote this a while ago, but thought it was still worth putting out there.  I don’t use Opera or IE7 much anymore now that I am primarily on Linux (home) & OSX (work)

Leave a Comment : more...

Restarting MySQL from the Command Line :: Russell to the Rescue

by Colin on Aug.21, 2008, under General

I’m trying to restart MySQL from the command line in Mac OSX.  The GUI tool in the Preference Pane wouldn’t work for me, so its time to go back to the Command Line roots.  I knew that there was a way to restart MySQL from the commandline, but I was looking in all of the wrong places, (no /etc/init.d/ or others).  I fired off a few quick Web Searches with Google and found many hints.

Most of the articles I found online were not very helpful.  They all contained information that didn’t work for me and OSX 10.5.3 with MySQL 5.0.51a MySQL Community Server (GPL). Maybe Mysql changed their installer recently, maybe its a Mac Update thing, but the I ended up finding the solution in a comment of this article.  A comment by someone named Russell proved to be very helpful.

Basically it came down to knowing where to find these commands:

Start – sudo /usr/local/mysql/support-files/mysql.server start
Stop – sudo /usr/local/mysql/support-files/mysql.server stop

Thanks Russell – You rock!!

 

Leave a Comment :, , , , more...

Flex Builder 3.0 Debugging issue – Unable to debug

by Colin on Aug.19, 2008, under Flex, RIA

FlexI recently ran into an issue where Flex Builder 3.0 wouldn’t let me debug and caused my whole System (OSX) to grind to a halt.  It took me a while to get to the bottom of it, but I found the issue and addressed it. 

Basically Eclipse had this error –over and over and over and ove…100+MB worth :-) in the system.log
Aug 17 15:21:31 machine-name [0x0-0xc30c3].org.eclipse.eclipse[8730]: !ENTRY com.adobe.flexbuilder.debug 4 2 2008-08-07 15:21:31.716
Aug 17 15:21:31 machine-name [0x0-0xc30c3].org.eclipse.eclipse[8730]: !MESSAGE Problems occurred when invoking code from plug-in: "com.adobe.flexbuilder.debug".
Aug 17 15:21:31 machine-name [0x0-0xc30c3].org.eclipse.eclipse[8730]: !STACK 0
Aug 17 15:21:31 machine-name [0x0-0xc30c3].org.eclipse.eclipse[8730]: java.lang.NullPointerException
Aug 17 15:21:31 machine-name [0x0-0xc30c3].org.eclipse.eclipse[8730]:     at com.adobe.flexbuilder.debug.breakpoints.FlexLineBreakpoint.findSourceFiles(FlexLineBreakpoint.java:388)
Aug 17 15:21:31 machine-name [0x0-0xc30c3].org.eclipse.eclipse[8730]:     at com.adobe.flexbuilder.debug.breakpoints.FlexLineBreakpoint.instantiate(FlexLineBreakpoint.java:442)
Aug 17 15:21:31 machine-name [0x0-0xc30c3].org.eclipse.eclipse[8730]:     at com.adobe.flexbuilder.debug.model.FlexDebugTarget.breakpointAdded(FlexDebugTarget.java:889)
Aug 17 15:21:31 machine-name [0x0-0xc30c3].org.eclipse.eclipse[8730]:     at com.adobe.flexbuilder.debug.model.FlexDebugTarget$FdbThread.installDeferredBreakpoints(FlexDebugTarget.java:539)
Aug 17 15:21:31 machine-name [0x0-0xc30c3].org.eclipse.eclipse[8730]:     at com.adobe.flexbuilder.debug.model.FlexDebugTarget$FdbThread.advanceStateMachine(FlexDebugTarget.java:570)
Aug 17 15:21:31 machine-name [0x0-0xc30c3].org.eclipse.eclipse[8730]:     at com.adobe.flexbuilder.debug.model.FlexDebugTarget$FdbThread.access$6(FlexDebugTarget.java:544)
Aug 17 15:21:31 machine-name [0x0-0xc30c3].org.eclipse.eclipse[8730]:     at com.adobe.flexbuilder.debug.model.FlexDebugTarget$1.run(FlexDebugTarget.java:646)
Aug 17 15:21:31 machine-name [0x0-0xc30c3].org.eclipse.eclipse[8730]:     at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
Aug 17 15:21:31 machine-name [0x0-0xc30c3].org.eclipse.eclipse[8730]:     at org.eclipse.core.runtime.Platform.run(Platform.java:857)
Aug 17 15:21:31 machine-name [0x0-0xc30c3].org.eclipse.eclipse[8730]:     at com.adobe.flexbuilder.debug.model.FlexDebugTarget$FdbThread.eventLoop(FlexDebugTarget.java:626)
Aug 17 15:21:31 machine-name [0x0-0xc30c3].org.eclipse.eclipse[8730]:     at com.adobe.flexbuilder.debug.model.FlexDebugTarget$FdbThread.run(FlexDebugTarget.java:687)
Aug 17 15:21:31 machine-name [0x0-0xc30c3].org.eclipse.eclipse[8730]:     at java.lang.Thread.run(Thread.java:613)

A little googling turned up this article where the guy points to a setting in the mm.cfg.  Issue resolved?  Not so fast.  My issue had similar symptoms but was not identical.  After some trial and error I figured out that I had been building the SWFs in two different fasions: via ant and with Flex Builder.  So it turns out that Flex Builder was finding the SWFs built by my build files and going into a recurring NPE fit.  Flex Builder basically inundated the system.log to the point of no return.  I could have waited for 2 days, but I chose to manually rotate the log myself (which took some googling to turn up the right solution).

Hopefully Flex Builder 3.0 has fixed this.

Symptoms:
Flex Builder hangs when setting a breakpoint (can’t debug – Eclipse and the system goes ‘out-to-lunch’)

Solution:

  • Remove the duplicate swf’s or profiling versions
  • Your machine still out to lunch? (syslogd)   Then you will have to manually rotate your system log, since its too much for syslogd to handle.

sudo launchctl stop com.apple.syslogd && sudo mv /private/var/log/system.log ~/system.log.NPEFilled && sudo launchctl start com.apple.syslogd
(Stop syslogd, move the system.log file, start syslogd)

  • Happy Debugging!


Reasoning:
Flex Builder goes into a flurry of recurring java.lang.NullPointerExceptions when trying to resolve the source attachment when there are multiple versions of the same swf.  You won’t be able to debug or set a breakpoint.  If you do, Your system log will be overloaded because of the massive onslaught of NPEs reported by Eclipse/Flex Builder.  Syslogd tried to rotate the system log but it is just too large for it to handle after you’d let the recurring NPEs go on for a minute, so manually rotating the log seems like a good solution (got a better one?)

2 Comments :, , , more...

Amazon EC2 High-CPU instances

by Colin on Aug.16, 2008, under Amazon Web Services, Distributed Computing, EC2

At the end of May (May 29th 2008), Amazon announced that Amazon Web Services Customers can now utilize "High-CPU Instances" on EC2.  According to their specs, there are currently 2 versions of their "High-CPU Instances" as described below:

High-CPU Instances

    Instances of this family have proportionally more CPU resources than memory (RAM) and are well suited for compute-intensive applications.

    High-CPU Medium Instance

      1.7 GB of memory
      5 EC2 Compute Units (2 virtual cores with 2.5 EC2 Compute Units each)
      350 GB of instance storage
      32-bit platform
      I/O Performance: Moderate
      Price: $0.20 per instance hour
    High-CPU Extra Large Instance

      7 GB of memory
      20 EC2 Compute Units (8 virtual cores with 2.5 EC2 Compute Units each)
      1690 GB of instance storage
      64-bit platform
      I/O Performance: High
      Price: $0.80 per instance hour

So the Extra-Large Instance has the computing Power equivalent to 20 EC2 compute units.  This means that CPU bound problems get 2.5 times the performance for the same amount of money.  In a post from earlier this year, I estimated that it would take 3,100,000 CPU hours to crack a 16384 bit RSA key pair based on stats I had found elsewhere.  This came out to be about 38.75 hours (less than a couple days!!) with 10,000 instances and would cost a maximum of $310k (for an insanely large RSA key pair)ie an average of $160k to locate a specific pair.  With the High-CPU instances, it would take approximately 15.5 hours to do the whole computing task from top to bottom.  At 15.5 hours, it would cost $124k or an average of $62k.  This definitely puts some CPU Bound computing jobs in closer reach of those who need it. 

I could only imagine what this would do for CPU bound utilities like Video encoding/transcoding, weather pattern simulators, or large Rendering farms (among many other applications).  I’d love the chance to work with a farm of machines again – Its like having a fleet of robots doing the work in a portion of the time that a traditional desktop could offer.  Photogrammetry, hmmm… Videogrammetry…

Does anyone know of some good Linux based/open Photogrammetry software?

1 Comment :, , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!