突然出现验证错误。帮助!

发布于 2024-10-26 20:44:31 字数 495 浏览 1 评论 0原文

我是免费在线炮兵游戏 ShellShock Live 的开发者: http://www.newgrounds.com/portal/view/564049

一切都在运行顺利进行,但每隔一段时间大约 4 小时左右,数百个“VerifyError: Error #1026”就会出现在我的错误日志中。然后,他们就会停下来。

我查看了VerifyError,发现“VerifyError 类表示遇到格式错误或损坏的SWF 文件时发生的错误。” Newgrounds 上的 SWF 只是一个小型加载器 SWF,它从另一个站点加载完整的游戏 SWF,所以那里肯定有问题。我很困惑,因为游戏可以正常运行几天,然后在没有对任何一个 SWF 进行任何更改之后就开始突然出现这些错误。

ShellShock 在任何特定时刻都有数百名玩家在线,因此我想尽快修复此问题。任何帮助将不胜感激!谢谢你!

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!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

触ぅ动初心 2024-11-02 20:44:31

我知道原来的帖子已经有几年了,但由于我刚刚花了很多天尝试解决类似的问题,并且由于该帖子不包含我认为正确的解释,所以我将发布我的结论自己的调查在这里,供其他人使用:

几乎肯定会记录VerifyError事件,因为NewGrounds上的加载器SWF的目标Flash Player版本比导致此错误的游戏SWF的版本低。

用户系统上的 Flash Player 将接受 NewGrounds SWF 加载程序,因为它的目标版本等于或低于所安装的版本。之后,可以加载针对更高 Flash Player 版本的外部 SWF,而不会受到 Flash Player 的任何投诉,除非它尝试访问该 Flash Player 中不可用的功能,然后它将抛出VerifyError。

此问题的偶发性(4 小时激增)可能与以后的 Flash Player 版本在世界不同地区(以及不同时区)的不同渗透率有关。在最新 Flash Player 版本渗透率较低的国家/地区,在休闲游戏非常活跃的时期(周末和晚上?),您可能会看到成批记录的这些验证错误。

坏消息是,经过多天的努力寻找解决这个问题的方法,我们一直无法找到任何方法来捕获VerifyError。它甚至不会被 UncaughtErrorEvent 处理程序捕获!

我可以建议的唯一可能对您的情况有帮助的事情(不幸的是,对我的情况没有帮助)是确定 NewGrounds 加载器 SWF 的目标版本(检查 SWF 中的第 4 个字节),然后执行以下操作之一:

  • 编译您的游戏以与加载程序目标相同版本的 Flash Player 为目标。这样您就可以确定,如果 NewGrounds 加载器 SWF 成功加载到用户的 Flash Player 中,您的 SWF 也将在该版本中正常工作,或者

  • 在游戏的初始化代码中,检查 Capability.version 以确定用户系统上安装的 Flash Player 版本,并使用它进行分支控制,以便高级 Flash Player 功能仅在适当的 Flash Player 版本中使用。

就我而言,我可以访问加载程序代码,但不能访问它加载的数千个 SWF 的代码。由于外部 SWF 作为 ByteArrays 被模板化到加载器 SWF 的副本中,因此我可以检查 SWF 的 Flash Player 目标版本字节 (byteArray[3]),并将其与从 Capability.version 获取的已安装 Flash Player 'major.minor' 版本进行比较,但由于 SWF Flash Player 目标版本字节(当前)随着 Flash Player 的每个次要版本增量而递增,因此不可能将 SWF 目标字节 (byteArray[3]) 映射到未来的 Flash Player 'major.minor' 版本,直到我们知道当前 Flash Player 的最大次版本号是多少。

希望遇到这种情况的其他人会比我们幸运。

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.

夏至、离别 2024-11-02 20:44:31

我认为这可能是 Flash 播放器错误,请尝试禁用任何图形加速或缓存。了解他们使用的显卡可能会有所帮助。

您是否对套接字服务器进行了更改?你用的是smarfoxserver吗?

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?

怂人 2024-11-02 20:44:31

我在一个使用 cs3 flash9 的非常小的项目中遇到了这个错误。所以我能够追踪到这个错误。

注意:此错误发出不正确。我的项目中发出错误的原因不是因为 swf 有问题,因为我没有将任何 swf 导入到我的项目中。

原因:
我有这样写的代码行:
_mc.my_counter && _mc.my_counter--;

解决方案:
我将该行更改为:
if(_mc.my_counter) _mc.my_counter--;

...验证错误消息消失的速度和出现的速度一样快。看来这是一个真正的 as3 bug。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文