dc_dc_dx

我在阅读spine ue4 运行时的代码时发现
似乎运行时并没有一个判断atlas与skeletonData数据是否匹配的机制 :think:
导致 在已经选择了互相匹配的AtlasAsset与SkeletonDataAsset之后,将其中的一个切换成其他的spine Asset
将会导致数据访问上的冲突 严重甚至会导致引擎崩溃(这常见使用于Binary导入方式的Asset时, 使用Json导入方式的Asset时会有引擎警告阻止,我看了下代码发现 Json的方式是用类似字典的默认值去读取数据的 这是安全的 而二进制的数据访问上并不是安全的 更多的可能会发生数组越界的问题)
是否需要增加异常去判定阻止


When I read the code of spine ue4 runtime, I found
It seems that there is no mechanism for judging whether the atlas and skeletonData data match at runtime :think:
As a result, after the AtlasAsset and SkeletonDataAsset that match each other have been selected, one of them is switched to the other spine Asset
It will cause serious conflicts in data access and even cause engine crashes (this is commonly used in Binary-imported Assets. When using Json-imported Assets, there will be engine warnings to prevent them. I looked at the code and found that the Json method is to use Similar to the dictionary default value to read the data, this is safe, but the binary data access is not safe, and the problem of array out of bounds may occur)
Do you need to add exceptions to determine and prevent
添付ファイルを見るにはパーミッションが必要です
dc_dc_dx
  • 記事: 6

Mario

The spine-ue4 plugin does check if an atlas and skeleton data match in UISpineSkeletonDataAsset::GetSkeletonData() method https://github.com/EsotericSoftware/spine-runtimes/blob/3.8/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineSkeletonDataAsset.cpp#L274

Did you actually get a crash? If so, please post reproduction steps and error messages.
アバター
Mario

Mario
  • 記事: 2730

dc_dc_dx

Mario さんが書きました:The spine-ue4 plugin does check if an atlas and skeleton data match in UISpineSkeletonDataAsset::GetSkeletonData() method https://github.com/EsotericSoftware/spine-runtimes/blob/3.8/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineSkeletonDataAsset.cpp#L274

Did you actually get a crash? If so, please post reproduction steps and error messages.
实际上正是在这个方法中产生的异常
异常原因是 该线程尝试读写某个虚拟地址,而它对该地址不具有相应的访问权限

In fact, it is the exception that is generated in this method
The reason for the exception is that the thread tries to read and write a virtual address, and it does not have the corresponding access rights to the address
添付ファイルを見るにはパーミッションが必要です
dc_dc_dx
  • 記事: 6

Mario

Could you modify our example project so I can reproduce the issue? I've tried but I can not get it to crash.
アバター
Mario

Mario
  • 記事: 2730


Return to Runtimes