You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by tjajab <an...@gmail.com> on 2014/09/05 13:21:03 UTC

Flexmojos flexunit testing on headless Ubuntu 14.04

Hi,

I am using Flexmojos (6.0.1) to compile and test my swf application. It
works fine on my Windows machine, however when trying to run it a Vagrant
box with Ubuntu 14.04 (64-bit + xvfb), it sometimes fails due to the Flash
player gives an error (1) while closing.

I have not managed to get any debug information regarding the actual error,
except that I see the following errors every time the flashplayer closes
(even when the build succeeds, it seems):
GLib-GObject-WARNING **: instance with invalid (NULL) class
pointer
GLib-GObject-CRITICAL **: g_signal_handlers_disconnect_matched: assertion
'G_TYPE_CHECK_INSTANCE (instance)' failed

All the test runs and succeeds, and it has nothing to do with the Xauthority
problems I saw in some other tests. I did a small change in
AsVmLauncher.java in the flexmojos-tester package (simply added return code
1 as an accepted return code), and then everything works and I get my
ordinary test coverage reports. I however realize that 1) This is not a good
solution, as the return code 1 may indicate a more serious error, and 2)
This is probably nothing that can be fixed in the flexmojos package, as it
seems to be the flashplayer on Ubuntu 14.04 64-bit that is the problem.

I post the question for two reasons:
1) Would it make sense to add a flag to actually continue on return code 1,
as I have found no way to get the flashplayer to close normally every time.
I can do a PR on this if it seems like a reasonable solution.
2) If anyone else has this problem, have you found a way to get around it?
Is it a race condition of some kind? I've tried both the built-in xvfb-run
and to have an xvfb server running before the test starts. It seems that
when I have a server running before starting the build it actually succeeds
sometimes, although it was I while since I could reproduce that.

BTW, the flashplayer I use is located at
http://fpdownload.macromedia.com/pub/flashplayer/updaters/11/flashplayer_11_sa_debug.i386.tar.gz

Best regards,
Andreas



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Flexmojos-flexunit-testing-on-headless-Ubuntu-14-04-tp7894.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: AW: AW: Flexmojos flexunit testing on headless Ubuntu 14.04

Posted by tjajab <an...@gmail.com>.
Hi,

thanks. I didn't know about the fork and pull model when I wrote my message
(I've mostly worked with branches within the same private repo), but now I
know more. I also had some trouble installing older versions of Apache Flex
so I didn't manage to run the full testsuite, so thank you for your help on
that.

/Andreas


Christofer Dutz wrote
> Hi Andreas,
> 
> I received the pull request. I'll have a look at it this week.
> You dont have to (can't) push to my branch as I am the only 
> one with write permission to it. That's what the pull requests are for.
> Did you run the entire testsuite? Probably not as you have to provide 
> a wide range of SDK versions for that. So I'll have to do that first.
> 
> Chris





--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Flexmojos-flexunit-testing-on-headless-Ubuntu-14-04-tp7894p7941.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: AW: AW: AW: Flexmojos flexunit testing on headless Ubuntu 14.04

Posted by tjajab <an...@gmail.com>.
Hi Chris,

I actually started out by having a boolean for this, but then I noticed in
the source code that there was one other return code that was already
ignored specifically on Linux (code 139) without any explanation, so I
thought that it would be nice to consolidate and leave this decision to the
user, so the code base wouldn't have to be updated all the time (and as a
next step remove the hard coded case 139 from the switch).

Regarding the Linux-only mode, I agree that it seems a little inconsequent.
My motivation behind this was 1) your first reply to this thread, and 2) If
the same project is built in different environments, we haven't seen a use
case yet where it would make sense to ignore error codes in other OSes than
Linux, so basically I didn't want the Linux users to hide real errors from
users on other environments by added this parameter to the pom.

I'm open though to change this in any direction.

/Andreas


Christofer Dutz wrote
> I just had a look at your changes.
> Are there more than one code the flashplayer returns? I thought it would
> just be a return code 1?
> 
> In that case I would favor a ... let's call it "boolean solution" ... sort
> of like. "linuxFlashPlayerQuirksModeEnabled" or something like that. Just
> a small sidehint on the HTML quirks mode ;-)
> 
> Having to define a list of ignorable return-codes sort of feels
> inconsequent. The other option would be to allow this on any operating
> system as I see no reason for having such a configuration Option just on
> linux. If I for example think about IntelliJ it would pick up the new
> property "flashplayerReturnCodesToIgnore" and offer that to the user as an
> option. He could be surprised why this only works on linux.
> 
> What do you think? I'm sort of asking anyone interested in contributing to
> this discussion.
> 
> Chris





--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Flexmojos-flexunit-testing-on-headless-Ubuntu-14-04-tp7894p7960.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: AW: AW: AW: Flexmojos flexunit testing on headless Ubuntu 14.04

Posted by tjajab <an...@gmail.com>.
I tried to take a look on the libs involved and did not find any 0-byte
versions, but I'm no expert on Linux lib management, so it is not impossible
this is actually the problem. The player works fine as long as it is running
though, it is only upon closing that it crashes, so it must be a quite
unimportant lib that is missing, if that is the case. I've tried googling a
lot for a solution, but so far nothing has been pointing me in the right
direction. I guess we are a diminishing group of people struggling with
Flash on modern 64-bit Linux ditributions, and/or that I have to improve my
googling skills a little.

/Andreas


Christofer Dutz wrote
> And I was just googling about the error you were having and I think that I
> encountered it myself a while ago.
> One thing I think I remember was that it only happened on 64bit linux
> systems. I tracked the error back to some of the libs needed by the
> flashplayer being server by so files that had normal 32bit shared library
> files, but the 64bit counterparts were all 0 bytes large. I think the main
> problem was that the OS found the files it was looking for and tried to
> load them. I manually repacked the package and deleted the 0 byte files
> causing the os not to find the 64bit libs and falling back to the 32bit
> ones resolving my Flashplayer problems.
> 
> Unfortunately this was about 3 Years ago and it was in one of those epic
> Chris vs. Linux + Flash fights that I finally gave up on ... should have
> written down what I found out then ... sorry for that.





--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Flexmojos-flexunit-testing-on-headless-Ubuntu-14-04-tp7894p7961.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

AW: AW: AW: Flexmojos flexunit testing on headless Ubuntu 14.04

Posted by Christofer Dutz <ch...@c-ware.de>.
And I was just googling about the error you were having and I think that I encountered it myself a while ago.
One thing I think I remember was that it only happened on 64bit linux systems. I tracked the error back to some of the libs needed by the flashplayer being server by so files that had normal 32bit shared library files, but the 64bit counterparts were all 0 bytes large. I think the main problem was that the OS found the files it was looking for and tried to load them. I manually repacked the package and deleted the 0 byte files causing the os not to find the 64bit libs and falling back to the 32bit ones resolving my Flashplayer problems.

Unfortunately this was about 3 Years ago and it was in one of those epic Chris vs. Linux + Flash fights that I finally gave up on ... should have written down what I found out then ... sorry for that.

Chris



________________________________________
Von: Christofer Dutz <ch...@c-ware.de>
Gesendet: Montag, 8. September 2014 22:53
An: users@flex.apache.org
Betreff: AW: AW: AW: Flexmojos flexunit testing on headless Ubuntu 14.04

I just had a look at your changes.
Are there more than one code the flashplayer returns? I thought it would just be a return code 1?

In that case I would favor a ... let's call it "boolean solution" ... sort of like. "linuxFlashPlayerQuirksModeEnabled" or something like that. Just a small sidehint on the HTML quirks mode ;-)

Having to define a list of ignorable return-codes sort of feels inconsequent. The other option would be to allow this on any operating system as I see no reason for having such a configuration Option just on linux. If I for example think about IntelliJ it would pick up the new property "flashplayerReturnCodesToIgnore" and offer that to the user as an option. He could be surprised why this only works on linux.

What do you think? I'm sort of asking anyone interested in contributing to this discussion.

Chris


________________________________________
Von: tjajab <an...@gmail.com>
Gesendet: Montag, 8. September 2014 22:34
An: users@flex.apache.org
Betreff: Re: AW: AW: Flexmojos flexunit testing on headless Ubuntu 14.04

Hi Om,

The pull request is in chrisdutz/flexmojos (
https://github.com/chrisdutz/flexmojos/pull/10 )

Best,
Andreas


OmPrakash Muppirala wrote
> Which repo is this PR for?  I want to do some GitHub integration testing
> if
> possible.
>
> Thanks,
> Om





--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Flexmojos-flexunit-testing-on-headless-Ubuntu-14-04-tp7894p7942.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

AW: AW: AW: Flexmojos flexunit testing on headless Ubuntu 14.04

Posted by Christofer Dutz <ch...@c-ware.de>.
I just had a look at your changes.
Are there more than one code the flashplayer returns? I thought it would just be a return code 1?

In that case I would favor a ... let's call it "boolean solution" ... sort of like. "linuxFlashPlayerQuirksModeEnabled" or something like that. Just a small sidehint on the HTML quirks mode ;-)

Having to define a list of ignorable return-codes sort of feels inconsequent. The other option would be to allow this on any operating system as I see no reason for having such a configuration Option just on linux. If I for example think about IntelliJ it would pick up the new property "flashplayerReturnCodesToIgnore" and offer that to the user as an option. He could be surprised why this only works on linux.

What do you think? I'm sort of asking anyone interested in contributing to this discussion.

Chris


________________________________________
Von: tjajab <an...@gmail.com>
Gesendet: Montag, 8. September 2014 22:34
An: users@flex.apache.org
Betreff: Re: AW: AW: Flexmojos flexunit testing on headless Ubuntu 14.04

Hi Om,

The pull request is in chrisdutz/flexmojos (
https://github.com/chrisdutz/flexmojos/pull/10 )

Best,
Andreas


OmPrakash Muppirala wrote
> Which repo is this PR for?  I want to do some GitHub integration testing
> if
> possible.
>
> Thanks,
> Om





--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Flexmojos-flexunit-testing-on-headless-Ubuntu-14-04-tp7894p7942.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: AW: AW: Flexmojos flexunit testing on headless Ubuntu 14.04

Posted by tjajab <an...@gmail.com>.
Hi Om,

The pull request is in chrisdutz/flexmojos (
https://github.com/chrisdutz/flexmojos/pull/10 )

Best,
Andreas


OmPrakash Muppirala wrote
> Which repo is this PR for?  I want to do some GitHub integration testing
> if
> possible.
> 
> Thanks,
> Om





--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Flexmojos-flexunit-testing-on-headless-Ubuntu-14-04-tp7894p7942.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: AW: AW: Flexmojos flexunit testing on headless Ubuntu 14.04

Posted by OmPrakash Muppirala <bi...@gmail.com>.
On Sep 7, 2014 9:43 AM, "Christofer Dutz" <ch...@c-ware.de> wrote:
>
> Hi Andreas,
>
> I received the pull request. I'll have a look at it this week.
> You dont have to (can't) push to my branch as I am the only
> one with write permission to it. That's what the pull requests are for.
> Did you run the entire testsuite? Probably not as you have to provide
> a wide range of SDK versions for that. So I'll have to do that first.
>

Which repo is this PR for?  I want to do some GitHub integration testing if
possible.

Thanks,
Om

> Chris
>
> -----Ursprüngliche Nachricht-----
> Von: tjajab [mailto:andreas.brudin@gmail.com]
> Gesendet: Sonntag, 7. September 2014 00:16
> An: users@flex.apache.org
> Betreff: Re: AW: Flexmojos flexunit testing on headless Ubuntu 14.04
>
> Hi,
>
> I've prepared a pull request for this feature. How do I go about to push
my branch to your repository? (My username on github is abrudin). BTW, the
Apache Flex Installer has troubles with versions prior to 4.13.20140701
(due to some Adobe file area now having password protection), so to be able
to build the 7.x-SNAPSHOT branch I had to upgrade to 4.13 and make some
changes to the poms to be able to build. This is of course not included in
my branch, but I had some dependency problems where I had to explicitly add
some dependencies to the testing poms, so if you run into any problems
upgrading just let me know.
>
> Best regards,
> Andreas
>
>
>
> --
> View this message in context:
http://apache-flex-users.2333346.n4.nabble.com/Flexmojos-flexunit-testing-on-headless-Ubuntu-14-04-tp7894p7927.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.

AW: AW: Flexmojos flexunit testing on headless Ubuntu 14.04

Posted by Christofer Dutz <ch...@c-ware.de>.
Hi Andreas,

I received the pull request. I'll have a look at it this week.
You dont have to (can't) push to my branch as I am the only 
one with write permission to it. That's what the pull requests are for.
Did you run the entire testsuite? Probably not as you have to provide 
a wide range of SDK versions for that. So I'll have to do that first.

Chris

-----Ursprüngliche Nachricht-----
Von: tjajab [mailto:andreas.brudin@gmail.com] 
Gesendet: Sonntag, 7. September 2014 00:16
An: users@flex.apache.org
Betreff: Re: AW: Flexmojos flexunit testing on headless Ubuntu 14.04

Hi,

I've prepared a pull request for this feature. How do I go about to push my branch to your repository? (My username on github is abrudin). BTW, the Apache Flex Installer has troubles with versions prior to 4.13.20140701 (due to some Adobe file area now having password protection), so to be able to build the 7.x-SNAPSHOT branch I had to upgrade to 4.13 and make some changes to the poms to be able to build. This is of course not included in my branch, but I had some dependency problems where I had to explicitly add some dependencies to the testing poms, so if you run into any problems upgrading just let me know.

Best regards,
Andreas



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Flexmojos-flexunit-testing-on-headless-Ubuntu-14-04-tp7894p7927.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: AW: Flexmojos flexunit testing on headless Ubuntu 14.04

Posted by tjajab <an...@gmail.com>.
Hi,

I've prepared a pull request for this feature. How do I go about to push my
branch to your repository? (My username on github is abrudin). BTW, the
Apache Flex Installer has troubles with versions prior to 4.13.20140701 (due
to some Adobe file area now having password protection), so to be able to
build the 7.x-SNAPSHOT branch I had to upgrade to 4.13 and make some changes
to the poms to be able to build. This is of course not included in my
branch, but I had some dependency problems where I had to explicitly add
some dependencies to the testing poms, so if you run into any problems
upgrading just let me know.

Best regards,
Andreas



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Flexmojos-flexunit-testing-on-headless-Ubuntu-14-04-tp7894p7927.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

AW: Flexmojos flexunit testing on headless Ubuntu 14.04

Posted by Christofer Dutz <ch...@c-ware.de>.
Hi Andreas,

a "solution" in which Flexmojos doesn't complain about a return code 1 sounds like a reasonable solution as long as you have to explicitly turn it on and it is not on by default. Ideally when running on Linux and encountering this problem it would be good if a message was presented to the user telling him about the option.

So if you would issue a PullRequest, I could include this in the upcoming 7.1 release (Have to process one or two PRs so one more doesn't matter).

Linux+Flash really gave me quite a lot of bad days and problems you have here are sort of my Kryptonite :-(
Would be glad to hear of others that managed to solve this type of problem.

Chris

________________________________________
Von: tjajab <an...@gmail.com>
Gesendet: Freitag, 5. September 2014 13:21
An: users@flex.apache.org
Betreff: Flexmojos flexunit testing on headless Ubuntu 14.04

Hi,

I am using Flexmojos (6.0.1) to compile and test my swf application. It
works fine on my Windows machine, however when trying to run it a Vagrant
box with Ubuntu 14.04 (64-bit + xvfb), it sometimes fails due to the Flash
player gives an error (1) while closing.

I have not managed to get any debug information regarding the actual error,
except that I see the following errors every time the flashplayer closes
(even when the build succeeds, it seems):
GLib-GObject-WARNING **: instance with invalid (NULL) class
pointer
GLib-GObject-CRITICAL **: g_signal_handlers_disconnect_matched: assertion
'G_TYPE_CHECK_INSTANCE (instance)' failed

All the test runs and succeeds, and it has nothing to do with the Xauthority
problems I saw in some other tests. I did a small change in
AsVmLauncher.java in the flexmojos-tester package (simply added return code
1 as an accepted return code), and then everything works and I get my
ordinary test coverage reports. I however realize that 1) This is not a good
solution, as the return code 1 may indicate a more serious error, and 2)
This is probably nothing that can be fixed in the flexmojos package, as it
seems to be the flashplayer on Ubuntu 14.04 64-bit that is the problem.

I post the question for two reasons:
1) Would it make sense to add a flag to actually continue on return code 1,
as I have found no way to get the flashplayer to close normally every time.
I can do a PR on this if it seems like a reasonable solution.
2) If anyone else has this problem, have you found a way to get around it?
Is it a race condition of some kind? I've tried both the built-in xvfb-run
and to have an xvfb server running before the test starts. It seems that
when I have a server running before starting the build it actually succeeds
sometimes, although it was I while since I could reproduce that.

BTW, the flashplayer I use is located at
http://fpdownload.macromedia.com/pub/flashplayer/updaters/11/flashplayer_11_sa_debug.i386.tar.gz

Best regards,
Andreas



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Flexmojos-flexunit-testing-on-headless-Ubuntu-14-04-tp7894.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.