You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by mi...@apache.org on 2015/01/06 16:43:52 UTC

[2/3] git commit: [flex-sdk] [refs/heads/develop] - FLEX-34625 CAUSE: When focusThickness is set to 0, the BitmapData that HighlightBitmapCaptureSkin.updateDisplayList() tries to create is of 0 width and height, which results in a fatal error. SOLUTION:

FLEX-34625
CAUSE: When focusThickness is set to 0, the BitmapData that HighlightBitmapCaptureSkin.updateDisplayList() tries to create is of 0 width and height, which results in a fatal error.
SOLUTION: check whether the width and the height of the BitmapData we want to construct are 0, and, if so, return.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/685aeb3f
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/685aeb3f
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/685aeb3f

Branch: refs/heads/develop
Commit: 685aeb3fc7b5a3e37b7766e7f0ca63af837e8cab
Parents: 6a031b4
Author: Mihai Chira <mi...@apache.org>
Authored: Tue Jan 6 15:40:45 2015 +0000
Committer: Mihai Chira <mi...@apache.org>
Committed: Tue Jan 6 15:40:45 2015 +0000

----------------------------------------------------------------------
 .../mx/logging/targets/LineFormattedTarget.as   |  2 +-
 .../skins/spark/HighlightBitmapCaptureSkin.as   | 20 +++++++++++---------
 2 files changed, 12 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/685aeb3f/frameworks/projects/framework/src/mx/logging/targets/LineFormattedTarget.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/framework/src/mx/logging/targets/LineFormattedTarget.as b/frameworks/projects/framework/src/mx/logging/targets/LineFormattedTarget.as
