Skip to content

Exception on simpleble_free #17

@magdel

Description

@magdel

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions