Recent

Author Topic: Selecting a date in TDateEdit's popup calendar causes EXC_BAD_ACCESS  (Read 2139 times)

emaijala

  • Newbie
  • Posts: 2
Selecting a date from TDateEdit's calendar popup by double-clicking a date results in an exception:

Quote
Project dateedittest raised exception class 'Debugger stopped with reason: EXC_BAD_ACCESS (code=1, address=0x0)'.

 In file 'cocoawscommon.pas' at line 990:
FTarget.ClientToScreen(Point(Msg.XPos, Msg.YPos)),MButton+1,False);

Looks like FTarget is nil. I wasn't sure what the proper action would be in this case, so couldn't provide a fix. This problem affects latest master and at least 115 previous revisions. Tested with Mojave (10.14.6).

Sample application is attached (just a form with a TDateEdit in it). To reproduce, start the program, click the popup button and double-click a date.

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: Selecting a date in TDateEdit's popup calendar causes EXC_BAD_ACCESS
« Reply #1 on: December 26, 2019, 11:45:55 pm »
Confirmed with the macOS Lazarus/FPC versions below.

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Selecting a date in TDateEdit's popup calendar causes EXC_BAD_ACCESS
« Reply #2 on: December 29, 2019, 07:43:47 am »
r62452

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: Selecting a date in TDateEdit's popup calendar causes EXC_BAD_ACCESS
« Reply #3 on: December 29, 2019, 09:34:24 am »
Last Changed Rev: 62452
Last Changed Date: 2019-12-29 17:43:33 +1100 (Sun, 29 Dec 2019)

Code: [Select]
Free Pascal Compiler version 3.3.1 [2019/10/22] for x86_64
Copyright (c) 1993-2019 by Florian Klaempfl and others
Target OS: Darwin for x86_64
Compiling ../lcl.pas
Compiling alllclintfunits.pas
Compiling agl.pp
Assembling (pipe) ../../units/x86_64-darwin/cocoa/agl.s
Compiling cocoa_extra.pas
cocoa_extra.pas(242,1) Fatal: Syntax error, "IMPLEMENTATION" expected but "shl" found
Fatal: Compilation aborted
make[3]: *** [../lcl.ppu] Error 1
make[2]: *** [cocoa_all] Error 2
make[1]: *** [interfaces] Error 2
make: *** [lcl] Error 2

Update: sorted with a fresh svn checkout rather than an svn update. Give me RCS any day :)
« Last Edit: December 29, 2019, 09:56:21 am by trev »

Cyrax

  • Hero Member
  • *****
  • Posts: 836
Re: Selecting a date in TDateEdit's popup calendar causes EXC_BAD_ACCESS
« Reply #4 on: December 29, 2019, 09:56:21 am »
Last Changed Rev: 62452
Last Changed Date: 2019-12-29 17:43:33 +1100 (Sun, 29 Dec 2019)

Code: [Select]
Free Pascal Compiler version 3.3.1 [2019/10/22] for x86_64
Copyright (c) 1993-2019 by Florian Klaempfl and others
Target OS: Darwin for x86_64
Compiling ../lcl.pas
Compiling alllclintfunits.pas
Compiling agl.pp
Assembling (pipe) ../../units/x86_64-darwin/cocoa/agl.s
Compiling cocoa_extra.pas
cocoa_extra.pas(242,1) Fatal: Syntax error, "IMPLEMENTATION" expected but "shl" found
Fatal: Compilation aborted
make[3]: *** [../lcl.ppu] Error 1
make[2]: *** [cocoa_all] Error 2
make[1]: *** [interfaces] Error 2
make: *** [lcl] Error 2

:(

You probably need to do some clean ups before compiling Lazarus sources.

make distclean all <insert your usual flags and options here>

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: Selecting a date in TDateEdit's popup calendar causes EXC_BAD_ACCESS
« Reply #5 on: December 29, 2019, 09:59:56 am »
[You probably need to do some clean ups before compiling Lazarus sources.

make distclean all <insert your usual flags and options here>

I was travelling back in time doing reverse merges and struck "cocoa_extra.pas node conflicted" so it looks like my source had been corrupted at some point after r61775 which was the last time I'd compiled it.

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: Selecting a date in TDateEdit's popup calendar causes EXC_BAD_ACCESS
« Reply #6 on: December 29, 2019, 10:21:57 am »
Excellent - date picking no longer problematical.

Happy New Year Dmitry

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Selecting a date in TDateEdit's popup calendar causes EXC_BAD_ACCESS
« Reply #7 on: December 29, 2019, 08:06:18 pm »
Happy New Year!

 

TinyPortal © 2005-2018