When using sane to frequently obtain scanner information, an error is reported
hzhappycoder opened this issue · comments
hzhappycoder commented
Hello, I am using naps2 and sane on the local linux operating system. Frequently obtain scanner information using a thread. When called around the 7th time, the following error message will appear:
Buffer overflow detected
The complete code is as follows:
for (int i = 0; i < 1000; i++)
{
Console.WriteLine($"current i : {i}");
using var scanningContext = new ScanningContext(new GtkImageContext());
var controller = new ScanController(scanningContext);
await controller.GetDeviceList(Driver.Sane);
}
Ben Olden-Cooligan commented
Can you try updating to SDK version 0.4.0 and see if that resolves the problem?