View unanswered posts | View active topics



Reply to topic  [ 12 posts ] 
Intermittent bug: Worker class not found 
Author Message
Member

Joined: Tue Aug 31, 2010 1:39 pm
Posts: 134
Reply with quote
Well, this bug is very annoying and doesn't follow any pattern (that I have noticed).

Sometime is compiles OK, sometimes doesn't.
Cleaning the project doesn't seems to change anything, as it compiles (or fails to compile) randomly.

Image

I've tried fresh installs, Flex/AIR SDK updates/overlays, different Flashplayers and compile versions (from 11.4 to 11.9), with ASC and ASC2.

Isolating the problem is very easy:
Code:
package
{
   import flash.display.Sprite;
   import flash.system.Worker;
   
   public class Main extends Sprite
   {
      public function Main()
      {
         
      }
   }
}


This is enough to print "Warning: Definition flash.system.Worker could not be found." at the console.

_________________
"Tu deviens responsable pour toujours de ce que tu as apprivoisé" - Antoine de Saint-Exupéry


Thu Dec 12, 2013 2:33 pm
Profile WWW
Admin

Joined: Wed Aug 31, 2005 7:27 am
Posts: 12172
Location: London
Reply with quote
Are you using consts as default fields values?
ie.
Code:
function foo(a:String = MyConst.VALUE)

This is a known source of random compiler errors - replace with literal values.


Sun Dec 15, 2013 9:36 pm
Profile WWW
Member

Joined: Tue Aug 31, 2010 1:39 pm
Posts: 134
Reply with quote
Hi, Phillipe.

No, I'm not.
As I said, that simple class I posted back there is enough to trigger the bug.

_________________
"Tu deviens responsable pour toujours de ce que tu as apprivoisé" - Antoine de Saint-Exupéry


Mon Dec 16, 2013 5:04 pm
Profile WWW
Member

Joined: Tue Aug 31, 2010 1:39 pm
Posts: 134
Reply with quote
Updated FD to 4.6.0.30 (devel) and the problem persists...

ps: That "Threads" panel is really nice!

_________________
"Tu deviens responsable pour toujours de ce que tu as apprivoisé" - Antoine de Saint-Exupéry


Thu Jan 09, 2014 8:50 pm
Profile WWW
Admin

Joined: Wed Aug 31, 2005 7:27 am
Posts: 12172
Location: London
Reply with quote
Does it happen if you compile from the command line?


Fri Jan 10, 2014 12:04 pm
Profile WWW
Member

Joined: Tue Aug 31, 2010 1:39 pm
Posts: 134
Reply with quote
Do you mean calling mxmlc-cli directly?
Never tried... What should I do?

_________________
"Tu deviens responsable pour toujours de ce que tu as apprivoisé" - Antoine de Saint-Exupéry


Fri Jan 10, 2014 3:25 pm
Profile WWW
Member

Joined: Thu Aug 30, 2007 8:33 pm
Posts: 10
Location: London
Reply with quote
Hiya.
I've got the same issue, only it's persistent at my end.
It only happens when I "Build Current File".
None of the
flash.system.Worker;
flash.system.WorkerDomain;
flash.system.WorkerState;
classes can be found.
Is there any fix for that?


Sun Mar 16, 2014 1:24 am
Profile WWW
Admin

Joined: Wed Aug 31, 2005 7:27 am
Posts: 12172
Location: London
Reply with quote
@DjKermit if you're using the QuickBuild you may have to set the needed FP version in Program Settings > AS3Context > Default Flash Version.


Mon Mar 24, 2014 3:52 pm
Profile WWW
Member

Joined: Thu Aug 30, 2007 8:33 pm
Posts: 10
Location: London
Reply with quote
@Philippe
Thanks for the reply.
I'd already set it to 11.9, unfortunately it didn't change anything.
I'm still getting the same errors.
Quote:
...ExampleTestWorker.as(4): col: 21 Error: Definition flash.system:Worker could not be found.


Mon Mar 24, 2014 4:02 pm
Profile WWW
Admin

Joined: Wed Aug 31, 2005 7:27 am
Posts: 12172
Location: London
Reply with quote
QuickBuild is basically like using mxmlc on the command line, disregarding your project properties - so you must be able to use it on the command line and provide the the needed arguments in the @mxmlc info in your code:
http://flashdevelop.org/wikidocs/index. ... QuickBuild


Mon Mar 24, 2014 4:05 pm
Profile WWW
Member

Joined: Thu Aug 30, 2007 8:33 pm
Posts: 10
Location: London
Reply with quote
@Philippe
That was mighty helpful. Thank you.


Mon Mar 24, 2014 4:29 pm
Profile WWW
Member

Joined: Wed Oct 16, 2013 11:30 am
Posts: 8
Reply with quote
My final build command is something like that
Code:
mxmlc-cli -load-config="D:\sdk\ascsdk.22/frameworks/flex-config.xml" -load-config+=obj\client-flashConfig.xml -swf-version=21 -frame 2 com.mycompany.Main com.mycompany.StaticAsset -o obj\client-flash636090531860182674

in both cases (successful and failed).

Messages:
  • Warning: Definition flash.display.JPEGEncoderOptions could not be found.
  • Warning: Definition flash.display.PNGEncoderOptions could not be found.
  • Error: Call to a possibly undefined method JPEGEncoderOptions.
  • Error: Call to a possibly undefined method encode through a reference with static type BitmapData.
  • Error: Call to a possibly undefined method PNGEncoderOptions.
  • Error: Call to a possibly undefined method encode through a reference with static type BitmapData.
  • Warning: Definition flash.system.Worker could not be found.
  • Error: Access of possibly undefined property Worker.
  • Error: Access of possibly undefined property shareable.
  • Error: Access of possibly undefined property shareable.
  • Error: Call to a possibly undefined method min through a reference with static type Number.
  • Error: Call to a possibly undefined method max through a reference with static type Number.
  • Error: Call to a possibly undefined method min through a reference with static type Number.
  • Error: Call to a possibly undefined method max through a reference with static type Number.
  • Error: Call to a possibly undefined method min through a reference with static type Number.

Approximately 1 of 3 builds fails and it's quite frustrating.


Mon Sep 12, 2016 4:58 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 12 posts ] 

Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.