AS3 -- VerifyError: Error #1033: Cpool entry 1 is wrong type

已查看 207 次
跳至第一个未读帖子

seacloud9

未读,
2009年7月23日 12:15:112009/7/23
收件人 SWX: The Native Data Format for Adobe Flash
I have a few questions I am new to SWX and I am using Twitter
Services. (SWX 2 Beta 1)
VerifyError: Error #1033: Cpool entry 1 is wrong type.
ReferenceError: Error #1065: Variable swxResponse is not defined.

Using Flash Player 10 Debugger, Flex 3 Latest Version
ActionScript3 Format / AMF3
SWX server passes all tests and I can communicate to Twitter via
service explorer and everything works.

I have fiddler installed and haven't seen anything out of the
ordinary. It goes and fetches the data.swf

It seems to be having troubles loading it it gets to line 230 in
External Assest.as (when debugging with flex)
Pops the errors right after line 230 which is -> _loader.loadBytes
(_urlLoader.data);

I am throughly stumped I know this is wicked cool for AS2/Flash Lite
but I really need mine to work with as3. Any hacks, suggestions,
guidance would be awesome!!!

I have also noticed on occasion I will get ->
VerifyError: Error #1107 : The ABC data is corrupt, attempt to read
out of bounds -- Although that seems to no longer occur and now I just
get the other error.


private function onLoadComplete(e:Event):void
{

echo("ExternalAsset loaded");

timeoutTimer.stop();

_loaded = true;
_loading = false;
// Dispatch an event now in case someone needs it.
dispatchEvent(new SWXLoadedNotReadyEvent());
// try to parse result
try
{
_loader = new Loader();
_loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR,
onIOError);
_loader.contentLoaderInfo.addEventListener(Event.INIT,
onMovieReady);
--------------------------------_loader.loadBytes(_urlLoader.data);
------------------------------------ Seems to fail after this point
}
catch(e:Error)
{
// unable to parse
dispatchEvent(new SWXFaultEvent( { error:true, code: -1,
message:'Unable to parse content: ' + e.message } ));

}

}



Code In Question:
import com.SampleTitleWindow;
import mx.events.MenuEvent;
import mx.controls.Alert;
import mx.collections.*;
import mx.managers.PopUpManager;
import mx.controls.Alert;
import org.swxformat.*;
import nl.demonsters.debugger.MonsterDebugger;
import flash.events.IOErrorEvent;
import flash.events.EventDispatcher;
import flash.events.SecurityErrorEvent;
public var swx:SWX = new SWX();
//public var d:MonsterDebugger = new MonsterDebugger(this);
public var username:String = new String("seacloud9"); // your name
use to login Twitter
public var pass:String = new String("test") ; // your pass, this is
example
public var userID:String = new String("14421804");
public var msg:String= new String("Hi all! I Sent a message from
Flash SWX to Twitter");
public var nil:String = new String(null);
public var argumentArray:Array = new Array(null, null, username,
40, null );
public var callUserTimeLine:Object = new Object();
public function initSWX():void {
swx.gateway="http://i-create.org/SWX/php/swx.php";
swx.encoding = "GET";
swx.timeout = 30;
swx.debug = true;
swx.resultHandler = resultUserTimeLineHandler;
swx.progressHandler = progressHandler;
swx.timeoutHandler = timeoutHandler;
swx.faultHandler = faultHandler;
initUserUpdates();
}


public function initUserUpdates():void
{
callUserTimeLine = {
serviceClass: "Twitter",
method: "userTimeline",
args: [nil,nil,username,40,nil],
timeout: 5,
resultHandler: resultUserTimeLineHandler,
progressHandler: progressHandler,
timeoutHandler: timeoutHandler,
debug:true
};
try
{
//var myFunction = function () : void { swx.call
(callUserTimeLine); };
//myFunction();
swx.call(callUserTimeLine);
//swx.call(callUserTimeLine);
trace(callUserTimeLine);
}
catch(e:Error)
{
trace("Error: " + e.message);
}
}
public function progressHandler(event:Object):void
{
trace("progressHandler: " + event.bytesLoaded + " of "
+ event.bytesTotal + "<br>");
}

public function timeoutHandler(event:Object):void
{
trace("Call timeout. Please try again.<br>");
}

