Closed GoogleCodeExporter closed 9 years ago
Original comment by ihatelivelyids
on 14 Dec 2011 at 4:20
Have modified the Run.mxml to get it past the exception, it does then throw a
VerifyError.
try{
proxyFactory.generateProxyClasses();
}
catch(e:*){
trace(e);
}
finally{
trace("got past the error");
}
/usr/lib/jvm/java-6-sun-1.6.0.24/jre/bin/java
-Dapplication.home=/common/flex_sdk_4.5.1.21328 -Xmx384m
-Dsun.io.useCanonCaches=false -Djava.awt.headless=true -Duser.language=en
-Duser.region=en -Xmx1024m -classpath
/big/idea-IU-111.69/plugins/flex/lib/idea-fdb-4.5.0.20967-fix.jar:/common/flex_s
dk_4.5.1.21328/lib/fdb.jar flex.tools.debugger.cli.DebugCLI
Adobe fdb (Flash Player Debugger) [build 21328]
Copyright (c) 2004-2007 Adobe, Inc. All rights reserved.
Waiting for Player to connect
Player connected; session starting.
[trace] Warning: Ignoring 'secure' attribute in policy file from
http://fpdownload.adobe.com/pub/swz/crossdomain.xml. The 'secure' attribute is
only permitted in HTTPS and socket policy files. See
http://www.adobe.com/go/strict_policy_files for details.
[trace] Error: Ignoring policy file at
http://fpdownload.adobe.com/crossdomain.xml due to meta-policy
'by-content-type'.
[trace] TypeError: Error #1009: Cannot access a property or method of a null
object reference.
[trace] got past the error
[Fault] exception, information=VerifyError: Error #1047: No entry point was
found.
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.RangeCheck(ArrayList.java:547)
at java.util.ArrayList.get(ArrayList.java:322)
at flash.tools.debugger.concrete.DManager.getFrame(DManager.java:669)
at flash.tools.debugger.concrete.PlayerSession.pullUpActivationObjectVariables(PlayerSession.java:1106)
at flash.tools.debugger.concrete.PlayerSession.requestFrame(PlayerSession.java:1084)
at flash.tools.debugger.concrete.PlayerSession.getValue(PlayerSession.java:1199)
at flex.tools.debugger.cli.ExpressionContext.memberNamed(ExpressionContext.java:430)
at flex.tools.debugger.cli.ExpressionContext.locateParentForNamed(ExpressionContext.java:532)
at flex.tools.debugger.cli.ExpressionContext.determineContext(ExpressionContext.java:482)
at flex.tools.debugger.cli.ExpressionContext.resolveToVariable(ExpressionContext.java:342)
at flex.tools.debugger.cli.ExpressionContext.lookup(ExpressionContext.java:161)
at flash.tools.debugger.expression.DebuggerEvaluator.evaluate(DebuggerEvaluator.java:160)
at macromedia.asc.parser.ThisExpressionNode.evaluate(ThisExpressionNode.java:34)
at flash.tools.debugger.expression.DebuggerEvaluator.evaluate(DebuggerEvaluator.java:1029)
at macromedia.asc.parser.ListNode.evaluate(ListNode.java:44)
at flash.tools.debugger.expression.DebuggerEvaluator.evaluate(DebuggerEvaluator.java:1029)
at macromedia.asc.parser.ListNode.evaluate(ListNode.java:44)
at flash.tools.debugger.expression.DebuggerEvaluator.evaluate(DebuggerEvaluator.java:1063)
at macromedia.asc.parser.ExpressionStatementNode.evaluate(ExpressionStatementNode.java:50)
at flash.tools.debugger.expression.DebuggerEvaluator.evaluate(DebuggerEvaluator.java:1304)
at macromedia.asc.parser.ProgramNode.evaluate(ProgramNode.java:80)
at flash.tools.debugger.expression.DebuggerExpression.evaluate(DebuggerExpression.java:105)
at flex.tools.debugger.cli.ExpressionCache.evaluate(ExpressionCache.java:104)
at flex.tools.debugger.cli.DebugCLI.evalExpression(DebugCLI.java:3677)
at flex.tools.debugger.cli.DebugCLI.evalExpression(DebugCLI.java:3669)
at flex.tools.debugger.cli.DebugCLI.doPrint(DebugCLI.java:3595)
at flex.tools.debugger.cli.DebugCLI.processLine(DebugCLI.java:6580)
at flex.tools.debugger.cli.DebugCLI.process(DebugCLI.java:737)
at flex.tools.debugger.cli.DebugCLI.execute(DebugCLI.java:579)
at flex.tools.debugger.cli.DebugCLI.main(DebugCLI.java:376)
Original comment by sentimen...@gmail.com
on 14 Dec 2011 at 6:32
Also (using svn->hg) I'm using the head/tip from the source repository.
changeset: 1370:bff7b615921a
tag: tip
user: scab@dds.nl@9e4d646c-04d2-11de-9a48-596ebbf2fbe4
date: Wed Dec 14 16:15:36 2011 +0000
files:
as3-commons-bytecode/src/main/actionscript/org/as3commons/bytecode/reflect/ByteC
odeTypeCache.as
as3-commons-bytecode/src/main/actionscript/org/as3commons/bytecode/reflect/ByteC
odeTypeProvider.as
description:
made ByteCodeTypeCache and ByteCodeTypeProvider final
Original comment by sentimen...@gmail.com
on 14 Dec 2011 at 6:35
/home/bryan/.m2/repository/org/as3commons/as3commons-bytecode/1.1-SNAPSHOT/as3co
mmons-bytecode-1.1-SNAPSHOT.swc
Original comment by sentimen...@gmail.com
on 14 Dec 2011 at 6:36
Ok, there's a number of things that are wrong, some of mine are bugs, so they
need to be looked into.
First of all, it is necessary to populate the BytecodeType cache by parsing the
loaderInfo, so this line was missing at the start:
ByteCodeType.fromLoader(FlexGlobals.topLevelApplication.loaderInfo);
Without this the bytecode library can't generate any proxy classes because it
doesn't have the type information.
Secondly, your proxyFactory.defineProxy() invocation looks like this:
proxyFactory.defineProxy(TracingInterceptor,
BasicMethodInvocationInterceptor,ApplicationDomain.currentDomain);
You want to proxy the LoginService class, not the interceptor.
Thirdly, I found out that the library has problems parsing and proxying classes
in the default package, so I moved TracingInterceptor and LoginService to a
package called 'classes'.
And lastly, once that is changed the proxying works, but crashes in your
interceptor because of this line:
trace("{0} was invoked with parameter {0}", invocation.targetMember,
invocation.arguments[0]);
The method you are calling on the LoginService has no arguments, so this line
leads to an RTE.
There was a small bug in the bytecodetypecache as well which I could fix
quickly, I have deployed a new 1.1-SNAPSHOT so if you update your repository
you'll get the latest drop.
I have attached your run.mxml file that shows the changes I made.
Hope that helps, I'll try and look into the 'classes in the default package'
issue as soon as possible.
cheers,
Roland
Original comment by ihatelivelyids
on 14 Dec 2011 at 6:59
Attachments:
Roland, thanks for your awesome help. I'm going to put the sample project up
online so others can get a quick start. Will update this bug when it's so.
Original comment by sentimen...@gmail.com
on 14 Dec 2011 at 7:25
Hey there,
no problem, glad to help, thanks for sharing your sample with others!
cheers,
Roland
Original comment by ihatelivelyids
on 14 Dec 2011 at 7:46
Yeah bro, I've put my project up on:
https://bitbucket.org/sentimental/as3-commons-sample
If anyone else is starting out and encounters similar problems they can
download from there for a reality check.
Original comment by sentimen...@gmail.com
on 14 Dec 2011 at 7:54
thanks mate!
All help is appreciated, I'll add your sample to the site next time I update it.
cheers!
Roland
Original comment by ihatelivelyids
on 14 Dec 2011 at 8:16
Original issue reported on code.google.com by
sentimen...@gmail.com
on 14 Dec 2011 at 4:00Attachments: