{
  "id": "go/goroutine-panic-nil-pointer",
  "signature": "panic: runtime error: invalid memory address or nil pointer dereference [recovered]",
  "signature_zh": "恐慌：运行时错误：无效内存地址或空指针解引用 [已恢复]",
  "regex": "panic:\\ runtime\\ error:\\ invalid\\ memory\\ address\\ or\\ nil\\ pointer\\ dereference\\ \\[recovered\\]",
  "domain": "go",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "在goroutine中访问了nil指针，通常因为共享数据结构未初始化或依赖未设置。",
  "root_cause_type": "generic",
  "root_cause_zh": "在goroutine中访问了nil指针，通常因为共享数据结构未初始化或依赖未设置。",
  "versions": [
    {
      "version": "1.21",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "数据竞争可能导致goroutine看到nil或部分初始化值。",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "recover只能恢复panic，但根因未解决，可能导致后续问题。",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.8,
      "how": "go func(){ if p == nil { return }; /* 使用p */ }()",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "var once sync.Once; once.Do(func(){ p = &T{} })",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-02-11",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}