public function faultHandler(event:Object):void
{
trace("Call fault. Please try again.<br>"+
event.fault.message);
}
public function resultPostHandler(event:Object):void {
// Display the text property of the first result.
trace("This is it:"+event.result[0]);
}
public function resultUserTimeLineHandler(event:Object):void {
trace("madeITHereTOOO");
trace("I was Called" + event);
//var loader:Loader = new Loader();
//loader.load(new URLRequest("data.swf"));

// Display the text property of the first result.
trace("This is it:" + event.result[0].text);
//funBus.text = event.result[0];
for (var i:Number = 0; i < event.result.length; i++ )
{
//userPosts.dataProvider = event.result[i].text;
trace(event.result[i].text);
//funBus.text = event.result[i].text;
}
}

Ben Lagoutte

未读,
2009年7月26日 19:08:352009/7/26
收件人 swx-f...@googlegroups.com
Hi,

These errors (cpool, abc data) indicates the server is not generating
the right code for the swx response.

Which version of PHP are you running ?

Ben

seacloud9

未读,
2009年7月26日 23:44:142009/7/26
收件人 SWX: The Native Data Format for Adobe Flash
PHP Version 5.2.6

It runs in the explorer but nothing else seems to work.

Ben Lagoutte

未读,
2009年7月27日 01:48:292009/7/27
收件人 swx-f...@googlegroups.com
5.2.6 should work well.

I've never come across this issue to be honest.. could something be
interfering with the transmission of data??

What kind of data are you sending from the server, anything data type
out of the ordinary?

Ben

seacloud9

未读,
2009年7月27日 02:34:332009/7/27
收件人 SWX: The Native Data Format for Adobe Flash
I don't believe I am doing anything out of the norm.
Now I back to ->


swx.gateway="http://i-create.org/SWX/php/swx.php";
swx.encoding = "GET";
swx.timeout = 30;
swx.debug = true;
swx.resultHandler = resultUserTimeLineHandler;
swx.progressHandler = progressHandler;
swx.timeoutHandler = timeoutHandler;
swx.faultHandler = faultHandler;
swx.initializeCrossDomain(stage.loaderInfo.url);
initUserUpdates();

swx.Twitter.userTimeline(['seacloud9','XXXXXXX'],
resultUserTimeLineHandler);

Never gets to the resultUserTimeLineHandler.

Like I said the explorer works because it accesss the Serivce directly
with AMFPHP but I am using the gateway it says it works etc.. I am
simply not able to get it to go. Is there anything I am missing here?


[Fault] exception, information=VerifyError: Error #1107: The ABC data
is corrupt, attempt to read out of bounds. --------------EPIC
FAIL!!!!

Ben Lagoutte

未读,
2009年7月27日 02:37:462009/7/27
收件人 swx-f...@googlegroups.com
Do you get the same error if you use the public gateway (http://swxformat.org/php/amf.php
) ?

Ben

seacloud9

未读,
2009年7月28日 10:02:182009/7/28
收件人 SWX: The Native Data Format for Adobe Flash
I looks like when I go to http://swxformat.org/php/swx.php I receieve
Error #2044: Unhandled StatusEvent:. level=error, code=
an error but it does the post. When I run on my own platfrom with
PHP 5.2.6, CURL, etc.. I receive VerifyError: Error #1107: The ABC
data is corrupt, attempt to read out of bounds. On both the home
server I get an error and on swxformat.org I recieve a different
error. Both cases they do actually post to twitter. I had thought it
might be a domain issue although this also happens on my server. I
can send messages but I cannot receive them. Like userTimeline unless
I actually use the service explorer. I also recieve this error when
opening the data.swf file directly. Any advice on this issue would be
greatly appreciated.
> ...
>
> read more »

seacloud9

未读,
2009年7月28日 11:11:482009/7/28
收件人 SWX: The Native Data Format for Adobe Flash
I have also noticed with the default examples on google code(flex) I
receive Error #2044: Unhandled StatusEvent:. level=error, code= both
from the community swxfromat.org and my own gateway after the code has
been excuted.

I am currently working with Flex3/Flash Player 10.


On Jul 28, 9:02 am, seacloud9 <brendon.smi...@gmail.com> wrote:
> I looks like when I go tohttp://swxformat.org/php/swx.phpI receieve
> ...
>
> read more »

Ben Lagoutte

未读,
2009年7月30日 00:46:062009/7/30
收件人 swx-f...@googlegroups.com
Hi,

Sorry I can't be of much help - your issue is a bit unheard of...

It really look as if your server is somehow generating a corrupted
swf response.. why, i'm not sure.

Do you have any extensions out of the ordinary installed? could you
put a phpinfo page to have a look?

can you email back an example of a corrupted data.swf file and i'll
have a look at it (not sure what that'll tell me though)

Ben
回复全部
回复作者
转发
0 个新帖子