Recent

Author Topic: Lazarus Release 2.0.10  (Read 84525 times)

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9791
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus Release 2.0.10
« Reply #60 on: July 23, 2020, 10:01:01 pm »
"cannot access memory at adders 0x164"

Any value that low (below the sizeOf(TControl) ) means that "self" is nil.
Check the callstack

Birger52

  • Sr. Member
  • ****
  • Posts: 309
Re: Lazarus Release 2.0.10
« Reply #61 on: July 24, 2020, 12:03:38 pm »
OK - thx
Lazarus 2.0.8 FPC 3.0.4
Win7 64bit
Playing and learning - strictly for my own pleasure.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4459
  • I like bugs.
Re: Lazarus Release 2.0.10
« Reply #62 on: July 24, 2020, 12:55:13 pm »
@Birger52, if that really is a regression bug introduced between Lazarus 2.0.8 and 2.0.10, we should find the guilty revision.
Can you please study it from the fixes_2_0 SVN branch.
I cannot see any revisions directly dealing with DragDrop.
 https://wiki.freepascal.org/Lazarus_2.0_fixes_branch#Fixes_for_2.0.10_.28merged.29
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

Birger52

  • Sr. Member
  • ****
  • Posts: 309
Re: Lazarus Release 2.0.10
« Reply #63 on: July 24, 2020, 04:15:11 pm »
I have no idea what you're asking.

All I can do is to determine, that things were functioning in 2.0.8 - and they don't in 2.0.10.
Imagine there may be a million places, things can go wrong.

But I can give you some details.

Control ClipCont is derived from TPanel. Basically a userdrawn panel of a TStringList, with a scrollbar, determining which texts to draw.
Starting drag is done like this:
Code: Pascal  [Select][+][-]
  1. procedure TmyStripPlayForm.SetDragStart(aX,aY:integer); // called at mousedown
  2. begin
  3.   mdX := aX;
  4.   mdY := aY;
  5. end;
  6.  
  7. procedure TmyStripPlayForm.ClipContMouseMove(Sender:TObject;Shift:TShiftState;X,Y:Integer);
  8. begin
  9.   if (ssLeft in Shift) and (mdX > -1) and (mdY > -1) then begin
  10.     if Abs(mdX - X) + Abs(mdY - Y) > 5 then begin
  11.       DragCtrl := ClipCont;
  12.       DragCtrl.BeginDrag(true);
  13.     end;
  14.   end;
  15. end;
  16.  

The use of DragCtrl is nescessary, as Source in DragOver is otherwise the form containing the panels - which is not usefull, and it wasn't like that in 2.0.8 - it was the actual control starting the drag.
DragCtrl is a public var in the Form class.

Following the start of the Drag operation, DragOver is called on the same control that starts the Drag.

Code: Pascal  [Select][+][-]
  1. procedure TmyStripPlayForm.ClipContDragOver(Sender,Source:TObject;X,Y:Integer;State:TDragState;var Accept:Boolean);
  2. var
  3.   dtTyp : byte = dtNone;
  4.   crCur : TCursor;
  5. begin    // Drag over text-Listen af clips
  6. {
  7.   if ((Source = ClipCont) and (ClipCont.SelectedIndex <> ClipCont.DropIndex)) or
  8.      ((Source = ClipImgCont.HeaderLabel) and (ClipImgCont.Selected <> ClipCont.DropIndex)) then
  9.     dtTyp := dtMove or dtExch
  10.   else if (Source = AutoImgCont.HeaderLabel) or (Source = HistoryListCont.HeaderLabel) then
  11.     dtTyp := dtCopy;
  12. }
  13.   if ((DragCtrl = ClipCont) and (ClipCont.SelectedIndex <> ClipCont.DropIndex)) or
  14.      ((DragCtrl = ClipImgCont) and (ClipImgCont.Selected <> ClipCont.DropIndex)) then
  15.     dtTyp := dtMove or dtExch
  16.   else if (DragCtrl = AutoImgCont) or (DragCtrl = HistoryListCont) then
  17.     dtTyp := dtCopy;
  18.   crCur := GetDragCursor(dtTyp);
  19.   TDragControl(DragCtrl).DragCursor := crCur;
  20.   Accept := crCur <> crNoDrop;
  21. end;
  22.  
where
Code: Pascal  [Select][+][-]
  1.   TDragControl = class(TControl)
  2.   published
  3.     property DragCursor;
  4.   end;
  5.  
{commented out code is the code that functioned in 2.0.8.}
The line that causes the problem is here line 19:
DragCtrl is no longer set, for some reason. (and it was Source in the original 2.0.8, and it did not give any runtime errors).
I have debugged MouseMove, and DragCtrl IS set as it should be.
I have tried to debug DragOver - and at least the first time, DragOver is called, DragCtrl IS set, and pointing to the Control that initiate the dragging.
My programming do nothing to unset DragCtrl - except when ending the drag, when it is set to nil.
If the drag has been ended, DragOver should not be called. (Debugging, execution doesn't get to where it is set to nil.)
And besides - Once the drag is initiated, it is the drag Manager that controls what is happening, and no code of mine - except DragOver and DragDrop event handlers - should be called.

Lazarus 2.0.8 FPC 3.0.4
Win7 64bit
Playing and learning - strictly for my own pleasure.

hieroliu

  • Newbie
  • Posts: 1
Re: Lazarus Release 2.0.10
« Reply #64 on: July 26, 2020, 06:56:43 am »
Lazarus release package based on FPC3.2, this is an exciting time! 8)

We all know that the team has paid a lot and worked hard!

But found a problem, this release package cannot compile the IDE environment of sparta_dockedformeditor.

