4

I have an issue in which outdated code removed long ago code in an actionscript 2 class sometimes gets executed. I can tell this in that the application fails and trace statements removed long ago gets logged to a console.

The closest match I've come across is this post:

Flash CS4 refuses to let go

Here are the things I've tried

  • I have searched all source code in the project for the trace entry. It is not there.
  • I have searched an uncompressed debug-enabled version for the trace entry. It is not there.
  • I have decompiled the compiled version and searched that. It is not there.
  • I have deleted all ASO files and tried to recompile.
  • I have not been able to reliably reproduce the conditions in which the situation arises. I've testet 700 times in a row (yes - sevenhundred times - this is a high profile project) and it would not occur. Then tested another time and it occured. No difference in my approach to testing.
  • I have compiled on another, freshly installed machine. No difference.
  • I have ruled out that it may relate to timestamps since I've tried to compile locally and w/o version control.
  • I have tried yelling, crying, begging, ignoring and threatening Flash with unspeakable acts of doing but to no avail.
  • It seems to be isolated to a single class. All other classes behave as expected and everything is fine until I get to the class in question. Then fail is all around.

Still - sometimes I see code that has been long gone removed being executed and trace statements that no longer exists being logged while others that should appear doesn't.

This is a critical issue I need to resolve.

Any and all help will be greatly appreciated.

Thanks in advance,

Thomas

Community
  • 1
  • 1
Thomas
  • 93
  • 4
  • If it's a caching issue it shouldn't happen on another machine. Still I think that's your best chance to get rid of this issue. Make sure you carefully copy only source files to the new machine. Don't use source control for this and don't copy any compiled asset libraries containing code. -- My other guess is leprechauns living in your machine. They are quite resistant to yelling and threatening. – kapex Nov 11 '11 at 13:12

1 Answers1

0

Please do not despair. This sort of thing has happened to all of us before and eventually we discover the problem (usually its ours).

The best advice I can give you is to put a breakpoint prior to the crazy trace statements and hope for the debug to go through them.

As you said you searched for the trace statements, would it be possible for them to be on the action panel(timeline code)?

How is your code and .fla organized? Is everything in external .as files or is it embedded in the timeline?

And finally, are you performing any sort of reflection such as getClassByName() (in as2 eval("_global."+className))?

Also, to make sure it's not a caching issue, copy only the .fla and the associated .as files, and move it to either a new computer or a new folder and compile it using a different windows user (assuming u're using windows), that should be enough to get rid of all caching crazyness flash does.

felipemaia
  • 3,381
  • 1
  • 16
  • 14
  • Thank you for your reply. To answer your questions: – Thomas Nov 11 '11 at 19:33
  • Thank you for your reply. To answer your questions: The swf is loaded at runtime by a host swf which makes me resort to a remote tracer (Alcon) as my primary method of debugging it. All code is placed in external .as files and linked to movie clips in the library. There is no timeline code. I do not perform any sort of reflection. Although I've already tried I will have a go at a 'clean build' on another machine with another user. Further - I'll try to rename all classes and move the assets to a new .fla. I know it's exotic but I'm willing to try everything. Thanks again. – Thomas Nov 11 '11 at 19:40
  • Does your host swf or any other loaded swf has a class with a similar name? If so the class could be being replaced depending on how you're performing the load. Also, would it be possible to debug the problematic swf on its own? Cause there could be 2 problems, 1 is Flash is somehow compiling the project incorrectly due to a cache error or something, and 2 is the host or other swfs messing with each other. – felipemaia Nov 11 '11 at 19:54
  • No, I've taken great care to ensure that there are no colliding namespaces across any SWF's used in the project since I have encountered that the hard way before :O) As of now I am leaning towards your suggestion that it may somehow gets compiled incorrectly. I know it's unlikely but I have ruled out virtually all other possibilities. I haven't had a chance to test a clean build yet but will ASAP. Thanks again for your time. – Thomas Nov 12 '11 at 07:49
  • I tried again to move all sources from a network share to my local computer; moved the source out of version control; renamed all classes used; moved all assets to a new .fla. Since the client has not returned with a report on the issue for close to 14 days now I am pretty optimistic. Thanks very much for the help - it is greatly appreciated. – Thomas Nov 25 '11 at 10:44