ajh1138

Posts Tagged ‘Bugs’

May you be blessed by the deity of your choosing, Mr. Dah.

In Uncategorized on August 15, 2009 at 7:11 am

Tonight was going to be the big night for Hauler. I got a lot of visual content built and photographed in Second Life, and opened up Flex builder to finish up the game. Unfortunately, I ended up spending more than two and a half hours trying to overcome this error dialog:

“Flex Builder cannot locate the required version of Flash Player. You might need to install Flash Player 9 or reinstall Flex Builder.”

I noticed that this happened after I installed IE 8 (I still had IE 6 since I never use IE at home). So I guess Flex Builder lost the path to my debug version plugin when the old version of IE went away.

I tried uninstalling/reinstalling Flash a few times, and fiddled with the paths in Window–>Preferences–>Flex–>Profiler–>Player/Browser but this is NOT the place to do that!!! The correct place to fix this problem was in Window–>Preferences–>Web Browser. I found this tip in the Flex JIRA bug tracker posted by “bahiminin dah” about a year ago. Ya sure got me out of a hole, Mr. Dah. I just checked off Internet Explorer as the browser to open, and the problem went away. (I usually leave Firefox for browsing and IE solely for debugging my Flex junk.)

Here’s a little preview of the new content I’ll be tossing into Hauler this weekend:

FauxTrek_Attacking_128FauxFalcon_Attacking_128

Flex 3 – Errors in the Problem Pane May Not Actually Be Where They Appear To Be

In Uncategorized on June 13, 2009 at 5:05 am

I just ran into a pretty weird problem during some Flex development that had me cursing and throwing things around the office…ok, not really, but it was still frustrating.

After getting the latest code from our source repository, I kept getting compile errors in Flex Builder but the line that had the error *didn’t even exist* in the file that was causing it to break.

Long story short: our designer had built various doodads in Flash to use as style components, then referred to those doodads in a stylesheet.  Any item in my Flex code that used those styles was breaking because Flex couldn’t find the object that the style was referring to.  But it gets even more interesting!

As you may be aware, when Flex Builder does a compile, it turns your nice, pretty declarative MXML tags into plain ‘ol nasty ActionScript before it does the actual compilation.  The *true* place in the code that was killing the compile was in fact in the generated ActionScript files.  And every place in those generated files where the Flash components were referenced was causing an error.

During the course of figuring this out, I checked the “save generated code” checkbox (it’s in the Project properties) which gave me a nice folder full of ActionScript files (generatedCode, i think it was called).  Guess what was in there?  The lines with errors.  Through those files I was able to figure out that the style stuff was causing the problem.

But if I got latest code, why wasn’t the CSS finding the nifty Flash doodads?  Great question.  It’s because I needed to add the SWF (or SWC, or whatever you use) as a library reference in my project.

Flash Builder Quirk #184912 – The Fake Compile

In Uncategorized on June 13, 2009 at 3:40 am

The other day I had to merge some code (we’re using SVN with Tortoise).  Sometimes that doesn’t work out too well.  This is especially true with Flex code, for some reason.  The merge left a few files conflicted and otherwise wonky, and after untangling that mess Flex Builder still wasn’t compiling the project.

Or should I say, Flex Builder wasn’t compiling it, but it appeared as though it was.  It turns out that there was a huge chunk of “<<<< mine” and “<<<< theirs” code sticking out of one of the files, but FB wasn’t reporting any compile errors.

Long story short: any time you suspect that FB isn’t really compiling the latest version of your code, try running the project straight out of the IDE (hit the big green Play button) instead of running it via your web page.  That should knock it in the head and let it show you the compile error.

Silverlight/VS 2008 quirks driving you crazy?

In Uncategorized on May 25, 2008 at 5:58 am

One of the things I’ve noticed about editing XAML files in Visual Studio 2008 is that sometimes you’ll need to close the file you’re working on then re-open it in order to see certain changes take effect, in particular when you change the ImageSource attribute on an element.  That took me a while to figure out.  There are few things more frustrating than stumbling on a bug in the IDE when you’re trying to learn an entirely new way of building apps.

Another interesting thing is that you apparently need to specifically tell elements to be a certain height/width.  For instance, if you have an element inside another rectangle, don’t expect it to inherit the size of its parent…it won’t fill that space unless you tell it to!