From 1d1efc6288be9367ab95e06d342993837a52491f Mon Sep 17 00:00:00 2001 From: TermiNexus Date: Fri, 2 Oct 2026 02:10:58 +0800 Subject: [PATCH] =?UTF-8?q?debug(gen):=20=E4=B8=80=E6=AC=A1=E6=80=A7?= =?UTF-8?q?=E6=8F=92=E6=A1=A9=E6=89=93=E5=8D=B0=20Generator.FuncGenBase=20?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E6=9F=A5=E6=89=BE=E4=B8=8A=E4=B8=8B=E6=96=87?= =?UTF-8?q?=EF=BC=88=E7=94=A8=E5=AE=8C=E5=88=A0=E9=99=A4=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AsyncGenMixin.vp:58 `self.Gen.FuncGenBase` 报「属性访问失败」,需确认 lookup_field 收到的 struct_ty 是谁、结构体表里 Generator 条目的 FieldCount/sha1, 以判断是字段缺失、Ty 身份不一致还是按到了空/错误条目。仅打印,不改行为。 --- App/lib/core/Gen/StructGenMixin.vp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/App/lib/core/Gen/StructGenMixin.vp b/App/lib/core/Gen/StructGenMixin.vp index f0bb818..aa61d96 100644 --- a/App/lib/core/Gen/StructGenMixin.vp +++ b/App/lib/core/Gen/StructGenMixin.vp @@ -1304,6 +1304,26 @@ novirtual class StructGenMixin: if struct_ty is None or field_name is None or self.StructTable is None: return None + # [DBG-GEN] 一次性诊断(定位 Generator.FuncGenBase 字段查找失败,用完删除) + if string.strcmp(field_name, "FuncGenBase") == 0: + _dg_ty: str = self._extract_struct_name(struct_ty) + _dg_ty_t: str = "" + if _dg_ty is not None: + _dg_ty_t = _dg_ty + stdio.printf("[DBG-GEN] lookup 'FuncGenBase' struct_ty=%s\n", _dg_ty_t) + _dg_i: int = 0 + while _dg_i < self.StructCount: + _dg_e: GenTypes.StructEntry* = self._get_struct_entry(_dg_i) + if _dg_e is not None and _dg_e.Name is not None: + if string.strstr(_dg_e.Name, "Generator") is not None: + _dg_sh: str = _dg_e.ModuleSha1 + _dg_sh_t: str = "" + if _dg_sh is not None: + _dg_sh_t = _dg_sh + stdio.printf("[DBG-GEN] tbl[%d] name=%s fcount=%d sha1=%s\n", + _dg_i, _dg_e.Name, _dg_e.FieldCount, _dg_sh_t) + _dg_i += 1 + # ============================================================ # 两遍查找策略(跨模块同名类冲突的根本修复): #