Re: [fpc-pascal] fpc 3.2: "Declaration of type TTypeList changed"

2019-04-26 Thread Sven Barth via fpc-pascal

Am 25.04.2019 um 22:23 schrieb Luca Olivetti:

Hello,

as per the subject, I've been bitten by this change:

http://wiki.freepascal.org/User_Changes_Trunk#Declaration_of_type_TTypeList_changed 




This code (FTasks is a specialization of TFPGList)

  for i:=0 to FTasks.Count-1 do
  begin
    FTasks.List^[i].rackData:=FindRack(FTasks[i].rack);
    FTasks.List^[i].cellData:=
    FindCell(FTasks[i].rackData,FTasks[i].cell);
  end;


worked before.

Now it compiles with no warnings but it segfaults.
(This is just an example, there are other instances where I use 
List^[] and they also segfault).



I changed the above code to be

    LocTask:=FTasks[i];
    LocTask.RackData:=...;
    LocTask.CellData:=;
    FTasks[i]:=LocTask;


but I don't understand why the former implementation bombs. The change 
in the definition of TTypeList shouldn't have that effect, besides, as 
I said, I get no warning compiling the code (apart from the ton of 
messages about the assignment not inlined).
Seems I forgot to correctly adjust the GetList methods. I fixed that in 
trunk now and will arange for a merge to 3.2.


Regards,
Sven
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] TThread.OnTerminate never called

2019-04-26 Thread Sven Barth via fpc-pascal

Am 21.04.2019 um 18:22 schrieb Dennis:

I am using FPC 3.0.4 Lazarus 2.00 on windows 64

I created a subclass of TThread and found out that the 
TThread.OnTerminate event was never called (I already assigned it).
Also, I search the source code of TThread in classeh.inc and found 
that there was no calling of FOnTerminate nor OnTerminate


Is it supposed to be a dummy place holder?
I don't use Delphi any more. Is this behaviour the same as Delphi?

Thanks in advance.


How did you test it? OnTerminate is called using Synchronize so if you 
use a command line program to test it you need to make sure to call 
CheckSynchronize otherwise you'll never see it being called. In a LCL 
program that should work without any further action.


Regards,
Sven
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Improve message "Wrong ppu found"

2019-04-26 Thread Sven Barth via fpc-pascal

Am 24.04.2019 um 10:14 schrieb Alexey Tor.:
Suggestion: in the message $subj, can you add FPC version of that PPU? 
so it will be "Wrong PPU found [FPC 2.7.8]" when FPC needs PPU for 3.2.0.


Please provide a real example of a compiler output, cause I can't find 
"Wrong ppu found" in the sources.


Regards,
Sven
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] fpc 3.2: "Declaration of type TTypeList changed"

2019-04-26 Thread Luca Olivetti

El 26/4/19 a les 10:14, Sven Barth via fpc-pascal ha escrit:

Seems I forgot to correctly adjust the GetList methods. I fixed that in 
trunk now and will arange for a merge to 3.2.


Thanks, I see it was a simple fix.

Bye
--
Luca
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] TThread.OnTerminate never called

2019-04-26 Thread Dennis



Sven Barth via fpc-pascal wrote:

Am 21.04.2019 um 18:22 schrieb Dennis:

I am using FPC 3.0.4 Lazarus 2.00 on windows 64

I created a subclass of TThread and found out that the 
TThread.OnTerminate event was never called (I already assigned it).
Also, I search the source code of TThread in classeh.inc and found 
that there was no calling of FOnTerminate nor OnTerminate


Is it supposed to be a dummy place holder?
I don't use Delphi any more. Is this behaviour the same as Delphi?

Thanks in advance.


How did you test it? OnTerminate is called using Synchronize so if you 
use a command line program to test it you need to make sure to call 
CheckSynchronize otherwise you'll never see it being called. In a LCL 
program that should work without any further action.


I am using the debugger to break on the Event assigned to OnTerminate.  
That breakpoint was never reached.

I am using the FpDebug internal Dwart-debugger (beta)
Can you tell me what the code of calling synchronize(OnTerminate) is?  I 
cannot find it in the FPC source.

Dennis
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] TThread.OnTerminate never called

2019-04-26 Thread Sven Barth via fpc-pascal
Dennis  schrieb am Sa., 27. Apr. 2019, 05:22:

>
>
> Sven Barth via fpc-pascal wrote:
> > Am 21.04.2019 um 18:22 schrieb Dennis:
> >> I am using FPC 3.0.4 Lazarus 2.00 on windows 64
> >>
> >> I created a subclass of TThread and found out that the
> >> TThread.OnTerminate event was never called (I already assigned it).
> >> Also, I search the source code of TThread in classeh.inc and found
> >> that there was no calling of FOnTerminate nor OnTerminate
> >>
> >> Is it supposed to be a dummy place holder?
> >> I don't use Delphi any more. Is this behaviour the same as Delphi?
> >>
> >> Thanks in advance.
> >
> > How did you test it? OnTerminate is called using Synchronize so if you
> > use a command line program to test it you need to make sure to call
> > CheckSynchronize otherwise you'll never see it being called. In a LCL
> > program that should work without any further action.
> >
> I am using the debugger to break on the Event assigned to OnTerminate.
> That breakpoint was never reached.
> I am using the FpDebug internal Dwart-debugger (beta)
> Can you tell me what the code of calling synchronize(OnTerminate) is?  I
> cannot find it in the FPC source.
> Dennis
>

I'm not asking whether you used a debugger, I'm asking whether you used a
command line program or a GUI program to test it.

Regards,
Sven

>
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal