Copy link to clipboard
Copied
Hi,
release notes for 11.5 indicate that the non-debug version of the player can provide stack traces now, but I don't see them. Do I need to do something special to access them?
Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/536.26.17 (KHTML, like Gecko) Version/6.0.2 Safari/536.26.17
Player version: 11.5.502.136
Mac OS 10.7.5 (64-bit)
The release notes I'm referring to: http://forums.adobe.com/message/4827339
Hi,
Please make sure your SWF is published as version 18. As indicated in the following document, this feature is available only for SWF version 18 and above.
http://www.adobe.com/devnet/articles/flashplayer-air-feature-list.html
Please also note that the stack traces generated in the non-debug version of the player will only show method names. For full stack trace info including file name and line numbers, a debug version of the player (see Content Debuggers available for download here: http://www.adobe.com/support/flashplayer/downloads.html
...Copy link to clipboard
Copied
Hi,
Please make sure your SWF is published as version 18. As indicated in the following document, this feature is available only for SWF version 18 and above.
http://www.adobe.com/devnet/articles/flashplayer-air-feature-list.html
Please also note that the stack traces generated in the non-debug version of the player will only show method names. For full stack trace info including file name and line numbers, a debug version of the player (see Content Debuggers available for download here: http://www.adobe.com/support/flashplayer/downloads.html) is required in addition to the SWF itself being published as a debug SWF.
Here's a sample usage of the feature:
package
{
import flash.display.Sprite;
import flash.text.TextField;
public class StackTraceTestCase extends Sprite
{
public var console:TextField = new TextField();
public function StackTraceTestCase()
{
console.width = stage.stageWidth;
console.height = stage.stageHeight;
console.border = true;
this.stage.addChild(console);
foobar1();
}
private function foobar1():void {
foobar2();
}
private function foobar2():void {
foobar3();
}
private function foobar3():void {
foobar4();
}
private function foobar4():void {
foobar5();
}
private function foobar5():void {
try {
var myVar:String = null;
/*
* This results in Null Reference error.
*/
console.appendText(myVar.toString());
} catch ( error:Error ) {
console.appendText(error.getStackTrace());
}
}
}
}
And the output generated by the non-debug version of the player:
TypeError: Error #1009
at StackTraceTestCase/foobar5()
at StackTraceTestCase/foobar4()
at StackTraceTestCase/foobar3()
at StackTraceTestCase/foobar2()
at StackTraceTestCase/foobar1()
at StackTraceTestCase()
Copy link to clipboard
Copied
Hi vilee,
thanks for your response. The automatic next question is -- what exactly is SWF version? How does it impact backwards compatiblity? If I build for SWF version 18, will my SWF work in the player version 10? I can't seen to find a definite resource answering this question.
Thanks!
-m
Copy link to clipboard
Copied
Hi m,
>>> what exactly is SWF version?
From http://www.senocular.com/flash/tutorials/versions/ :
"""
* SWF versions represent the target or minimum Flash Player version that the SWF is designed to run in.
* Flash Player uses SWF versions primarily for compatibility. This comes in the form of determining feature behavior and the exposure of version-specific ActionScript APIs.
* For feature behavior, Flash Player uses a SWF's version to ensure content does not change as new versions of Flash Player are released.
* In terms of ActionScript APIs (ActionScript 3.0 only), Flash Player uses the SWF version to know what APIs should be exposed to a SWF.
"""
>>> If I build for SWF version 18, will my SWF work in the player version 10?
From http://blogs.adobe.com/airodynamics/2011/08/16/versioning-in-flash-runtime-swf-version :
"""
Flash Player – When Flash Player identifies content that is newer than itself (defined by the SWF version) it attempts to run the content as best it can, but eventually fails if the content tries to use features that don’t exist in that version of the player.
"""
In this case, content that's built for SWF version 18 will most probably fail to load in Flash Player version 10, but will run correctly in Flash Player 11.5 (see below table).
Here's more detailed info on SWF versioning and which version to use when targeting Flash Player:
From http://www.bytearray.org/?p=4848
"""
Flash Player version Adobe AIR version SWF version
9.0.115.0 NA 9
10.0 1.5 10
10.1 2.0 10
10.2 2.6 11
10.3 2.7 12
11 3.0 13
11.1 3.1 14
11.2 3.2 15
11.3 3.3 16
11.4 3.4 17
11.5 3.5 18
11.6 3.6 19
"""
Kind regards,
Vincent
Copy link to clipboard
Copied
This is an old thread, but thought I'd ping you to see if you may know why this doesn't want to work on an adobe air apk deployed on android. It works fine testing on the desktop, but on device it just hangs on the error and the textfield is never written to.