Recent

Author Topic: Can not execute a call to CStringCreateWithCString  (Read 2509 times)

MISV

  • Hero Member
  • *****
  • Posts: 783
Can not execute a call to CStringCreateWithCString
« on: July 03, 2017, 01:19:54 pm »
In Lazarus 1.6.4 running in debugger macOS Sierra 10.12.4

With the underneath code I am getting

Quote
"The debugger encountered and error when trying to run/step the application. Cannot find bounds of current function"

Code: Pascal  [Select][+][-]
  1. procedure myTest;
  2. var
  3.   TestStrUTF8: UTF8String;
  4.   TmpStrPr_CSS: ConstCStringPtr;
  5.   TmpCFStrRef: CFStringRef;
  6.   TmpStrPtr: Pointer;
  7. begin
  8.   TestStrUTF8 := 'http://example.com';
  9.   TmpStrPtr := Pointer(TestStrUTF8)
  10.   TmpStrPtr_CSS := ConstCStringPtr(TmpStrPtr);
  11.   TmpCFStrRef := CStringCreateWithCString(nil, TmpStrPtr_CSS, kCFStringEncodinguTF8); // Note1: we are only using ASCII, Note2: We have tried KCFStringEncodingWindowsLatin1 with same problem
  12.  
  13.   // jumps out of routine - and shows debugger dialog "Cannot find bounds of current function" here
  14.  
  15.   showmessage('never reaches, crashes first');
  16. end;
  17.  

  • I do not otherwise have problems debugging.
  • I am running above code in main thread.
« Last Edit: July 03, 2017, 01:21:34 pm by MISV »

MISV

  • Hero Member
  • *****
  • Posts: 783
Re: Can not execute a call to CStringCreateWithCString
« Reply #1 on: July 03, 2017, 08:40:01 pm »
This seems to be a  Mac debugger issue calling any Mac issues so moved post to here:
https://forum.lazarus.freepascal.org/index.php?topic=37429

 

TinyPortal © 2005-2018