rake Cruise FDB not closing on errors

2 views
Skip to first unread message

limeyd

unread,
Nov 12, 2009, 12:46:15 PM11/12/09
to ProjectSprouts
Hey guy's

obviously my code is broken because of an unhandled IOError but FDB
isn't closing any reason for this?
do I need to create a custom rake:task?

thanks

=== OUTPUT ===

[limeyd@MBPro Coverflow]$ rake cruise
(in /Users/limeyd/Code/as3/Coverflow)
Adobe fdb (Flash Player Debugger) [build 9271]
Copyright (c) 2004-2007 Adobe, Inc. All rights reserved.
(fdb) file bin/FeederXMLRunner.swf
(fdb) run
Attempting to launch and connect to Player using URL
bin/TyntFeederXMLRunner.swf
Player connected; session starting.
Set breakpoints and then type 'continue' to resume the session.
[SWF] Users:limeyd:Code:as3:Coverflow:bin:FeederXMLRunner.swf - 65,746
bytes after decompression
(fdb) continue
>> Entering FDB interactive mode, type 'help' for more info.
(fdb) [trace] Update: someurl
[trace] onHttpStatus: [HTTPStatusEvent type="httpStatus"
bubbles=false cancelable=false eventPhase=2 status=0]
[trace] onIOError: [IOErrorEvent type="ioError" bubbles=false
cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL:
someurl"]
[trace] Error #2044: Unhandled ioError:. text=Error #2032: Stream
Error. URL:someurl

Luke Bayes

unread,
Nov 12, 2009, 1:22:01 PM11/12/09
to project...@googlegroups.com
This is most likely a bug - the cruise task should configure FDB to
close on error.

Here are the docs for the FDB task:

http://projectsprouts.org/rdoc/classes/Sprout/FDBTask.html

You may need to drop the helper task that's in the default project and
build up your own.

---------------------------

Following are some questions to help me narrow my search for the bug:

Are you using the default cruise task that is emitted by the project generators?

Is this an MXML or ActionScript project?

Looks like you're on OS X, is that correct?

Are you using AsUnit, or some other, (clearly inferior) unit test framework? ;-)


Thanks,

Luke

limeyd

unread,
Nov 12, 2009, 2:21:15 PM11/12/09
to ProjectSprouts
Thanks i'll take a look here are your answers

> Are you using the default cruise task that is emitted by the project generators? yes
>
> Is this an MXML or ActionScript project? ActionScript AS3
>
> Looks like you're on OS X, is that correct? OSX damn right
>
> Are you using AsUnit, or some other, (clearly inferior) unit test framework? ;-) AsUnit3 all the way

Luke Bayes

unread,
Nov 12, 2009, 2:27:40 PM11/12/09
to project...@googlegroups.com
Thanks!

I should be able to look into this at some point before Sunday.


Luke

limeyd

unread,
Nov 12, 2009, 4:20:54 PM11/12/09
to ProjectSprouts
How can i build and install this locally? I was going to start hacking
myself?
I forked the repo on github but you don't have a rake install Command?

thanks

Luke Bayes

unread,
Nov 12, 2009, 4:38:29 PM11/12/09
to project...@googlegroups.com
This is a great question!

I've been meaning to make it easier for people to contribute, but you
may run into some snags.

You *should* be able to cd into bundles/as3 and run 'rake test'

You'll be interested in lib/sprout/tasks/fdb_task.rb and test/fdb_test.rb

There's even a commented-out test method that verifies what you're
looking for - it seems it didn't work fast enough to include in the
harness.

The base class for FDBTask is outside of the bundles/as3 folder in
sprout/lib/sprout/tool_task.rb

The tests are brutally slow at the moment as they interact with the
actual compilers, another task on my list is to stub these
interactions with a fake compiler that returns what we expect
immediately. I've been using mocha and considering FactoryGirl for
these interactions.

Please let me know if the test harness doesn't work for you, and I'll
look into that too.


Thanks,

Luke

limeyd

unread,
Nov 12, 2009, 5:45:25 PM11/12/09
to ProjectSprouts
thanks where should I set SPROUT_HOME?
it's nil so breaking the join on line:21 for the rake file

thanks

Luke Bayes

unread,
Nov 12, 2009, 6:09:32 PM11/12/09
to project...@googlegroups.com
Sorry,

This is how I avoid loading source from your gem installations.

You want to set it in your ~/.bash_profile and it should look something like:

export SPROUT_HOME=[path where you git cloned to]

On my system, this is:

export SPROUT_HOME=/Users/lbayes/Projects/Sprouts


Thanks,

Luke

limeyd

unread,
Nov 13, 2009, 11:51:05 AM11/13/09
to ProjectSprouts
Hey Luke,
I took a look but when compiling it breaks on a segmentation error. Is
there any build dependencies?

thanks
Darren

=== ENV ===
OSX: 10.6.2
ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin10.0.0] /usr/local/
bin/ruby
gem 1.3.5 /usr/local/bin/gem


=== output ===
[limeyd@MBPro as3 (master)]$ rake test --trace
(in /Users/limeyd/Code/project-sprouts/bundles/as3)
** Invoke test (first_time)
** Execute test
Loaded suite /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/
rake_test_loader
Started
......................................../Users/limeyd/Code/project-
sprouts/sprout/lib/sprout/tasks/tool_task.rb:322: [BUG] Segmentation
fault
ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin10.0.0]

rake aborted!
Command failed with status (): [/usr/local/bin/ruby -I"lib" "/usr/
local/li...]
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:995:in `sh'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1010:in
`call'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1010:in `sh'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1094:in `sh'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1029:in
`ruby'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1094:in
`ruby'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/testtask.rb:
117:in `define'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1112:in
`verbose'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/testtask.rb:
102:in `define'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in
`execute'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in
`execute'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in
`invoke_with_call_chain'
/usr/local/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in
`invoke_with_call_chain'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in
`invoke'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in
`invoke_task'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in
`top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in
`each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in
`top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
`standard_exception_handling'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in
`top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
`standard_exception_handling'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
/usr/local/bin/rake:19:in `load'
/usr/local/bin/rake:19

Luke Bayes

unread,
Nov 13, 2009, 12:23:45 PM11/13/09
to project...@googlegroups.com
That's great - I'm getting the same behavior!

Who wrote these damn tests anyway?!

Even better, if I add a trace/puts in front of the tool_task line
that's failing.... no segfault, all tests pass. An arbitrarily long or
short sleep() call does not have the same result for some reason.

The dependencies are all external processes - I'm not pulling in C
headers or anything, so I'm surprised to see a segfault in there.

After a quick rollback to a recent commit, and some more testing, it
turns out the problem was in fcsh_socket_test.rb.

Seems there may be a problem with this test and a recent version of the SDK.

I commented out the test (oh noes!) and checked into master, so you
should be able to pull from master and get a passing test harness. At
least you'll be unblocked for the moment.

Thanks!

Luke

Reply all
Reply to author
Forward
0 new messages