{"record":{"id":"0ce3505a33c8851f","repo":"lionsoul2014/ip2region","slug":"failed-to-create-v6-in-memory-searcher-w","errorCode":null,"errorMessage":"failed to create v6 in-memory searcher: %w","messagePattern":"failed to create v6 in-memory searcher: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"binding/golang/service/ip2region.go","lineNumber":72,"sourceCode":"\t} else {\n\t\tv4InMemSearcher = nil\n\t\tv4Pool, err = NewSearcherPool(v4Config)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to create v4 searcher pool: %w\", err)\n\t\t}\n\t}\n\n\t// check and init the v6 pool or in-memory searcher\n\tvar v6Pool *SearcherPool\n\tvar v6InMemSearcher *xdb.Searcher\n\tif v6Config == nil {\n\t\tv6Pool = nil\n\t\tv6InMemSearcher = nil\n\t} else if v6Config.cachePolicy == BufferCache {\n\t\tv6Pool = nil\n\t\tv6InMemSearcher, err = xdb.NewWithBuffer(v6Config.ipVersion, v6Config.cBuffer)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to create v6 in-memory searcher: %w\", err)\n\t\t}\n\t} else {\n\t\tv6InMemSearcher = nil\n\t\tv6Pool, err = NewSearcherPool(v6Config)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to create v6 searcher pool: %w\", err)\n\t\t}\n\t}\n\n\treturn &Ip2Region{\n\t\tv4Pool:          v4Pool,\n\t\tv4InMemSearcher: v4InMemSearcher,\n\n\t\tv6Pool:          v6Pool,\n\t\tv6InMemSearcher: v6InMemSearcher,\n\t}, nil\n}\n","sourceCodeStart":54,"sourceCodeEnd":90,"githubUrl":"https://github.com/lionsoul2014/ip2region/blob/c1a1fc7d5941760db3f8431dc05c48cf7f0e30a1/binding/golang/service/ip2region.go#L54-L90","documentation":"Go service factory: creating the shared in-memory v6 searcher from the preloaded content buffer failed; like the v4 twin, the wrapped cause is typically an invalid or truncated content buffer.","triggerScenarios":"Thrown at binding/golang/service/ip2region.go:72 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the v6 xdb content in the config is valid and fully loaded","Rebuild the v6 config from a good database file","Examine the wrapped error for the buffer validation detail"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c1a1fc7d5941760db3f8431dc05c48cf7f0e30a1","analyzedAt":"2026-09-02T16:58:39.988Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T21:17:11.164Z"}