Skip to content

Commit 2b6421e

Browse files
reproduce bug report
1 parent 6c76450 commit 2b6421e

File tree

1 file changed

+37
-1
lines changed

1 file changed

+37
-1
lines changed

src/Scratch/Program.fs

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1464,10 +1464,46 @@ let cp_20240219_quadtreetest () =
14641464

14651465
()
14661466

1467+
let cp_20240311_quadtree_exception () =
1468+
1469+
let path = @"W:\Datasets\Vgm\Quadtree\20240311_exception";
1470+
1471+
printfn "path = %s" path
1472+
1473+
let options = SerializationOptions.NewInMemoryStore(verbose = false)
1474+
1475+
let idFile = Guid(File.ReadAllText(@"W:\Datasets\Vgm\Quadtree\20240311_exception\builder.20240311093003.638457462036830406.key.txt"))
1476+
let builderReloadedFile = Builder.Import(path, idFile)
1477+
match builderReloadedFile with
1478+
| None -> printfn "reloaded from file = None"
1479+
| Some x ->
1480+
printfn "reloaded from file, %d patches" (x.GetPatches() |> Seq.length)
1481+
1482+
let sw = Stopwatch.StartNew()
1483+
let buildConfig = { BuildConfig.Default with Verbose = false; SplitLimitPowerOfTwo = 8 }
1484+
let maybeQuadtree = x.Build2 buildConfig
1485+
sw.Stop()
1486+
printfn "[TIMING] build: %A" sw.Elapsed
1487+
1488+
match maybeQuadtree with
1489+
| None -> failwith ""
1490+
| Some qtree ->
1491+
1492+
let pos = V2d(66077.6476628291, 270082.243676802)
1493+
match Sample.Position Query.Config.Default pos qtree with
1494+
| None -> failwith "foo"
1495+
| Some x -> printfn "sample is: %A" x
1496+
1497+
()
1498+
1499+
()
1500+
14671501
[<EntryPoint>]
14681502
let main argv =
14691503

1470-
cp_20240219_quadtreetest ()
1504+
cp_20240311_quadtree_exception ()
1505+
1506+
//cp_20240219_quadtreetest ()
14711507

14721508
//test_20240208 ()
14731509

0 commit comments

Comments
 (0)