Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception on simpleble_free #317

Closed
magdel opened this issue Jun 14, 2024 · 1 comment
Closed

Exception on simpleble_free #317

magdel opened this issue Jun 14, 2024 · 1 comment

Comments

@magdel
Copy link

magdel commented Jun 14, 2024

Hi!
I`m using SimpleBle with examples for Pascal binding.
Everything works fine, but on some machines there is a strange behavior, library throws exception on simpleble_free.

  procedure AdapterOnScanStart(Adapter: TSimpleBleAdapter; Userdata: PPointer);
  var
    Identifier: PChar;
  begin
    Identifier := SimpleBleAdapterIdentifier(Adapter);
    if Identifier = '' then
      Exit;
    WriteLn('Adapter ' + Identifier + ' started scanning.');
    SimpleBleFree(Identifier);
  end;                  

And at SimpleBleFree(Identifier) (same as simpleble_free) I get

изображение

изображение

And sometimes app works nice, sometime I need to restart it ten times, sometimes nothing helps.
I use SimpleBle win64 0.7.3 shared version.

Looks like library does want to free string it just allocated.

Project itself is here https://github.com/magdel/ble2com

@magdel magdel closed this as completed Jun 14, 2024
@magdel
Copy link
Author

magdel commented Jun 14, 2024

Found the reason,
eriklins/Pascal-Bindings-For-SimpleBLE-Library#18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant