Skip to content

Commit

Permalink
更新文档
Browse files Browse the repository at this point in the history
  • Loading branch information
pirunxi committed Dec 29, 2023
1 parent 5b2eed6 commit 8ae081b
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/business/ultimate/commonerrors.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
- 未加载DHE程序集前就执行了DHE程序集中代码
- 热更新dhe dll与dhao文件不匹配,导致错误地执行了本不应该被执行的原始AOT代码,创建了原始AOT类型。只有4.5.7及更早的没有严格校验dll的版本才会有此错误
- 抛出异常或打印日志时,获得函数帧栈过程中,意外访问了DHE程序集的原始函数。4.5.8及更早版本有此bug
- 开启了 `script debugging`构建参数

4 changes: 4 additions & 0 deletions docs/business/ultimate/manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@ DHE技术中与构建相关的文件为dhe dll文件和对应的dhao文件。
- 使用`HybridCLR.Editor.DHE.BuildUtils.EncryptDllAndGenerateDHAODatas`生成最新的dhe dll的加密后的文件及对应的dhao文件
- 将加密后的dhe dll和dhao文件加入热更新资源管理系统

## 不支持特性

- 不支持开启 `script debugging` 构建选项

## 注意事项

### 外部dll引发的计算dhao的结果有巨量差异
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Common Errors

## ExecutionEngineException: Could not run the type initializer for origin DHE type 'xxx'

The reason is that the original AOT type was accidentally created which was replaced by DHE. After using DHE, you can no longer create primitive types corresponding to types in DHE assemblies. There are several reasons for this error:

- The code in the DHE assembly was executed before the DHE assembly was loaded.
- The hot update dhe dll does not match the dhao file, causing the original AOT code that should not be executed to be executed incorrectly, creating the original AOT type. Only versions 4.5.7 and earlier that do not strictly verify dll will have this error
- When an exception is thrown or a log is printed, the original function of the DHE assembly is accidentally accessed during the process of obtaining the function frame stack. 4.5.8 and earlier versions have this bug
- Enabled `script debugging` build parameters
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@ If you want to carry the dhe dll and dhao files of the first package with the pa
- Use `HybridCLR.Editor.DHE.BuildUtils.EncryptDllAndGenerateDHAODatas` to generate the latest dhe dll encrypted file and the corresponding dhao file
- Add the encrypted dhe dll and dhao files to the hot update resource management system

## Feature not supported

- Does not support turning on the `script debugging` build option

## Precautions

### There are huge differences in the results of calculating dhao caused by external dll
Expand Down

0 comments on commit 8ae081b

Please sign in to comment.