Giter VIP home page Giter VIP logo

Comments (16)

makc avatar makc commented on August 25, 2024

All aboard PR train bandwagon, remember this thing? Calling @bortsen, jump on 🚋 🚋 🚋 choo choo!

from as3swf.

makc avatar makc commented on August 25, 2024

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.

doublefx avatar doublefx commented on August 25, 2024

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.

claus avatar claus commented on August 25, 2024

Reminder: Flash is dead.

/ducks/

from as3swf.

makc avatar makc commented on August 25, 2024

Is that official mozilla statement?

from as3swf.

claus avatar claus commented on August 25, 2024

Official Wahlers PSA. Please contact my PR department for further inquiries.

from as3swf.

doublefx avatar doublefx commented on August 25, 2024

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.

makc avatar makc commented on August 25, 2024

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.

claus avatar claus commented on August 25, 2024

Does mxmlc compile classes into separate DoABCs in release builds?

from as3swf.

makc avatar makc commented on August 25, 2024

@claus there's optimize=false that can probably do it. do you think his code fails when there is just 1 tag?

from as3swf.

claus avatar claus commented on August 25, 2024

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.

doublefx avatar doublefx commented on August 25, 2024

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.

doublefx avatar doublefx commented on August 25, 2024

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.

doublefx avatar doublefx commented on August 25, 2024

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.

claus avatar claus commented on August 25, 2024

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.

doublefx avatar doublefx commented on August 25, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.