index 2e1b328..9f9e230 100644
--- a/frameworks/projects/framework/src/mx/logging/targets/LineFormattedTarget.as
+++ b/frameworks/projects/framework/src/mx/logging/targets/LineFormattedTarget.as
@@ -178,7 +178,7 @@ public class LineFormattedTarget extends AbstractTarget
      */
     override public function logEvent(event:LogEvent):void
     {
-        var date:String = ""
+        var date:String = "";
         if (includeDate || includeTime)
         {
             var d:Date = new Date();

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/685aeb3f/frameworks/projects/spark/src/spark/skins/spark/HighlightBitmapCaptureSkin.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/spark/src/spark/skins/spark/HighlightBitmapCaptureSkin.as b/frameworks/projects/spark/src/spark/skins/spark/HighlightBitmapCaptureSkin.as
index 9de2387..077f14a 100644
--- a/frameworks/projects/spark/src/spark/skins/spark/HighlightBitmapCaptureSkin.as
+++ b/frameworks/projects/spark/src/spark/skins/spark/HighlightBitmapCaptureSkin.as
@@ -19,7 +19,7 @@
 
 package spark.skins.spark
 {
-    
+
     import flash.display.Bitmap;
     import flash.display.BitmapData;
     import flash.display.DisplayObject;
@@ -29,15 +29,14 @@ package spark.skins.spark
     import flash.geom.Matrix;
     import flash.geom.Matrix3D;
     import flash.geom.Rectangle;
-    
+
     import mx.core.UIComponent;
     import mx.core.mx_internal;
     import mx.events.FlexEvent;
-    
-    import spark.components.supportClasses.Skin;
+
     import spark.components.supportClasses.SkinnableComponent;
     import spark.skins.IHighlightBitmapCaptureClient;
-    
+
     use namespace mx_internal;
     
     /**
@@ -161,9 +160,12 @@ package spark.skins.spark
             if (!target)
                 return;
             
-            var bitmapData:BitmapData = new BitmapData(
-                target.width + (borderWeight * 2), 
-                target.height + (borderWeight * 2), true, 0);
+            var bdWidth:Number = target.width + borderWeight * 2;
+            var bdHeight:Number = target.height + borderWeight * 2;
+            if(bdWidth < 1 || bdHeight < 1)
+                return;
+
+            var bitmapData:BitmapData = new BitmapData(bdWidth, bdHeight, true, 0);
             var m:Matrix = new Matrix();
             
             capturingBitmap = true;
@@ -199,7 +201,7 @@ package spark.skins.spark
             catch (e:SecurityError)
             {
                 // If capture fails, substitute with a Rect
-                var fillRect:Rectangle
+                var fillRect:Rectangle;
 				var skin:DisplayObject = target.skin;
 				
                 if (skin)


Re: [2/3] git commit: [flex-sdk] [refs/heads/develop] - FLEX-34625 CAUSE: When focusThickness is set to 0, the BitmapData that HighlightBitmapCaptureSkin.updateDisplayList() tries to create is of 0 width and height, which results in a fatal error. SOLUTION:

Posted by Mihai Chira <mi...@gmail.com>.
Hi Piotr,


yes, it seems that our test runner is also getting into a stack
overflow, just like my local one did[1] while simply trying to ignore
all the parameterised permutations of the
'testReproduce_FLEX_34119_Comprehensive' test in
HierarchicalCollectionViewCursor_FLEX_34119_Tests.

I'll move this class out of the tests folder, so it doesn't get
executed in the next commit.

But this seems like a bug in FlexUnit to me. Isn't it?

[1] http://s.apache.org/fR6

On 11 March 2015 at 19:18, piotrz <pi...@gmail.com> wrote:
> Hi Mihai,
>
> Something is wrong with your last commit, because flex_sdk_test get stuck in
> one place.
> This build has been started 23 hours ago:
> http://apacheflexbuild.cloudapp.net:8080/job/flex-sdk_test/190/
>
> Maybe we should stop it ?
>
> Piotr
>
>
>
> -----
> Apache Flex PMC
> piotrzarzycki21@gmail.com
> --
> View this message in context: http://apache-flex-development.2333347.n4.nabble.com/Re-2-3-git-commit-flex-sdk-refs-heads-develop-FLEX-34625-CAUSE-When-focusThickness-is-set-to-0-the-B-tp44185p45496.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: [2/3] git commit: [flex-sdk] [refs/heads/develop] - FLEX-34625 CAUSE: When focusThickness is set to 0, the BitmapData that HighlightBitmapCaptureSkin.updateDisplayList() tries to create is of 0 width and height, which results in a fatal error. SOLUTION:

Posted by piotrz <pi...@gmail.com>.
Hi Mihai,

Something is wrong with your last commit, because flex_sdk_test get stuck in
one place.
This build has been started 23 hours ago: 
http://apacheflexbuild.cloudapp.net:8080/job/flex-sdk_test/190/

Maybe we should stop it ?

Piotr 



-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/Re-2-3-git-commit-flex-sdk-refs-heads-develop-FLEX-34625-CAUSE-When-focusThickness-is-set-to-0-the-B-tp44185p45496.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: [2/3] git commit: [flex-sdk] [refs/heads/develop] - FLEX-34625 CAUSE: When focusThickness is set to 0, the BitmapData that HighlightBitmapCaptureSkin.updateDisplayList() tries to create is of 0 width and height, which results in a fatal error. SOLUTION:

Posted by Mihai Chira <mi...@gmail.com>.
I assume it was because flexunit 4.2 needed a different version of
Flex to compile against. I'll let it pass because Chris is planning to
release FlexUnit 4.3 soon, when we'll be able to also update the test
runner.

On 23 March 2015 at 13:23, Mihai Chira <mi...@gmail.com> wrote:
> Ok, made a bit more progress on this, and figured out that our
> flexunit ant task uses
> flex-flexunit\FlexUnit4AntTasks\test\sandbox\libs\flexunit-core-flex-4.1.0.x-sdky.y.y.y.swc
> as the flexunit library. (If this is wrong, please correct me.)
>
> From what I can tell, this was simply copied manually in 2010[1] from
> a compilation of the FlexUnit4 project. The only conclusion that I can
> draw is that this was compiled with CONFIG::useFlexClasses set to
> false.
>
> My next step was to try to compile the FlexUnit4 project and copy the
> resulting swc into FlexUnit4AntTasks\test\sandbox\libs\.
>
> However, when I do `git checkout apache-flexunit-4.2.0` and then
> `ant`, I get this compilation error:
>
>     [compc] C:\......\flex-flexunit\FlexUnit4AirCIListener\src\org\flexunit\listeners\closer\AirCloser.as(35):
>  col: 4 Error: Access of undefined property NativeApplication.
>     [compc]
>     [compc]                     NativeApplication.nativeApplication.exit();
>     [compc]                     ^
>
> (Note that before doing this I also did (on the sdk project) `git
> checkout apache-flex-sdk-4.14.0` and `ant` and it compiled
> successfully.)
>
> Any ideas why I might be getting the above error?
>
>
> [1] http://s.apache.org/V27
>
> On 10 March 2015 at 17:16, Mihai Chira <mi...@gmail.com> wrote:
>> I had a bit of time today to check this out again. It seems that
>> UIImpersonator.testDisplay is just a Sprite, which means that the test
>> runner is compiled with CONFIG::useFlexClasses set to false (see
>> org/fluint/uiImpersonation/VisualTestEnvironmentBuilder.as).
>>
>> Does someone know how we can recompile the test runner with
>> CONFIG::useFlexClasses set to true?
>>
>> On 22 January 2015 at 11:58, Mihai Chira <mi...@gmail.com> wrote:
>>> Thanks for the ideas.
>>>
>>> verbose was already true.
>>> if I set haltonfailure to true, it won't even produce a report for a
>>> test that throws an error.
>>>
>>> I just realised it: I didn't have flash player debugger for IE (only
>>> for the other browsers), which was the browser it launched the tests
>>> in. Now that I installed it I get the full stack trace, yaay.
>>>
>>> But, to make progress on the actual problem of the unit test, does
>>> anyone know how to show some traces in the reports? I tried this, and
>>> nothing happens:
>>>
>>> var _logger:ILogger = Log.getLogger("FLEX_34625");
>>> Log.addTarget(new TraceTarget());
>>> _logger.error("yoyo");
>>> trace("heya");
>>>
>>> On 21 January 2015 at 21:54, piotrz <pi...@gmail.com> wrote:
>>>> Mihai,
>>>>
>>>> I think you have to set haltonfailure=true or verbose=true in your ant
>>>> flexunit target. The you will get full report.
>>>>
>>>> Piotr
>>>>
>>>>
>>>>
>>>> -----
>>>> Apache Flex PMC
>>>> piotrzarzycki21@gmail.com
>>>> --
>>>> View this message in context: http://apache-flex-development.2333347.n4.nabble.com/Re-2-3-git-commit-flex-sdk-refs-heads-develop-FLEX-34625-CAUSE-When-focusThickness-is-set-to-0-the-B-tp44185p44486.html
>>>> Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: [2/3] git commit: [flex-sdk] [refs/heads/develop] - FLEX-34625 CAUSE: When focusThickness is set to 0, the BitmapData that HighlightBitmapCaptureSkin.updateDisplayList() tries to create is of 0 width and height, which results in a fatal error. SOLUTION:

Posted by Mihai Chira <mi...@gmail.com>.
Ok, made a bit more progress on this, and figured out that our
flexunit ant task uses
flex-flexunit\FlexUnit4AntTasks\test\sandbox\libs\flexunit-core-flex-4.1.0.x-sdky.y.y.y.swc
as the flexunit library. (If this is wrong, please correct me.)

>From what I can tell, this was simply copied manually in 2010[1] from
a compilation of the FlexUnit4 project. The only conclusion that I can
draw is that this was compiled with CONFIG::useFlexClasses set to
false.

My next step was to try to compile the FlexUnit4 project and copy the
resulting swc into FlexUnit4AntTasks\test\sandbox\libs\.

However, when I do `git checkout apache-flexunit-4.2.0` and then
`ant`, I get this compilation error:

    [compc] C:\......\flex-flexunit\FlexUnit4AirCIListener\src\org\flexunit\listeners\closer\AirCloser.as(35):
 col: 4 Error: Access of undefined property NativeApplication.
    [compc]
    [compc]                     NativeApplication.nativeApplication.exit();
    [compc]                     ^

(Note that before doing this I also did (on the sdk project) `git
checkout apache-flex-sdk-4.14.0` and `ant` and it compiled
successfully.)

Any ideas why I might be getting the above error?


[1] http://s.apache.org/V27

On 10 March 2015 at 17:16, Mihai Chira <mi...@gmail.com> wrote:
> I had a bit of time today to check this out again. It seems that
> UIImpersonator.testDisplay is just a Sprite, which means that the test
> runner is compiled with CONFIG::useFlexClasses set to false (see
> org/fluint/uiImpersonation/VisualTestEnvironmentBuilder.as).
>
> Does someone know how we can recompile the test runner with
> CONFIG::useFlexClasses set to true?
>
> On 22 January 2015 at 11:58, Mihai Chira <mi...@gmail.com> wrote:
>> Thanks for the ideas.
>>
>> verbose was already true.
>> if I set haltonfailure to true, it won't even produce a report for a
>> test that throws an error.
>>
>> I just realised it: I didn't have flash player debugger for IE (only
>> for the other browsers), which was the browser it launched the tests
>> in. Now that I installed it I get the full stack trace, yaay.
>>
>> But, to make progress on the actual problem of the unit test, does
>> anyone know how to show some traces in the reports? I tried this, and
>> nothing happens:
>>
>> var _logger:ILogger = Log.getLogger("FLEX_34625");
>> Log.addTarget(new TraceTarget());
>> _logger.error("yoyo");
>> trace("heya");
>>
>> On 21 January 2015 at 21:54, piotrz <pi...@gmail.com> wrote:
>>> Mihai,
>>>
>>> I think you have to set haltonfailure=true or verbose=true in your ant
>>> flexunit target. The you will get full report.
>>>
>>> Piotr
>>>
>>>
>>>
>>> -----
>>> Apache Flex PMC
>>> piotrzarzycki21@gmail.com
>>> --
>>> View this message in context: http://apache-flex-development.2333347.n4.nabble.com/Re-2-3-git-commit-flex-sdk-refs-heads-develop-FLEX-34625-CAUSE-When-focusThickness-is-set-to-0-the-B-tp44185p44486.html
>>> Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: [2/3] git commit: [flex-sdk] [refs/heads/develop] - FLEX-34625 CAUSE: When focusThickness is set to 0, the BitmapData that HighlightBitmapCaptureSkin.updateDisplayList() tries to create is of 0 width and height, which results in a fatal error. SOLUTION:

Posted by Mihai Chira <mi...@gmail.com>.
I had a bit of time today to check this out again. It seems that
UIImpersonator.testDisplay is just a Sprite, which means that the test
runner is compiled with CONFIG::useFlexClasses set to false (see
org/fluint/uiImpersonation/VisualTestEnvironmentBuilder.as).

Does someone know how we can recompile the test runner with
CONFIG::useFlexClasses set to true?

On 22 January 2015 at 11:58, Mihai Chira <mi...@gmail.com> wrote:
> Thanks for the ideas.
>
> verbose was already true.
> if I set haltonfailure to true, it won't even produce a report for a
> test that throws an error.
>
> I just realised it: I didn't have flash player debugger for IE (only
> for the other browsers), which was the browser it launched the tests
> in. Now that I installed it I get the full stack trace, yaay.
>
> But, to make progress on the actual problem of the unit test, does
> anyone know how to show some traces in the reports? I tried this, and
> nothing happens:
>
> var _logger:ILogger = Log.getLogger("FLEX_34625");
> Log.addTarget(new TraceTarget());
> _logger.error("yoyo");
> trace("heya");
>
> On 21 January 2015 at 21:54, piotrz <pi...@gmail.com> wrote:
>> Mihai,
>>
>> I think you have to set haltonfailure=true or verbose=true in your ant
>> flexunit target. The you will get full report.
>>
>> Piotr
>>
>>
>>
>> -----
>> Apache Flex PMC
>> piotrzarzycki21@gmail.com
>> --
>> View this message in context: http://apache-flex-development.2333347.n4.nabble.com/Re-2-3-git-commit-flex-sdk-refs-heads-develop-FLEX-34625-CAUSE-When-focusThickness-is-set-to-0-the-B-tp44185p44486.html
>> Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: [2/3] git commit: [flex-sdk] [refs/heads/develop] - FLEX-34625 CAUSE: When focusThickness is set to 0, the BitmapData that HighlightBitmapCaptureSkin.updateDisplayList() tries to create is of 0 width and height, which results in a fatal error. SOLUTION:

Posted by Mihai Chira <mi...@gmail.com>.
Thanks for the ideas.

verbose was already true.
if I set haltonfailure to true, it won't even produce a report for a
test that throws an error.

I just realised it: I didn't have flash player debugger for IE (only
for the other browsers), which was the browser it launched the tests
in. Now that I installed it I get the full stack trace, yaay.

But, to make progress on the actual problem of the unit test, does
anyone know how to show some traces in the reports? I tried this, and
nothing happens:

var _logger:ILogger = Log.getLogger("FLEX_34625");
Log.addTarget(new TraceTarget());
_logger.error("yoyo");
trace("heya");

On 21 January 2015 at 21:54, piotrz <pi...@gmail.com> wrote:
> Mihai,
>
> I think you have to set haltonfailure=true or verbose=true in your ant
> flexunit target. The you will get full report.
>
> Piotr
>
>
>
> -----
> Apache Flex PMC
> piotrzarzycki21@gmail.com
> --
> View this message in context: http://apache-flex-development.2333347.n4.nabble.com/Re-2-3-git-commit-flex-sdk-refs-heads-develop-FLEX-34625-CAUSE-When-focusThickness-is-set-to-0-the-B-tp44185p44486.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: [2/3] git commit: [flex-sdk] [refs/heads/develop] - FLEX-34625 CAUSE: When focusThickness is set to 0, the BitmapData that HighlightBitmapCaptureSkin.updateDisplayList() tries to create is of 0 width and height, which results in a fatal error. SOLUTION:

Posted by piotrz <pi...@gmail.com>.
Mihai,

I think you have to set haltonfailure=true or verbose=true in your ant
flexunit target. The you will get full report.

Piotr



-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/Re-2-3-git-commit-flex-sdk-refs-heads-develop-FLEX-34625-CAUSE-When-focusThickness-is-set-to-0-the-B-tp44185p44486.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: [2/3] git commit: [flex-sdk] [refs/heads/develop] - FLEX-34625 CAUSE: When focusThickness is set to 0, the BitmapData that HighlightBitmapCaptureSkin.updateDisplayList() tries to create is of 0 width and height, which results in a fatal error. SOLUTION:

Posted by Mihai Chira <mi...@apache.org>.
I'm really struggling with this, if anyone can help (debugging why
FLEX_34625_Tests.as is failing).

The progress I made was:
-found out that UIImpersonator.testDisplay is a Sprite (when running
the unit test in IntelliJ, it's always an mx.core.Container instance,
which is fine).
-noticed that FlexUnit is still compiled against sdk 4.12.0 (see
version.properties) - is this intended?
-in any case, it doesn't seem to matter, because I tried to switch the
current sdk to the 'apache-flex-sdk-4.12.0' branch, rebuild flexunit
with that, and then switch back the sdk to develop, and run the unit
test, and it still fails (I think) with the same error.

But the big problem is that I can't get my local test report to
include stack traces, or logs. (verbose is set to true in
flexunit-tests.xml). Does anyone know how to fix that?
Thanks.

On 21 January 2015 at 11:37, Mihai Chira <mi...@apache.org> wrote:
> It looks great, thanks for it. I just made a couple of cosmetic
> changes to it. Now I'll go on to debug the still failing
> FLEX_34625_Tests.as.
>
> On 7 January 2015 at 11:25, Erik de Bruin <er...@ixsoftware.nl> wrote:
>> Mihai,
>>
>> Thanks for taking the effort to figure out how to automate the
>> FlexUnit tests using the new framework. I'm sorry you had to figure it
>> out on your own. However, it did shame me into 'finishing' the Wiki
>> entry on the subject. Maybe you can have a look at it and see if it
>> makes sense from your experience?
>>
>> https://cwiki.apache.org/confluence/x/c4H_Ag
>>
>> Thanks,
>>
>> EdB
>>
>>
>>
>> On Tue, Jan 6, 2015 at 7:12 PM, Mihai Chira <mi...@apache.org> wrote:
>>> If this bug fix looks all right to everyone, maybe it could be merged
>>> into the release branch? If we're unsure about it, we could wait for
>>> FLEX-34711 to be resolved, so that we can run its unit test in ant (it
>>> passes locally for me, of course).
>>>
>>> On 6 January 2015 at 15:43,  <mi...@apache.org> wrote:
>>>> FLEX-34625
>>>> CAUSE: When focusThickness is set to 0, the BitmapData that HighlightBitmapCaptureSkin.updateDisplayList() tries to create is of 0 width and height, which results in a fatal error.
>>>> SOLUTION: check whether the width and the height of the BitmapData we want to construct are 0, and, if so, return.
>>>>
>>>>
>>>> Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
>>>> Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/685aeb3f
>>>> Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/685aeb3f
>>>> Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/685aeb3f
>>>>
>>>> Branch: refs/heads/develop
>>>> Commit: 685aeb3fc7b5a3e37b7766e7f0ca63af837e8cab
>>>> Parents: 6a031b4
>>>> Author: Mihai Chira <mi...@apache.org>
>>>> Authored: Tue Jan 6 15:40:45 2015 +0000
>>>> Committer: Mihai Chira <mi...@apache.org>
>>>> Committed: Tue Jan 6 15:40:45 2015 +0000
>>>>
>>>> ----------------------------------------------------------------------
>>>>  .../mx/logging/targets/LineFormattedTarget.as   |  2 +-
>>>>  .../skins/spark/HighlightBitmapCaptureSkin.as   | 20 +++++++++++---------
>>>>  2 files changed, 12 insertions(+), 10 deletions(-)
>>>> ----------------------------------------------------------------------
>>>>
>>>>
>>>> http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/685aeb3f/frameworks/projects/framework/src/mx/logging/targets/LineFormattedTarget.as
>>>> ----------------------------------------------------------------------
>>>> diff --git a/frameworks/projects/framework/src/mx/logging/targets/LineFormattedTarget.as b/frameworks/projects/framework/src/mx/logging/targets/LineFormattedTarget.as
>>>> index 2e1b328..9f9e230 100644
>>>> --- a/frameworks/projects/framework/src/mx/logging/targets/LineFormattedTarget.as
>>>> +++ b/frameworks/projects/framework/src/mx/logging/targets/LineFormattedTarget.as
>>>> @@ -178,7 +178,7 @@ public class LineFormattedTarget extends AbstractTarget
>>>>       */
>>>>      override public function logEvent(event:LogEvent):void
>>>>      {
>>>> -        var date:String = ""
>>>> +        var date:String = "";
>>>>          if (includeDate || includeTime)
>>>>          {
>>>>              var d:Date = new Date();
>>>>
>>>> http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/685aeb3f/frameworks/projects/spark/src/spark/skins/spark/HighlightBitmapCaptureSkin.as
>>>> ----------------------------------------------------------------------
>>>> diff --git a/frameworks/projects/spark/src/spark/skins/spark/HighlightBitmapCaptureSkin.as b/frameworks/projects/spark/src/spark/skins/spark/HighlightBitmapCaptureSkin.as
>>>> index 9de2387..077f14a 100644
>>>> --- a/frameworks/projects/spark/src/spark/skins/spark/HighlightBitmapCaptureSkin.as
>>>> +++ b/frameworks/projects/spark/src/spark/skins/spark/HighlightBitmapCaptureSkin.as
>>>> @@ -19,7 +19,7 @@
>>>>
>>>>  package spark.skins.spark
>>>>  {
>>>> -
>>>> +
>>>>      import flash.display.Bitmap;
>>>>      import flash.display.BitmapData;
>>>>      import flash.display.DisplayObject;
>>>> @@ -29,15 +29,14 @@ package spark.skins.spark
>>>>      import flash.geom.Matrix;
>>>>      import flash.geom.Matrix3D;
>>>>      import flash.geom.Rectangle;
>>>> -
>>>> +
>>>>      import mx.core.UIComponent;
>>>>      import mx.core.mx_internal;
>>>>      import mx.events.FlexEvent;
>>>> -
>>>> -    import spark.components.supportClasses.Skin;
>>>> +
>>>>      import spark.components.supportClasses.SkinnableComponent;
>>>>      import spark.skins.IHighlightBitmapCaptureClient;
>>>> -
>>>> +
>>>>      use namespace mx_internal;
>>>>
>>>>      /**
>>>> @@ -161,9 +160,12 @@ package spark.skins.spark
>>>>              if (!target)
>>>>                  return;
>>>>
>>>> -            var bitmapData:BitmapData = new BitmapData(
>>>> -                target.width + (borderWeight * 2),
>>>> -                target.height + (borderWeight * 2), true, 0);
>>>> +            var bdWidth:Number = target.width + borderWeight * 2;
>>>> +            var bdHeight:Number = target.height + borderWeight * 2;
>>>> +            if(bdWidth < 1 || bdHeight < 1)
>>>> +                return;
>>>> +
>>>> +            var bitmapData:BitmapData = new BitmapData(bdWidth, bdHeight, true, 0);
>>>>              var m:Matrix = new Matrix();
>>>>
>>>>              capturingBitmap = true;
>>>> @@ -199,7 +201,7 @@ package spark.skins.spark
>>>>              catch (e:SecurityError)
>>>>              {
>>>>                  // If capture fails, substitute with a Rect
>>>> -                var fillRect:Rectangle
>>>> +                var fillRect:Rectangle;
>>>>                                 var skin:DisplayObject = target.skin;
>>>>
>>>>                  if (skin)
>>>>
>>
>>
>>
>> --
>> Ix Multimedia Software
>>
>> Jan Luykenstraat 27
>> 3521 VB Utrecht
>>
>> T. 06-51952295
>> I. www.ixsoftware.nl

Re: [2/3] git commit: [flex-sdk] [refs/heads/develop] - FLEX-34625 CAUSE: When focusThickness is set to 0, the BitmapData that HighlightBitmapCaptureSkin.updateDisplayList() tries to create is of 0 width and height, which results in a fatal error. SOLUTION:

Posted by Mihai Chira <mi...@apache.org>.
It looks great, thanks for it. I just made a couple of cosmetic
changes to it. Now I'll go on to debug the still failing
FLEX_34625_Tests.as.

On 7 January 2015 at 11:25, Erik de Bruin <er...@ixsoftware.nl> wrote:
> Mihai,
>
> Thanks for taking the effort to figure out how to automate the
> FlexUnit tests using the new framework. I'm sorry you had to figure it
> out on your own. However, it did shame me into 'finishing' the Wiki
> entry on the subject. Maybe you can have a look at it and see if it
> makes sense from your experience?
>
> https://cwiki.apache.org/confluence/x/c4H_Ag
>
> Thanks,
>
> EdB
>
>
>
> On Tue, Jan 6, 2015 at 7:12 PM, Mihai Chira <mi...@apache.org> wrote:
>> If this bug fix looks all right to everyone, maybe it could be merged
>> into the release branch? If we're unsure about it, we could wait for
>> FLEX-34711 to be resolved, so that we can run its unit test in ant (it
>> passes locally for me, of course).
>>
>> On 6 January 2015 at 15:43,  <mi...@apache.org> wrote:
>>> FLEX-34625
>>> CAUSE: When focusThickness is set to 0, the BitmapData that HighlightBitmapCaptureSkin.updateDisplayList() tries to create is of 0 width and height, which results in a fatal error.
>>> SOLUTION: check whether the width and the height of the BitmapData we want to construct are 0, and, if so, return.
>>>
>>>
>>> Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
>>> Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/685aeb3f
>>> Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/685aeb3f
>>> Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/685aeb3f
>>>
>>> Branch: refs/heads/develop
>>> Commit: 685aeb3fc7b5a3e37b7766e7f0ca63af837e8cab
>>> Parents: 6a031b4
>>> Author: Mihai Chira <mi...@apache.org>
>>> Authored: Tue Jan 6 15:40:45 2015 +0000
>>> Committer: Mihai Chira <mi...@apache.org>
>>> Committed: Tue Jan 6 15:40:45 2015 +0000
>>>
>>> ----------------------------------------------------------------------
>>>  .../mx/logging/targets/LineFormattedTarget.as   |  2 +-
>>>  .../skins/spark/HighlightBitmapCaptureSkin.as   | 20 +++++++++++---------
>>>  2 files changed, 12 insertions(+), 10 deletions(-)
>>> ----------------------------------------------------------------------
>>>
>>>
>>> http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/685aeb3f/frameworks/projects/framework/src/mx/logging/targets/LineFormattedTarget.as
>>> ----------------------------------------------------------------------
>>> diff --git a/frameworks/projects/framework/src/mx/logging/targets/LineFormattedTarget.as b/frameworks/projects/framework/src/mx/logging/targets/LineFormattedTarget.as
>>> index 2e1b328..9f9e230 100644
>>> --- a/frameworks/projects/framework/src/mx/logging/targets/LineFormattedTarget.as
>>> +++ b/frameworks/projects/framework/src/mx/logging/targets/LineFormattedTarget.as
>>> @@ -178,7 +178,7 @@ public class LineFormattedTarget extends AbstractTarget
>>>       */
>>>      override public function logEvent(event:LogEvent):void
>>>      {
>>> -        var date:String = ""
>>> +        var date:String = "";
>>>          if (includeDate || includeTime)
>>>          {
>>>              var d:Date = new Date();
>>>
>>> http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/685aeb3f/frameworks/projects/spark/src/spark/skins/spark/HighlightBitmapCaptureSkin.as
>>> ----------------------------------------------------------------------
>>> diff --git a/frameworks/projects/spark/src/spark/skins/spark/HighlightBitmapCaptureSkin.as b/frameworks/projects/spark/src/spark/skins/spark/HighlightBitmapCaptureSkin.as
>>> index 9de2387..077f14a 100644
>>> --- a/frameworks/projects/spark/src/spark/skins/spark/HighlightBitmapCaptureSkin.as
>>> +++ b/frameworks/projects/spark/src/spark/skins/spark/HighlightBitmapCaptureSkin.as
>>> @@ -19,7 +19,7 @@
>>>
>>>  package spark.skins.spark
>>>  {
>>> -
>>> +
>>>      import flash.display.Bitmap;
>>>      import flash.display.BitmapData;
>>>      import flash.display.DisplayObject;
>>> @@ -29,15 +29,14 @@ package spark.skins.spark
>>>      import flash.geom.Matrix;
>>>      import flash.geom.Matrix3D;
>>>      import flash.geom.Rectangle;
>>> -
>>> +
>>>      import mx.core.UIComponent;
>>>      import mx.core.mx_internal;
>>>      import mx.events.FlexEvent;
>>> -
>>> -    import spark.components.supportClasses.Skin;
>>> +
>>>      import spark.components.supportClasses.SkinnableComponent;
>>>      import spark.skins.IHighlightBitmapCaptureClient;
>>> -
>>> +
>>>      use namespace mx_internal;
>>>
>>>      /**
>>> @@ -161,9 +160,12 @@ package spark.skins.spark
>>>              if (!target)
>>>                  return;
>>>
>>> -            var bitmapData:BitmapData = new BitmapData(
>>> -                target.width + (borderWeight * 2),
>>> -                target.height + (borderWeight * 2), true, 0);
>>> +            var bdWidth:Number = target.width + borderWeight * 2;
>>> +            var bdHeight:Number = target.height + borderWeight * 2;
>>> +            if(bdWidth < 1 || bdHeight < 1)
>>> +                return;
>>> +
>>> +            var bitmapData:BitmapData = new BitmapData(bdWidth, bdHeight, true, 0);
>>>              var m:Matrix = new Matrix();
>>>
>>>              capturingBitmap = true;
>>> @@ -199,7 +201,7 @@ package spark.skins.spark
>>>              catch (e:SecurityError)
>>>              {
>>>                  // If capture fails, substitute with a Rect
>>> -                var fillRect:Rectangle
>>> +                var fillRect:Rectangle;
>>>                                 var skin:DisplayObject = target.skin;
>>>
>>>                  if (skin)
>>>
>
>
>
> --
> Ix Multimedia Software
>
> Jan Luykenstraat 27
> 3521 VB Utrecht
>
> T. 06-51952295
> I. www.ixsoftware.nl

Re: [2/3] git commit: [flex-sdk] [refs/heads/develop] - FLEX-34625 CAUSE: When focusThickness is set to 0, the BitmapData that HighlightBitmapCaptureSkin.updateDisplayList() tries to create is of 0 width and height, which results in a fatal error. SOLUTION:

Posted by Erik de Bruin <er...@ixsoftware.nl>.
Mihai,

Thanks for taking the effort to figure out how to automate the
FlexUnit tests using the new framework. I'm sorry you had to figure it
out on your own. However, it did shame me into 'finishing' the Wiki
entry on the subject. Maybe you can have a look at it and see if it
makes sense from your experience?

https://cwiki.apache.org/confluence/x/c4H_Ag

Thanks,

EdB



On Tue, Jan 6, 2015 at 7:12 PM, Mihai Chira <mi...@apache.org> wrote:
> If this bug fix looks all right to everyone, maybe it could be merged
> into the release branch? If we're unsure about it, we could wait for
> FLEX-34711 to be resolved, so that we can run its unit test in ant (it
> passes locally for me, of course).
>
> On 6 January 2015 at 15:43,  <mi...@apache.org> wrote:
>> FLEX-34625
>> CAUSE: When focusThickness is set to 0, the BitmapData that HighlightBitmapCaptureSkin.updateDisplayList() tries to create is of 0 width and height, which results in a fatal error.
>> SOLUTION: check whether the width and the height of the BitmapData we want to construct are 0, and, if so, return.
>>
>>
>> Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
>> Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/685aeb3f
>> Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/685aeb3f
>> Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/685aeb3f
>>
>> Branch: refs/heads/develop
>> Commit: 685aeb3fc7b5a3e37b7766e7f0ca63af837e8cab
>> Parents: 6a031b4
>> Author: Mihai Chira <mi...@apache.org>
>> Authored: Tue Jan 6 15:40:45 2015 +0000
>> Committer: Mihai Chira <mi...@apache.org>
>> Committed: Tue Jan 6 15:40:45 2015 +0000
>>
>> ----------------------------------------------------------------------
>>  .../mx/logging/targets/LineFormattedTarget.as   |  2 +-
>>  .../skins/spark/HighlightBitmapCaptureSkin.as   | 20 +++++++++++---------
>>  2 files changed, 12 insertions(+), 10 deletions(-)
>> ----------------------------------------------------------------------
>>
>>
>> http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/685aeb3f/frameworks/projects/framework/src/mx/logging/targets/LineFormattedTarget.as
>> ----------------------------------------------------------------------
>> diff --git a/frameworks/projects/framework/src/mx/logging/targets/LineFormattedTarget.as b/frameworks/projects/framework/src/mx/logging/targets/LineFormattedTarget.as
>> index 2e1b328..9f9e230 100644
>> --- a/frameworks/projects/framework/src/mx/logging/targets/LineFormattedTarget.as
>> +++ b/frameworks/projects/framework/src/mx/logging/targets/LineFormattedTarget.as
>> @@ -178,7 +178,7 @@ public class LineFormattedTarget extends AbstractTarget
>>       */
>>      override public function logEvent(event:LogEvent):void
>>      {
>> -        var date:String = ""
>> +        var date:String = "";
>>          if (includeDate || includeTime)
>>          {
>>              var d:Date = new Date();
>>
>> http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/685aeb3f/frameworks/projects/spark/src/spark/skins/spark/HighlightBitmapCaptureSkin.as
>> ----------------------------------------------------------------------
>> diff --git a/frameworks/projects/spark/src/spark/skins/spark/HighlightBitmapCaptureSkin.as b/frameworks/projects/spark/src/spark/skins/spark/HighlightBitmapCaptureSkin.as
>> index 9de2387..077f14a 100644
>> --- a/frameworks/projects/spark/src/spark/skins/spark/HighlightBitmapCaptureSkin.as
>> +++ b/frameworks/projects/spark/src/spark/skins/spark/HighlightBitmapCaptureSkin.as
>> @@ -19,7 +19,7 @@
>>
>>  package spark.skins.spark
>>  {
>> -
>> +
>>      import flash.display.Bitmap;
>>      import flash.display.BitmapData;
>>      import flash.display.DisplayObject;
>> @@ -29,15 +29,14 @@ package spark.skins.spark
>>      import flash.geom.Matrix;
>>      import flash.geom.Matrix3D;
>>      import flash.geom.Rectangle;
>> -
>> +
>>      import mx.core.UIComponent;
>>      import mx.core.mx_internal;
>>      import mx.events.FlexEvent;
>> -
>> -    import spark.components.supportClasses.Skin;
>> +
>>      import spark.components.supportClasses.SkinnableComponent;
>>      import spark.skins.IHighlightBitmapCaptureClient;
>> -
>> +
>>      use namespace mx_internal;
>>
>>      /**
>> @@ -161,9 +160,12 @@ package spark.skins.spark
>>              if (!target)
>>                  return;
>>
>> -            var bitmapData:BitmapData = new BitmapData(
>> -                target.width + (borderWeight * 2),
>> -                target.height + (borderWeight * 2), true, 0);
>> +            var bdWidth:Number = target.width + borderWeight * 2;
>> +            var bdHeight:Number = target.height + borderWeight * 2;
>> +            if(bdWidth < 1 || bdHeight < 1)
>> +                return;
>> +
>> +            var bitmapData:BitmapData = new BitmapData(bdWidth, bdHeight, true, 0);
>>              var m:Matrix = new Matrix();
>>
>>              capturingBitmap = true;
>> @@ -199,7 +201,7 @@ package spark.skins.spark
>>              catch (e:SecurityError)
>>              {
>>                  // If capture fails, substitute with a Rect
>> -                var fillRect:Rectangle
>> +                var fillRect:Rectangle;
>>                                 var skin:DisplayObject = target.skin;
>>
>>                  if (skin)
>>



-- 
Ix Multimedia Software

Jan Luykenstraat 27
3521 VB Utrecht

T. 06-51952295
I. www.ixsoftware.nl

Re: [2/3] git commit: [flex-sdk] [refs/heads/develop] - FLEX-34625 CAUSE: When focusThickness is set to 0, the BitmapData that HighlightBitmapCaptureSkin.updateDisplayList() tries to create is of 0 width and height, which results in a fatal error. SOLUTION:

Posted by Mihai Chira <mi...@apache.org>.
If this bug fix looks all right to everyone, maybe it could be merged
into the release branch? If we're unsure about it, we could wait for
FLEX-34711 to be resolved, so that we can run its unit test in ant (it
passes locally for me, of course).

On 6 January 2015 at 15:43,  <mi...@apache.org> wrote:
> FLEX-34625
> CAUSE: When focusThickness is set to 0, the BitmapData that HighlightBitmapCaptureSkin.updateDisplayList() tries to create is of 0 width and height, which results in a fatal error.
> SOLUTION: check whether the width and the height of the BitmapData we want to construct are 0, and, if so, return.
>
>
> Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
> Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/685aeb3f
> Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/685aeb3f
> Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/685aeb3f
>
> Branch: refs/heads/develop
> Commit: 685aeb3fc7b5a3e37b7766e7f0ca63af837e8cab
> Parents: 6a031b4
> Author: Mihai Chira <mi...@apache.org>
> Authored: Tue Jan 6 15:40:45 2015 +0000
> Committer: Mihai Chira <mi...@apache.org>
> Committed: Tue Jan 6 15:40:45 2015 +0000
>
> ----------------------------------------------------------------------
>  .../mx/logging/targets/LineFormattedTarget.as   |  2 +-
>  .../skins/spark/HighlightBitmapCaptureSkin.as   | 20 +++++++++++---------
>  2 files changed, 12 insertions(+), 10 deletions(-)
> ----------------------------------------------------------------------
>
>
> http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/685aeb3f/frameworks/projects/framework/src/mx/logging/targets/LineFormattedTarget.as
> ----------------------------------------------------------------------
> diff --git a/frameworks/projects/framework/src/mx/logging/targets/LineFormattedTarget.as b/frameworks/projects/framework/src/mx/logging/targets/LineFormattedTarget.as
> index 2e1b328..9f9e230 100644
> --- a/frameworks/projects/framework/src/mx/logging/targets/LineFormattedTarget.as
> +++ b/frameworks/projects/framework/src/mx/logging/targets/LineFormattedTarget.as
> @@ -178,7 +178,7 @@ public class LineFormattedTarget extends AbstractTarget
>       */
>      override public function logEvent(event:LogEvent):void
>      {
> -        var date:String = ""
> +        var date:String = "";
>          if (includeDate || includeTime)
>          {
>              var d:Date = new Date();
>
> http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/685aeb3f/frameworks/projects/spark/src/spark/skins/spark/HighlightBitmapCaptureSkin.as
> ----------------------------------------------------------------------
> diff --git a/frameworks/projects/spark/src/spark/skins/spark/HighlightBitmapCaptureSkin.as b/frameworks/projects/spark/src/spark/skins/spark/HighlightBitmapCaptureSkin.as
> index 9de2387..077f14a 100644
> --- a/frameworks/projects/spark/src/spark/skins/spark/HighlightBitmapCaptureSkin.as
> +++ b/frameworks/projects/spark/src/spark/skins/spark/HighlightBitmapCaptureSkin.as
> @@ -19,7 +19,7 @@
>
>  package spark.skins.spark
>  {
> -
> +
>      import flash.display.Bitmap;
>      import flash.display.BitmapData;
>      import flash.display.DisplayObject;
> @@ -29,15 +29,14 @@ package spark.skins.spark
>      import flash.geom.Matrix;
>      import flash.geom.Matrix3D;
>      import flash.geom.Rectangle;
> -
> +
>      import mx.core.UIComponent;
>      import mx.core.mx_internal;
>      import mx.events.FlexEvent;
> -
> -    import spark.components.supportClasses.Skin;
> +
>      import spark.components.supportClasses.SkinnableComponent;
>      import spark.skins.IHighlightBitmapCaptureClient;
> -
> +
>      use namespace mx_internal;
>
>      /**
> @@ -161,9 +160,12 @@ package spark.skins.spark
>              if (!target)
>                  return;
>
> -            var bitmapData:BitmapData = new BitmapData(
> -                target.width + (borderWeight * 2),
> -                target.height + (borderWeight * 2), true, 0);
> +            var bdWidth:Number = target.width + borderWeight * 2;
> +            var bdHeight:Number = target.height + borderWeight * 2;
> +            if(bdWidth < 1 || bdHeight < 1)
> +                return;
> +
> +            var bitmapData:BitmapData = new BitmapData(bdWidth, bdHeight, true, 0);
>              var m:Matrix = new Matrix();
>
>              capturingBitmap = true;
> @@ -199,7 +201,7 @@ package spark.skins.spark
>              catch (e:SecurityError)
>              {
>                  // If capture fails, substitute with a Rect
> -                var fillRect:Rectangle
> +                var fillRect:Rectangle;
>                                 var skin:DisplayObject = target.skin;
>
>                  if (skin)
>