开发者

VerifyError out of the blue. Help!

I'm the developer of ShellShock Live, a free online artillery game: http://www.newgrounds.com/portal/view/564049

开发者_开发问答Everything has been running smoothly, but every once in a while for a period of 4 hours or so, hundreds of "VerifyError: Error #1026" will show up in my error log. Then, they will stop.

I looked into VerifyError and found that "The VerifyError class represents an error that occurs when a malformed or corrupted SWF file is encountered." The SWF on Newgrounds is just small loader SWF that loads the full game SWF from another site, so there must be a problem there. I'm stumped, because the game will run fine for days, and then just start getting these errors out of the blue, after no changes to either SWF.

ShellShock has hundreds of players online at any given moment, so I would like to fix this ASAP. Any help would be appreciated! Thank you!


I know the original post is a couple of years old but since I've just spent many days trying to work around a similar issue, and since this thread does not contain what I believe is the correct explanation I'll post the conclusions of my own investigation here, for anyone else to use:

The VerifyError events are almost certainly being logged because the loader SWF on NewGrounds targets a lower Flash Player version than that of the game SWF that causes this error.

The Flash Player on the user's system will accept the NewGrounds SWF loader because it targets a version equal to or lower than the version installed. After that, an external SWF that targets a higher Flash Player version can be loaded without any complaint from the Flash Player, unless it tries to access unavailable features in that Flash Player, and then it will throw the VerifyError.

The sporadic nature of this problem, in 4-hour surges, is likely related to the different penetration of later Flash Player versions in different parts of the world (and hence different time zones). During very active periods of casual gaming (weekends and evenings?) in countries with low penetration of recent Flash Player versions you will likely see batches of these VerifyErrors logged.

The bad news is that after many days of trying to find a workaround for this very problem we have been unable to find any way to catch the VerifyError. It does not even get caught by an UncaughtErrorEvent handler!

The only thing I can suggest that might help in your case (not mine, unfortunately) is to determine the target version of the NewGrounds loader SWF (check the 4th byte in the SWF) then do one of the following :

  • Compile your game to target the same version of Flash Player as the loader targets. That way you can be sure that if the NewGrounds loader SWF is successfully loaded into the user's Flash Player your SWF will also work in that version without problem, or

  • In the initialization code of your game, check the Capabilities.version to determine the Flash Player version installed on the user's system and use that to branch control so that advanced Flash Player features are only used in appropriate Flash Player versions.

In my case I have access to the loader code, but not the code of the thousands of SWFs it loads. Since the external SWFs are stenciled into copies of the loader SWF as ByteArrays I can check the SWF's Flash Player target version byte (byteArray[3]), and compare it to the installed Flash Player 'major.minor' version obtain from Capabilities.version, but since SWF Flash Player target version bytes are (currently) incremented with every minor version increment of the Flash Player, it is impossible to map the SWF target byte (byteArray[3]) to future Flash Player 'major.minor' versions, until we know what the maximum minor version number of the current Flash Player will be.

Hope anyone else encountering this will have better luck than we did.


I think it may be a flash player error, try disabling any graphics acceleration or caching. It may be helpful to figure our what graphic card they are using.

Have you made changes to your socket server? Are you using like smarfoxserver?


I had this error in a very small project with cs3 flash9. So I was able to track this error down.

NOTE: this error is emitted incorrectly. The reason the error was emitted in my project was NOT because of a faulty swf because I do not import any swf into my project.

REASON: I had a code line written like this: _mc.my_counter && _mc.my_counter--;

SOLUTION: I changed the line to this: if(_mc.my_counter) _mc.my_counter--;

... and the verify error message was gone as fast as it appeared. Looks like this is a real as3 bug.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