Comments (16)
All aboard PR train bandwagon, remember this thing? Calling @bortsen, jump on 🚋 🚋 🚋 choo choo!
from as3swf.
Btw @doublefx this part
I use the very well done as3-commons-reflect and as3swf libs to reflect and emit the Worker and its dependencies
I mean dependencies part, sounds interesting. Maybe I could borrow some code there :)
from as3swf.
hehe, yes, I remember the @Borsten work but unfortunately didn't work for my use cases, the reason why I did that.
It's up to you to use and borrow what you want indeed ;-)
from as3swf.
Reminder: Flash is dead.
/ducks/
from as3swf.
Is that official mozilla statement?
from as3swf.
Official Wahlers PSA. Please contact my PR department for further inquiries.
from as3swf.
Hi guys, I take the opportunity this ticket is still open to ask you about a bug I'm facing, I can't debug it because it happens only on releases (-debug=false), so, I guess it should be something obvious but I still didn't get it, this is the stack trace:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at com.codeazur.as3swf::SWFTimelineContainer/publishTag()
at com.codeazur.as3swf::SWFTimelineContainer/publishTags()
at com.codeazur.as3swf::SWF/publish()
at com.doublefx.as3.thread.util::WorkerFactory$/getWorkerFromClass()
at com.doublefx.as3.thread::Thread()
at Main/windowCompleteHandler()
at Main/___Main_WindowedApplication1_windowComplete()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()
at spark.components::WindowedApplication/enterFrameHandler()
And how I construct the swf https://github.com/doublefx/easyWorker/blob/master/API/src/main/flex/com/doublefx/as3/thread/util/WorkerFactory.as
Any advices would be very appreciated.
Thanks,
Fred.
from as3swf.
you probably can debug it if you place a bunch of trace()-s in with line numbers in publishTag/s methods and then use omit-trace-statements=false (mxmlc). I have never done it, might not work - use some other logging method then.
from as3swf.
Does mxmlc compile classes into separate DoABCs in release builds?
from as3swf.
@claus there's optimize=false that can probably do it. do you think his code fails when there is just 1 tag?
from as3swf.
Not sure (at all, it's just a wild guess), but that worker thingie seems to expect classes to be in separate DoABCs.
from as3swf.
Thanks for the advices guys, I found it:
That's because of the -optimize=true set when -debug=false, doing optimize=false solve the problem but still, I don't think the users will like this, any way I can fix it differently ?
The runtime error wasn't because of it but because of "
SWFTimelineContainer:308: trace("WARNING: publish error: " + e.message + " (tag: " + tag.name + ")");"
tag and rawTag are null when optimize=true
from as3swf.
but that worker thingie seems to expect classes to be in separate DoABCs.
Humm , not sure I've got that one, can you explain ?
from as3swf.
Also, I noticed I've got some "FATAL: publish error: No raw tag fallback" still from the same function when -debug=true and optimize=false, nothing visible I've been able to noticed but I wonder if at time it will shows side effects
from as3swf.
Not sure where to start.. You give WorkerFactory.getWorkerFromClass
a clazz parameter, which is your worker class. It then scans all tags in the SWF for DoABC tags (those contain the ActionScript byte code) and checks if one of them has a name equal to your clazz. It then takes that tag (amongst others), puts it into a new SWF and publishes that SWF in memory so you can use that as your worker.
This obviously only works when the compiler compiles all your classes into separate DoABC tags. If -optimize=true
, the compiler compiles all of your classes into one big DoABC tag, so WorkerFactory.getWorkerFromClass
can't find your worker class. That's why you have to compile with -optimize-false
, and i'm afraid there's little you can do about it.
Now, that runtime error you get is probably (again, wild guess) because you still invoke WorkerFactory.getWorkerFromClass with the debug parameter set to true. This code: https://github.com/doublefx/easyWorker/blob/master/API/src/main/flex/com/doublefx/as3/thread/util/WorkerFactory.as#L117 should probably be something like if (debug && debugTag) swf.tags.push(debugTag);
to prevent that. Again, not tested, so it might be something else.
Finally, that FATAL publish error you get is just a consequence of a tag being null, because as the SWF is created dynamically, there are no raw tags to fall back to.
from as3swf.
Thanks for the explanation, didn't know it was only one DoABC tag when optimized even if I should have guessed it :P and I don't want to copy the entire swf in memory, so, it will be to the users to decide if they still want to use my lib setting optimize=false even for releases.
should probably be something like if (debug && debugTag) swf.tags.push(debugTag); to prevent that.
You was right.
Thanks again.
from as3swf.
Related Issues (20)
- [Bug] Matrix rotation format needs to be in radians HOT 1
- [Bug]Unknown fill style type: 0x63, Tag: DefineMorphShape2, Index: 4 HOT 1
- defineShape3 - defineFont3
- Include actionScript HOT 3
- Unknown fill style type: 0x5f HOT 2
- Info HOT 1
- How to export Embeds ? HOT 1
- TagProductInfo.compileDate doesn't works with AIR SDK and ASC2 compiler HOT 5
- how to write a definesprite to a swf
- 求大神指教如何把一段影片剪辑写入到swf文件中 HOT 3
- Scripts on Timeline HOT 6
- NetStream HOT 7
- Position of path incorrect when exporting as SVG
- fontHeight not read while hasFontClass is true in TagDefineEditText HOT 2
- Info HOT 1
- Parse DefineBitsLossless into a BitmapData HOT 5
- TagDefineBitsLossless2 gives wrong value for the format in toString
- Missing vows for LTS HOT 1
- How to create Shape from Bitmap?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from as3swf.