{"record":{"id":"45e841a89d31d913","repo":"go-delve/delve","slug":"error-loading-module-data-v","errorCode":null,"errorMessage":"error loading module data: %v","messagePattern":"error loading module data: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/proc/variables.go","lineNumber":2126,"sourceCode":"\n\tif isnil {\n\t\t// interface to nil\n\t\tdata = data.maybeDereference()\n\t\tv.Children = []Variable{*data}\n\t\tif loadData {\n\t\t\tv.Children[0].loadValueInternal(recurseLevel, cfg)\n\t\t}\n\t\treturn\n\t}\n\n\tif data == nil {\n\t\tv.Unreadable = errors.New(\"invalid interface type\")\n\t\treturn\n\t}\n\n\tmds, err := _type.bi.getModuleData(_type.mem)\n\tif err != nil {\n\t\tv.Unreadable = fmt.Errorf(\"error loading module data: %v\", err)\n\t\treturn\n\t}\n\n\ttyp, directIface, err := RuntimeTypeToDIE(_type, data.Addr, mds)\n\tif err != nil {\n\t\tv.Unreadable = err\n\t\treturn\n\t}\n\n\tderef := false\n\tif !directIface {\n\t\trealtyp := godwarf.ResolveTypedef(typ)\n\t\tif _, isptr := realtyp.(*godwarf.PtrType); !isptr {\n\t\t\ttyp = pointerTo(typ, v.bi.Arch)\n\t\t\tderef = true\n\t\t}\n\t}\n","sourceCodeStart":2108,"sourceCodeEnd":2144,"githubUrl":"https://github.com/go-delve/delve/blob/a23773e6c31361e43246bc43a424ee009679b174/pkg/proc/variables.go#L2108-L2144","documentation":"After obtaining an interface's runtime type (*_type), Delve loads the runtime's moduledata (needed to map runtime types back to DWARF compile units via type offsets). Any failure reading or parsing moduledata marks the interface unreadable.","triggerScenarios":"Printing an interface whose concrete type resolution requires getModuleData, when the moduledata memory is unreadable, the firstmoduledata symbol is missing from the binary, or the moduledata contents fail validation.","commonSituations":"Debugging binaries built with unusual linkers (external linking plugins, -buildmode=c-archive) where moduledata layout/symbols differ; core dumps missing the pages holding moduledata; Go version mismatches.","solutions":["Rebuild with standard 'go build' and default buildmode so firstmoduledata is present and standard-shaped","Upgrade Delve if the debuggee uses a newer Go runtime with changed moduledata layout","For core dumps, ensure the core captured the data segment containing moduledata (full core)","Check the binary wasn't post-processed (stripped/packed) in ways that removed or moved moduledata symbols"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"// Verify firstmoduledata is present and readable\nmd, err := bi.getModuleData(mem)\nif err != nil { /* interface concrete-type resolution unavailable */ }","typeGuard":null,"tryCatchPattern":"if v, err := dbg.EvalVariable(scope, expr, cfg); err != nil || v.Unreadable != nil {\n    // fall back to printing raw interface fields (tab/data words)\n}","preventionTips":["Avoid exotic buildmodes (c-archive, plugin) when you need full introspection","Ensure cores include the data segment holding moduledata","Upgrade Delve for newer Go runtimes with changed moduledata layout"],"tags":["delve","interface","moduledata","runtime"],"backgroundTag":"moduledata-unreadable","analyzedSha":"a23773e6c31361e43246bc43a424ee009679b174","analyzedAt":"2026-08-31T15:12:45.221Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}