PascalDragon

  • Hero Member
  • *****
  • Posts: 5446
  • Compiler Developer
Re: Lazarus Release 2.0.10
« Reply #65 on: July 26, 2020, 10:51:09 pm »
But found a problem, this release package cannot compile the IDE environment of sparta_dockedformeditor.

See here for a solution. We should really pin that thread or at least its solution...

MSGEndoDoc

  • New Member
  • *
  • Posts: 11
Re: Lazarus Release 2.0.10
« Reply #66 on: July 27, 2020, 08:59:31 am »
Please help
Having trouble rebuilding Lazarus 2.0.10 after installing new components,  with the following compile error on the IDE rebuild. 

     Warning: svn not in path
     Warning: Recompiling chmreader, checksum changed for C:\lazarus\components\sparta\generics\lib\x86_64-win64\generics.collections.ppu
     chmreader.pas(80,12) Fatal: Can't find unit chmreader used by ChmLangRef

The file chmreader.pas is tn the "C:\lazarus\fpc\3.2.0\source\packages\chm\src" directory. 

How to fix this. 

Cheers,

Martin
 
Martin

PascalDragon

  • Hero Member
  • *****
  • Posts: 5446
  • Compiler Developer
Re: Lazarus Release 2.0.10
« Reply #67 on: July 27, 2020, 09:06:50 am »
Please see my post directly above yours.

MSGEndoDoc

  • New Member
  • *
  • Posts: 11
Re: Lazarus Release 2.0.10
« Reply #68 on: July 27, 2020, 09:19:27 am »
I just worked out myself it was the Sparta_dockedformeditor.   The installation is working well without it. 
Martin

yzsdn

  • Newbie
  • Posts: 5
Re: Lazarus Release 2.0.10
« Reply #69 on: August 11, 2020, 05:04:34 pm »
Thanks to the developers, I hope Lazarus will be more powerful in the future

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: Lazarus Release 2.0.10
« Reply #70 on: August 11, 2020, 09:46:39 pm »
I just worked out myself it was the Sparta_dockedformeditor.   The installation is working well without it.
There are other packages that use sparta generics package so sooner or later you will again face the PPU problem. If you follow the PascalDragon's fix then you can use both embedded form designer and other packages using sparta generics without problems. More info:
https://forum.lazarus.freepascal.org/index.php/topic,46755.msg373317.html#msg373317
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

kegge13

  • New Member
  • *
  • Posts: 45
    • the BistroMath project
Re: Lazarus Release 2.0.10
« Reply #71 on: August 24, 2020, 05:12:15 pm »
The Lazarus team is glad to announce the release of Lazarus 2.0.10.

http://wiki.freepascal.org/Lazarus_2.0_fixes_branch

Thank you all for this new release, which I installed after a complete uninstall of 2.0.8. I have two questions though.

1)
New complaints from the compiler:
wellform.pas(5740,31) Note: Call to subroutine "function TChartAxis.GetMarks:TChartAxisMarks;" marked as inline is not inlined
They arise every time I change properties of the marks. Everything seems to work just fine. Can I happily ignore them?

2)
TStringStream and TMemoryStream used to have a common ancestor in previous versions, now TStringStream is derived from the TMemoryStream. I could not find anything about this change in the release notes. Is there an explantion for this change?
In my case I tested if AStream is TMemoryStream then... to distinguish between binary data and real text data. Now my data reading failed for text data because they were handled as binairy data. It took a while before I onderstood what went wrong. In the end I changed the test to if not (AStream is TStringStream) then ... to get it working again. This construct proved to work also in 2.0.8.

Thanks in advance for any comments.

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: Lazarus Release 2.0.10
« Reply #72 on: August 24, 2020, 05:35:42 pm »
1) New complaints from the compiler:
wellform.pas(5740,31) Note: Call to subroutine "function TChartAxis.GetMarks:TChartAxisMarks;" marked as inline is not inlined
They arise every time I change properties of the marks. Everything seems to work just fine. Can I happily ignore them?

You can ignore it without fear. The compiler has always decided whether subroutine marked as inline was really inlined or not, according to some determined set of rules, but it did it silently. Now it emits a note to let you know if that is the case; that's all there is to it.
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

PascalDragon

  • Hero Member
  • *****
  • Posts: 5446
  • Compiler Developer
Re: Lazarus Release 2.0.10
« Reply #73 on: August 25, 2020, 09:11:35 am »
2)
TStringStream and TMemoryStream used to have a common ancestor in previous versions, now TStringStream is derived from the TMemoryStream. I could not find anything about this change in the release notes. Is there an explantion for this change?
In my case I tested if AStream is TMemoryStream then... to distinguish between binary data and real text data. Now my data reading failed for text data because they were handled as binairy data. It took a while before I onderstood what went wrong. In the end I changed the test to if not (AStream is TStringStream) then ... to get it working again. This construct proved to work also in 2.0.8.

This change was needed to support correct handling of encoding and it's also Delphi-compatible. I've now documented it here with the already documented, related changes.

BobT

  • New Member
  • *
  • Posts: 19
Re: Lazarus Release 2.0.10
« Reply #74 on: August 25, 2020, 02:25:00 pm »
Dragging the IDE editor tabs is also showing strange behaviour - a 'no drop' cursor flies off to unrelated screen positions when a drag is attempted, though sometimes the usual double arrow cursor appears briefly in roughly the right place. It looks very much like what has also been happening in my application. This is on a .deb reinstall (64-bit MXLinux 19.1 / GTK2) . I have never experienced anything similar using 2.0.08.

 

TinyPortal © 2005-2018