Recent

Author Topic: Lazarus crashes on extended characters  (Read 3739 times)

Trenatos

  • Hero Member
  • *****
  • Posts: 535
    • MarcusFernstrom.com
Lazarus crashes on extended characters
« on: September 28, 2018, 05:44:54 pm »
I've run into an issue where Lazarus IDE will just crash any time I type or paste an extended character.

I'm Swedish, so my keyboard includes €ÅÄÖåäö∞£ and a bunch of others.

Lazarus 1.9.0 r58971

Anyone else running into this?

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Lazarus crashes on extended characters
« Reply #1 on: September 28, 2018, 06:05:07 pm »
yes and no.
I can see that SynEdit cannot measure non latin characters properly, but not crashing.

Do the test.
1) create a project with TMemo on a form and see how Swedish characters are behaving
2) create a project with TSynEdit on a form and see how Swedish characters are behaving (expected result - crash)

What osx version?

Trenatos

  • Hero Member
  • *****
  • Posts: 535
    • MarcusFernstrom.com
Re: Lazarus crashes on extended characters
« Reply #2 on: September 28, 2018, 07:51:52 pm »
New Application with just tmemo and tsynedit.

TMemo does nothing. As in, I press 'å' and just nothing happens.

TSynEdit shows the character with a space behind, then crashes a second later.

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Lazarus crashes on extended characters
« Reply #3 on: September 28, 2018, 09:13:42 pm »
what macosx version?

can you get callstack for the crashing synedit sample?

Trenatos

  • Hero Member
  • *****
  • Posts: 535
    • MarcusFernstrom.com
Re: Lazarus crashes on extended characters
« Reply #4 on: September 29, 2018, 02:46:54 am »
OS version: High Sierra 10.13.6

Not sure how to get a callstack for it, I've had no luck getting up and running with debugger on this machine.

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Lazarus crashes on extended characters
« Reply #5 on: September 29, 2018, 05:19:32 am »
try lldb using Terminal (command-line).
It comes with Xcode, so no third-party building, signing, etc...

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Lazarus crashes on extended characters
« Reply #6 on: September 30, 2018, 10:13:44 pm »
with r59196 the synedit should not crash anymore.
however, expect artifacts and display glitches.

Trenatos

  • Hero Member
  • *****
  • Posts: 535
    • MarcusFernstrom.com
Re: Lazarus crashes on extended characters
« Reply #7 on: October 01, 2018, 03:51:26 am »
lldb seems to work, thanks a bunch for that suggestion, I've been running entirely without debugger on osx!

Ok, so I'm not used to using one, but this is what I got when pressing å in the synedit window, screenshots attached.

Code: Pascal  [Select][+][-]
  1. #0 DRAW(0x0000000100ed5f00, 0x0000000101821c70, 83, 0, false, 0x0000000105ed1270) at cocoagdiobjects.pas:1361
  2. #1 TEXTOUT(0x0000000100edf8a0, 83, 0, 2, 0x00007ffeefbfb508, "\xa5nEdit1", 2, 0x0000000105ed1270) at cocoagdiobjects.pas:1976
  3. #2 EXTTEXTOUT(0x0000000101b08040, 4310562976, 83, 0, 2, 0x00007ffeefbfb508, "\xa5nEdit1", 2, 0x0000000105ed1270) at cocoawinapi.inc:675
  4. #3 EXTTEXTOUT(4310562976, 83, 0, 2, 0x00007ffeefbfb508, "\xa5nEdit1", 2, 0x0000000105ed1270) at winapi.inc:282
  5. #4 NEWTEXTOUT(0x0000000100edeea0, 83, 0, 2, TRECT, , , "\xa5nEdit1", 2, 0x0000000100ed6860) at syntextdrawer.pp:1255
  6. #5 DRAWHILIGHTMARKUPTOKEN(0x00007ffeefbfb9a0, TLAZSYNDISPLAYTOKENINFOEX, , ) at lazsyntextarea.pp:1668
  7. #6 PAINTLINES(0x00007ffeefbfb9a0) at lazsyntextarea.pp:1726
  8. #7 PAINTTEXTLINES(0x0000000100ec7540, TRECT, , , 0, 1, 4, 6) at lazsyntextarea.pp:1798
  9. #8 DOPAINT(0x0000000100ec7540, 0x0000000105ec9e00, TRECT, , ) at lazsyntextarea.pp:1417
  10. #9 PAINT(0x0000000100ec7540, 0x0000000105ec9e00, TRECT, , ) at syneditmiscclasses.pp:1301
  11. #10  at :0
  12. #11  at :0
  13.  

And line 1361 of CocoaGDIObjects highlights.

Code: Pascal  [Select][+][-]
  1. Locations[0] := FLayout.locationForGlyphAtIndex(0);

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Lazarus crashes on extended characters
« Reply #8 on: October 01, 2018, 05:20:23 am »
did you try r59196?

Trenatos

  • Hero Member
  • *****
  • Posts: 535
    • MarcusFernstrom.com
Re: Lazarus crashes on extended characters
« Reply #9 on: October 01, 2018, 02:07:49 pm »
Not yet, no, I'll see if I can give that a go later

 

TinyPortal © 2005-2018