You are not logged in.
?????
No. I am using most of the time remote desktop, but not in a virtual machine mapped drive
Thank you me too ab
Now it stops in a non user breakcode in line 5075 of mormot.core.log as you can see in the other images and log
And websockets in 2.3 do not pass
Check the gist for new images
added in the gist
With today's mormot2 32bit is running OK from inside/outside of Delphi 11.1 patch 1 IDE in a computer with win11
Compiled for 64Bit it runs ok outside IDE, but inside's ide I am getting all I sent to you by message in a gist
There are differences in errors in 64bit between Release/Debug config when running from inside IDE
This may be the culprit.
What is your decimal separator?
comma instead of point
Point is used to divide thousands
What is the Windows system code page: 1252 ?
737 or 1253
Everyday this week, I was thinking what could have happened to ab
The following is really good news.
In delphi 11.1 patch 1 win64 only the following is still happening:
1.2. Core process:
- RTTI: 1,345 assertions passed 794us
- Url encoding: 300 assertions passed 1.57ms
! Core process - Encode decode JSON
! Exception EInvalidOp raised with messsage:
! Invalid floating point operation
- JSON benchmark: no assertion 746us
- Wiki markdown to html: 56 assertions passed 737us
- Variants: 124 assertions passed 546us
- Mustache renderer: 166 assertions passed 1.85s
- TDocVariant: 90,791 assertions passed 43.43ms
- TDecimal128: 17,446 assertions passed 2.12ms
- BSON: 245,070 assertions passed 3.65ms
100000 TBsonObjectID.ComputeNew in 2.36ms i.e. 40.2M/s, aver. 23ns
- TSelectStatement: 229 assertions passed 839us
- TSynMonitorUsage: 1,202 assertions passed 204us
Total failed: 0 / 491,391 - Core process PASSED 1.95sIn the log only the following entries, expected exception also
0000000000000000 ! EXCOS EInvalidOp (c0000090) [Main] at 1db400 @Trunc
0000000003F275C7 ! EXC Exception {Message:"expected exception"} [Main] at 57928e mormot.core.interfaces.pas TInterfaceStub.Invoke (6241) As shown also before:
The following sometimes happens, sometimes does not, in 64bit both in release/debug mode
! Core process - Encode decode JSON ! Exception EInvalidOp raised with messsage: ! Invalid floating point operationIn 64 bit release mode running from inside IDE:
a) it shows a Float_invalid_operation on line 4460 of mormot.core.buffers in the above error of core process
In 32bit everything is OK in delphi 11.1 patch 1
Thanks a lot @ab
OK that really help.
So 32bit works with Delphi 11.1 patch 1 without any problem
64Bit does not. But that happens to Delphi 11 too.
Even in my previous machine running Delphi 11 I got this error that I do not remember to exist in the past
In the log it is only:
0000000000000002 ! EXC Exception {Message:"expected exception"} [Main] at 68d0e4 and in the screen after running:
3.2. Service oriented architecture:
- Weak interfaces: 56 assertions passed 549us
- Service initialization: 268 assertions passed 4.64ms
- Direct call: 1,389,825 assertions passed 31.82ms
- Server side: 1,389,845 assertions passed 36.40ms
- Client side REST: 1,853,127 assertions passed 888.98ms
- Client side REST as json object: 1,853,121 assertions passed 930.17ms
- Client side REST sessions stats: 1,853,121 assertions passed 1.02s
- Client side REST locked: 1,853,125 assertions passed 862.39ms
- Client side REST main thread: 1,853,125 assertions passed 5.60s
- Client side REST background thread: 1,853,125 assertions passed 5.43s
- Client side REST sign with crc 32c: 1,853,121 assertions passed 831.84ms
- Client side REST sign with xxhash: 1,853,121 assertions passed 884.18ms
- Client side REST sign with md 5: 1,853,121 assertions passed 883.73ms
- Client side REST sign with sha 256: 1,853,121 assertions passed 923.63ms
- Client side REST sign with sha 512: 1,853,121 assertions passed 1.06s
- Client side REST weak authentication: 1,853,121 assertions passed 794.42ms
- Client side REST basic authentication: 1,853,121 assertions passed 1.04s
- Client side REST custom record layout: 1,853,121 assertions passed 880.32ms
- Client side REST service log to DB: 1,853,121 assertions passed 3.25s
- Client side json RPC: 1,853,121 assertions passed 1.10s
- Test over HTTP: 18,274 assertions passed 1.60s
- Security: 139 assertions passed 3.69ms
! Service oriented architecture - Mocks and stubs
! Exception Exception raised with messsage:
! expected exception
Total failed: 0 / 32,478,392 - Service oriented architecture PASSED 28.18sall tests passed but I have an error?
I am not sure if it helps, Eurekalog does not provide an error report. I am not sure if mormot2tests takes care of all exceptions before.
Reverted Mormot2 back to Jan 23 with static SQLITE 3.37.2
In 32 bit from inside IDE it gives errors in websockets in 2.8 Multithread process
In 32bit running outside the IDE it gives error in SOA 3.2
- Client side json RPC: 1,853,121 assertions passed 639.36ms
- Test over HTTP: 18,274 assertions passed 3.87s
- Security: 139 assertions passed 1.80ms
! Service oriented architecture - Mocks and stubs
! Exception Exception raised with messsage:
! expected exception
Total failed: 0 / 32,478,392 - Service oriented architecture PASSED 19.52sThe following sometimes happens, sometimes does not, in 64bit both in release/debug mode
! Core process - Encode decode JSON
! Exception EInvalidOp raised with messsage:
! Invalid floating point operationIn 64 bit release mode running from inside IDE:
a) it shows a Float_invalid_operation on line 4460 of mormot.core.buffers in the above error of core process
b) After the above, it stops many times with non-user breakpoint at line 3783 of mormot.core.json and sets RED the websockets
c) The above continues for ever in SOA 3.1. Core script
re-testing with more options
Delphi 11.1 patch 1
32Bit running tests inside IDE's debugging no problem, But when running it in debug mode without IDE's debugging the exception exists
64bit Running from IDE's debugging I am getting an exception Float_invalid_Operation in line 3023 of mormot.core.datetime when running the 3rd test in 1.2 Core process
- Url encoding: 300 assertions passed 453us
! Core process - Encode decode JSON
! Exception EInvalidOp raised with messsage:
! Invalid floating point operationit stops again and again "Non-user breakpoint" in line 5075 of mormot.core.log In websockets in 2.8. Multi thread process
then an exception in access_violation in line 6000 of mormot.core.os
- Websockets: 55 / 8,104 FAILED 5m12
1=2611/s 2=1423/s 5=619/s 10=319/s 30=97/s 50=4/s
I stopped there
When running outside the IDE in 64bit again the
the executable closes when starting SOA
hmmm the same happens with Delphi 11, It is not the new patch nor the Delphi 11.1
It's the bleeding edge mormot2.
A month ago, I remember both to pass at least the compiled tests for 32bit
I though it is good idea to run the test with the last version of Delphi 11.1 after yesterday's official patch 1
Last commit of Mormot2 from github:
32bit compile
...
! - Mime types: 22 / 582 FAILED 44.29ms
....
! Service oriented architecture - Mocks and stubs
! Exception Exception raised with messsage:
! expected exception
Log:
0000000000000001 ! fail #81 1651167975<>1651167975755 FileAgeToUnixTimeUtc
0000000000000B25 ! fail #88 1651167975<>1651167975761 FileAgeToUnixTimeUtc
0000000000002765 ! fail #95 1651167975<>1651167975763 FileAgeToUnixTimeUtc
0000000000003719 ! fail #102 1651167975<>1651167975771 FileAgeToUnixTimeUtc
0000000000003B4F ! fail #109 1651167975<>1651167975775 FileAgeToUnixTimeUtc
000000000000485B ! fail #116 1651167975<>1651167975776 FileAgeToUnixTimeUtc
0000000000004BEF ! fail #123 1651167975<>1651167975779 FileAgeToUnixTimeUtc
0000000000004FCC ! fail #130 1651167975<>1651167975780 FileAgeToUnixTimeUtc
000000000000584E ! fail #137 1651167975<>1651167975781 FileAgeToUnixTimeUtc
00000000000063A2 ! fail #144 1651167975<>1651167975783 FileAgeToUnixTimeUtc
00000000000067BC ! fail #151 1651167975<>1651167975786 FileAgeToUnixTimeUtc
00000000000071F9 ! fail #348 1651167975<>1651167975788 FileAgeToUnixTimeUtc
000000000000787D ! fail #355 1651167975<>1651167975790 FileAgeToUnixTimeUtc
0000000000007BE3 ! fail #362 1651167975<>1651167975791 FileAgeToUnixTimeUtc
0000000000007E8A ! fail #369 1651167975<>1651167975792 FileAgeToUnixTimeUtc
0000000000008162 ! fail #376 1651167975<>1651167975793 FileAgeToUnixTimeUtc
000000000000841B ! fail #383 1651167975<>1651167975793 FileAgeToUnixTimeUtc
00000000000086F4 ! fail #390 1651167975<>1651167975794 FileAgeToUnixTimeUtc
00000000000089D6 ! fail #397 1651167975<>1651167975795 FileAgeToUnixTimeUtc
0000000000008CAC ! fail #404 1651167975<>1651167975796 FileAgeToUnixTimeUtc
0000000000008F54 ! fail #411 1651167975<>1651167975796 FileAgeToUnixTimeUtc
00000000000091CE ! fail #418 1651167975<>1651167975797 FileAgeToUnixTimeUtc
0000000003CB79E4 ! EXC Exception {Message:"expected exception"} [Main] at b2de64 64Bit
same mime errors
When starting SOA tests the window closes and the log is very big: https://gist.github.com/dkounal/1423de3 … f5db3ec3ca
It is fixed now @ab, thank you a lot
I installed today the Ubuntu 22.4 LTS on a raspeberry Pi 4 4GB and cross compiler FPC 3.2.0 for aarch64-linux in my windows machine
Trying to compile an already tested project in Linux-aarch64 I am getting the following errors during linking:
Debug: C:\fpcupdeluxe\fpcupdeluxe\cross\bin\aarch64-linux\aarch64-linux-gnu-ld.exe: C:\Delphi\G\mORMot2\src\crypt\..\..\static\aarch64-linux\armv8.o: in function `crc32arm64':
Debug: armv8.c:(.text+0x0): multiple definition of `crc32arm64'; C:\Delphi\G\mORMot2\src\core\..\..\static\aarch64-linux\armv8.o:armv8.c:(.text+0x0): first defined here
Debug: C:\fpcupdeluxe\fpcupdeluxe\cross\bin\aarch64-linux\aarch64-linux-gnu-ld.exe: C:\Delphi\G\mORMot2\src\crypt\..\..\static\aarch64-linux\armv8.o: in function `crc32carm64':
Debug: armv8.c:(.text+0xe8): multiple definition of `crc32carm64'; C:\Delphi\G\mORMot2\src\core\..\..\static\aarch64-linux\armv8.o:armv8.c:(.text+0xe8): first defined here
Debug: C:\fpcupdeluxe\fpcupdeluxe\cross\bin\aarch64-linux\aarch64-linux-gnu-ld.exe: C:\Delphi\G\mORMot2\src\crypt\..\..\static\aarch64-linux\armv8.o: in function `crc32cby4arm64':
Debug: armv8.c:(.text+0x1d0): multiple definition of `crc32cby4arm64'; C:\Delphi\G\mORMot2\src\core\..\..\static\aarch64-linux\armv8.o:armv8.c:(.text+0x1d0): first defined here
Debug: C:\fpcupdeluxe\fpcupdeluxe\cross\bin\aarch64-linux\aarch64-linux-gnu-ld.exe: C:\Delphi\G\mORMot2\src\crypt\..\..\static\aarch64-linux\armv8.o: in function `crc32blockarm64':
Debug: armv8.c:(.text+0x1d8): multiple definition of `crc32blockarm64'; C:\Delphi\G\mORMot2\src\core\..\..\static\aarch64-linux\armv8.o:armv8.c:(.text+0x1d8): first defined here
Debug: C:\fpcupdeluxe\fpcupdeluxe\cross\bin\aarch64-linux\aarch64-linux-gnu-ld.exe: C:\Delphi\G\mORMot2\src\crypt\..\..\static\aarch64-linux\armv8.o: in function `crc32blocksarm64':
Debug: armv8.c:(.text+0x218): multiple definition of `crc32blocksarm64'; C:\Delphi\G\mORMot2\src\core\..\..\static\aarch64-linux\armv8.o:armv8.c:(.text+0x218): first defined here
Debug: C:\fpcupdeluxe\fpcupdeluxe\cross\bin\aarch64-linux\aarch64-linux-gnu-ld.exe: C:\Delphi\G\mORMot2\src\crypt\..\..\static\aarch64-linux\armv8.o: in function `aesencryptarm128':
Debug: armv8.c:(.text+0x278): multiple definition of `aesencryptarm128'; C:\Delphi\G\mORMot2\src\core\..\..\static\aarch64-linux\armv8.o:armv8.c:(.text+0x278): first defined here
Debug: C:\fpcupdeluxe\fpcupdeluxe\cross\bin\aarch64-linux\aarch64-linux-gnu-ld.exe: C:\Delphi\G\mORMot2\src\crypt\..\..\static\aarch64-linux\armv8.o: in function `aesencryptarm192':
Debug: armv8.c:(.text+0x2f0): multiple definition of `aesencryptarm192'; C:\Delphi\G\mORMot2\src\core\..\..\static\aarch64-linux\armv8.o:armv8.c:(.text+0x2f0): first defined here
Debug: C:\fpcupdeluxe\fpcupdeluxe\cross\bin\aarch64-linux\aarch64-linux-gnu-ld.exe: C:\Delphi\G\mORMot2\src\crypt\..\..\static\aarch64-linux\armv8.o: in function `aesencryptarm256':
Debug: armv8.c:(.text+0x378): multiple definition of `aesencryptarm256'; C:\Delphi\G\mORMot2\src\core\..\..\static\aarch64-linux\armv8.o:armv8.c:(.text+0x378): first defined here
Debug: C:\fpcupdeluxe\fpcupdeluxe\cross\bin\aarch64-linux\aarch64-linux-gnu-ld.exe: C:\Delphi\G\mORMot2\src\crypt\..\..\static\aarch64-linux\armv8.o: in function `MakeDecrKeyArm':
Debug: armv8.c:(.text+0x418): multiple definition of `MakeDecrKeyArm'; C:\Delphi\G\mORMot2\src\core\..\..\static\aarch64-linux\armv8.o:armv8.c:(.text+0x418): first defined here
Debug: C:\fpcupdeluxe\fpcupdeluxe\cross\bin\aarch64-linux\aarch64-linux-gnu-ld.exe: C:\Delphi\G\mORMot2\src\crypt\..\..\static\aarch64-linux\armv8.o: in function `aesdecryptarm128':
Debug: armv8.c:(.text+0x440): multiple definition of `aesdecryptarm128'; C:\Delphi\G\mORMot2\src\core\..\..\static\aarch64-linux\armv8.o:armv8.c:(.text+0x440): first defined here
Debug: C:\fpcupdeluxe\fpcupdeluxe\cross\bin\aarch64-linux\aarch64-linux-gnu-ld.exe: C:\Delphi\G\mORMot2\src\crypt\..\..\static\aarch64-linux\armv8.o: in function `aesdecryptarm192':
Debug: armv8.c:(.text+0x4b8): multiple definition of `aesdecryptarm192'; C:\Delphi\G\mORMot2\src\core\..\..\static\aarch64-linux\armv8.o:armv8.c:(.text+0x4b8): first defined here
Debug: C:\fpcupdeluxe\fpcupdeluxe\cross\bin\aarch64-linux\aarch64-linux-gnu-ld.exe: C:\Delphi\G\mORMot2\src\crypt\..\..\static\aarch64-linux\armv8.o: in function `aesdecryptarm256':
Debug: armv8.c:(.text+0x540): multiple definition of `aesdecryptarm256'; C:\Delphi\G\mORMot2\src\core\..\..\static\aarch64-linux\armv8.o:armv8.c:(.text+0x540): first defined here
Debug: C:\fpcupdeluxe\fpcupdeluxe\cross\bin\aarch64-linux\aarch64-linux-gnu-ld.exe: C:\Delphi\G\mORMot2\src\crypt\..\..\static\aarch64-linux\armv8.o: in function `gf_mul_h_arm':
Debug: armv8.c:(.text+0x5e0): multiple definition of `gf_mul_h_arm'; C:\Delphi\G\mORMot2\src\core\..\..\static\aarch64-linux\armv8.o:armv8.c:(.text+0x5e0): first defined hereSomething stupid I probably done again but I am not sure
Project's options path is set as the following:
c:\Delphi\G\mORMot2\static\$(TargetCPU)-$(TargetOS)Thanks a lot. I though it was changed in last versions of FPC.
Happened again
Console application with Mormot2 connecting to the same Mysql server using RetrieveIList inside an REST Interface call
The code is the following:
var upedia:ilist<TOrmUFpedia>; upedio:TOrmUFpedia;
....
srv.Orm.RetrieveIList(TOrmUFpedia,upedia,'RowID,title,descr,opts');
for upedio in upedia do ..... TOrmUFpedia is declared as follows:
TOrmUFpedia = class(TOrm)
private
Ftitle, Fdescr, Fopts: utf8string;
function Getopts: utf8string;
procedure Setopts(const Value: utf8string);
public
cOpts:Dufoptions;
published
property title:utf8string index 500 read Ftitle write Ftitle;
property descr:utf8string index 500 read Fdescr write Fdescr;
property opts:utf8string read Getopts write Setopts;
end;
function TOrmUFpedia.Getopts: utf8string;
begin result:=RecordSaveJson(cOpts,typeinfo(Dufoptions)); end;
procedure TOrmUFpedia.Setopts(const Value: utf8string);
begin if (Value='') or (not RecordLoadJson(cOpts,value,typeinfo(Dufoptions))) then cOpts:=Default(Dufoptions); end; where Dufoptions is a record
The code using the above is compiled by both Delphi 11.1 and FPC 3.2.0-r47409 [2022/04/01] for i386, all units are used the same, only project file is different
Compiled executable (32 & 64bit for FPC, 32bit for Delphi 11.1) runs using the same database Mysql 10.6.7
When I access the upedio.opts in for each loop as returned by RetrieveIList ...:
a) In Delphi 11.1, upedio.opts is returned OK
b) In FPC 3.2 I am getting a "DA4AAA==" as content
Does RecordLoadJson needs records like Dufoptions to be registered somehow in FPC ?
Ubuntu 22 LTS is optimized for Raspberry 4 too, getting out this week
Thanks a lot @ab
I think the problem is that in
function CallGetResult(const aCall: TSQLRestURIParams; var outID: integer): variant;
outid is integer and the number it is returning is int64 causing overflow
{
"result": [
"{\"var1\":\"\",\"var2\":\"\"}"
],
"id": 140173798573824
}Is the id above a 32bit integer?
The following implementation was created for accessing an interface in Mormot2 and it works without a problem from Windows using SynCrossPlatformREST from mormot1 using Delphi 11.1
function TwbService.mydbver(const dbver: Integer): utf8string;
var res: TVariantDynArray;
begin fClient.CallRemoteService(self,'mydbversionis',1,[dbver],res);
Result:=res[0]; end;for a service defined as the following:
constructor TwbService.Create(aClient: TSQLRestClientURI);
begin
fServiceName:='wService';
fServiceURI:='wService';
fInstanceImplementation:=sicPerThread;
inherited Create(aClient);
end;When compiled for Android I am getting the following error:
Overflow while converting variant of type (int64) into type (integer)
the problem seems to happen in line 2918 from SynCrossPlatformREST and commenting this line problem does not exist
outID := doc.Value['id']; Am I missing something?
I can confirm that all the trouble was caused by the -CR switch in the debug mode.
I should check again the meaning of "Debug" in the dictionary
You had right.
Something is definitively wrong with your setup, I am afraid... or did you change the project options, or the mORMot source (e.g. changed mormot.defines.inc conditionals)?
@ab I have the 3.2.0-r45643 you mention in the documentation and it does not pass the mormot2 tests. Which revision are you currently using? I can test it if a revision works for sure with mormot2
Github desktop does not show me any changed file. I will deleted the mormot2 directory and I will give it a try after downloading it again with Github
I have sent to you in the last gist my projects' options in Lazarus for compiling but please forget my project's compile and use your time to finish mormot2.
For my development needs for the moment I have Delphi and I will try to use wineconsole for small cases that need Linux. It is not efficient but it will help while waiting.
Thank you again. And I apologize for the trouble.
dcoun wrote:I have managed to force fpcupdeluxe to install Free Pascal Compiler version 3.2.0-r45643 [2022/04/01] for i386
Not sure where you got that date from but 3.2.0 was released in 2020. Honestly if you're having issues just download 3.2.0 from offical freepascal webpage.
I copied the first line in logs from Lazarus while compiling.
It gives the complete version of FPC that is is used and the today's date.
how I managed to do that:
I deleted old fpcupdeluxe directory with lazarus and fpc. I re-run the fpcupdeluxe executable. From fpcupdeluxe-> Setup+ -> up-right in the dialog you can enter the SVN you like to be installed
After some hours of sleep I think I understood my mistake.
I will re-evaluate FPC when mormot2 will be officially available. I will find my way till that happens.
I learn a lot of things the last days, many thanks for help and your time, and I apologize for my ignorance.
Now the time is very limited and I have to catch all waiting for me to finish.
Have a nice month and be careful for le poisson d' Avril.
I have managed to force fpcupdeluxe to install Free Pascal Compiler version 3.2.0-r45643 [2022/04/01] for i386
package mormot2 again with clean and build
now the mormot2tests have one RED in 1.2 core process:
! - Encode decode JSON: 1 / 431,822 FAILED 385.27ms
clean and build my project and the above error in mormot.core.interfaces line 5349 still exists
I Reverted mormot2 to 3cd541a9 ... now I have the above error in:
TCCHookClass(fValueClass).RttiCustomSetParser(self);
I have just done that: Return to FPC 3.2.0 and I have the same above problem with defining the service
Lazarus 2.2.0 (rev lazarus_2_2_0-122-gb464aafe69) FPC 3.2.0 i386-win32-win32/win64
I am having Free Pascal Compiler version 3.2.0-r47409 [2022/03/31] for i386
Which version of FPCupdeluxe installs FPC SVN 45643 (3.2.0)?
Am I missing something else?
About TOrmApicities, I am sorry but I don't understand the problem you had.
The Fnomosid in the class was declared as TID. I changed it to Prtint and it works OK. In the documentation I read that I should not use a TID directly. I should have a "type TormtableID=TID" where the Tormtable is the orm class that has the TID and then declare the Fnomosid as TormtableID. But anyway, that is not a problem for me. I do not use joined orm classes. Mormot is so flexible that I do not needed it.
Forget about 3.2.3: it seems they forced runtime class type checking when class types are forced...
So TRttiCustomWrapper(rtti) is checked so that rtti is indeed a TRttiCustomWrapper - which is not the case, but it is fine because we just need to access a protected property.
Pretty weird and compatibility breaking for sure.
What means forget about 3.2.3. I can not compile it using 3.2 stable as you saw.
And now I can not define a service interface as you can see.
All the problems are with FPC. In Delphi 11.1 everything works as expected but I have prof edition.
I need a Linux x86-64 and arm64 mormot services, that it is the reason I am spending time to achieve FPC compilation.
What do you propose? How can I overcome it?
Perhaps the class hooking does not work on this FPC revision.
Please try https://github.com/synopse/mORMot2/commit/aa341c64
Thanks a lot @ab, I passed this problem
I noticed that after that I had a forgotten testing Tormclass (just defined and included in the Tmodel, no action on it in my software) with the following definition:
TOrmApicities=class(Torm)
private
Fnam:string;
Fnomosid:TID;
Fact:boolean;
published
property nam:string index 250 read Fnam write Fnam;
property nomosid:TID read Fnomosid write Fnomosid;
property act:boolean read Fact write Fact;
end; In Delphi, no error, no problem. In FPC 3.2.3 I am using now, I got an 219 runerror error during Tmodel.create in file mormot.orm.core line 9389
The problem was the TID that was not following the documentation in mormot.orm.core line 154 to have a type definition to the Torm it belongs.
I write it down as a difference in cross compiling the same code between Delphi and FPC.
Edit: The above is not a problem for me. Forget it
The problem is the now the following:
After that (only in FPC) I am getting an invalid typecast in file mormot.core.interfaces line 5349
p := pointer(TRttiCustomWrapper(rtti).fAutoCreateInterfaces); when defining an interface service
srvdb.ServiceDefine(TwbService,[IwbService],sicPerThread).ByPassAuthentication:=true;for the following interface:
TwbService = class(TInjectableObjectRest, IwbService)
private
protected
fTotalWorkCount: Integer;
public
procedure StartWork(const PrID: Integer; const onFinish: IwbCallback);
function TotalWorkCount: Integer;
function incDBver(const db,wid: integer):int64;
end;
initialization
GlobalInterfaceResolver.add(TypeInfo(IwbService),TwbService); Any help welcome. Thank you in advance
An unhandled exception occurred at $006C5CFA: EInvalidCast: Invalid type cast $006C5CFA SETPARSERTYPE, line 9670 of ../../../../../Delphi/G/mORMot2/src/core/mormot.core.json.pas $004DC185 CREATE, line 7330 of ../../../../../Delphi/G/mORMot2/src/core/mormot.core.rtti.pas $004DDB11 DOREGISTER, line 8104 of ../../../../../Delphi/G/mORMot2/src/core/mormot.core.rtti.pas $004DDBE2 DOREGISTER, line 8118 of ../../../../../Delphi/G/mORMot2/src/core/mormot.core.rtti.pas $004DEC4D NEWINSTANCE, line 8650 of ../../../../../Delphi/G/mORMot2/src/core/mormot.core.rtti.pas $004C779B CREATEEX, line 4382 of ../../../../../Delphi/G/mORMot2/src/core/mormot.core.data.pas $006CCBE9 GLOBALCRYPTALGOINIT, line 4284 of ../../../../../Delphi/G/mORMot2/src/crypt/mormot.crypt.secure.pas $006CA516 IMPLEMENTS, line 3305 of ../../../../../Delphi/G/mORMot2/src/crypt/mormot.crypt.secure.pas $00750A8D INITIALIZEUNIT, line 5338 of ../../../../../Delphi/G/mORMot2/src/crypt/mormot.crypt.ecc.pas $00750B68 MORMOT.CRYPT.ECC_$$_init$, line 5345 of ../../../../../Delphi/G/mORMot2/src/crypt/mormot.crypt.ecc.pas $0040F064
Trying to debug the above in function
function TRttiJson.SetParserType(aParser: TRttiParserType; aParserComplex: TRttiParserComplexType): TRttiCustom;
The class the error happens in processing class TRawUtf8List as it arrives to its ancestor class TObjectWithCustomCreate in line 9670
n := Props.Count;
TCCHookClass(fValueClass).RttiCustomSetParser(self); In the above before crashing the fValueClass is TCLASS($00923B70) in the debugger and (fValueClass)^ is __vtbl_ptr_type
Thank you. finally mormot2tests is green as administrator with last fpc version with fixes.
My initial problem still exists with this fpc version too, but I will rewrite the project adding Torm classes to see which can reproduce the problem
if you have any more suggestions, please tell me.
Thank you very much again
An unhandled exception occurred at $006C5CFA:
EInvalidCast: Invalid type cast
$006C5CFA SETPARSERTYPE, line 9670 of ../../../../../Delphi/G/mORMot2/src/core/mormot.core.json.pas
$004DC185 CREATE, line 7330 of ../../../../../Delphi/G/mORMot2/src/core/mormot.core.rtti.pas
$004DDB11 DOREGISTER, line 8104 of ../../../../../Delphi/G/mORMot2/src/core/mormot.core.rtti.pas
$004DDBE2 DOREGISTER, line 8118 of ../../../../../Delphi/G/mORMot2/src/core/mormot.core.rtti.pas
$004DEC4D NEWINSTANCE, line 8650 of ../../../../../Delphi/G/mORMot2/src/core/mormot.core.rtti.pas
$004C779B CREATEEX, line 4382 of ../../../../../Delphi/G/mORMot2/src/core/mormot.core.data.pas
$006CCBE9 GLOBALCRYPTALGOINIT, line 4284 of ../../../../../Delphi/G/mORMot2/src/crypt/mormot.crypt.secure.pas
$006CA516 IMPLEMENTS, line 3305 of ../../../../../Delphi/G/mORMot2/src/crypt/mormot.crypt.secure.pas
$00750A8D INITIALIZEUNIT, line 5338 of ../../../../../Delphi/G/mORMot2/src/crypt/mormot.crypt.ecc.pas
$00750B68 MORMOT.CRYPT.ECC_$$_init$, line 5345 of ../../../../../Delphi/G/mORMot2/src/crypt/mormot.crypt.ecc.pas
$0040F064Upgraded the new laptop to Lazarus 2.2.0 (rev lazarus_2_2_0-122-gb464aafe69) FPC 3.2.3 i386-win32-win32/win64 3.2.3-609-gd9ac2f58ad
Now I have only the following RED in the test:
! External database - SynDBRemote
! Exception ESqlDBRemote raised with messsage:
! TSqlDBServerHttpApi.Create: administrator rights needed to register URI root on port 888
As administrator it gives them all green.
Returned to my old laptop (same brand Siemens) i7-6500U 16GB ram Win10 20H2 19042.906
Lazarus 2.2.0 (rev lazarus_2_2_0-7-gb938b1d561) FPC 3.2.3 i386-win32-win32/win64
Save version of mormot2 from Github upgraded today
Tests passed - all green
Mormot is installed as the following:
Packages ->Open package file -> Selected \mORMot2\packages\lazarus\mormot2.lpk -> Compile, more-recompile clean, more-recompile all required
I am starting a memory test on the laptop, but I do not believe a memory problem exists in a problems that it is reproduced exactly the same.
For FPC bug seems, it does not like my CPU?
New laptop i7-1165G7 32GB ram running Windows 11 pro 21H2 22000.556
I deleted old FPCupdeluxe directory.
Github downloaded version 2.0.116 with Github Desktop. NO other version exists in this new PC
fpcupdeluxe-i386-win32.exe downloaded from Pre-release v2.2.0i of fpcupdeluxe. Just clicked the Install/update FPC+Laz button
fpcupdeluxe: info: FPCNativeInstaller (GetModule: FPC): FPC was at revision/hash: FRET_UNKNOWN_REVISION
fpcupdeluxe: info: FPCNativeInstaller (GetModule: FPC): FPC is now at revision/hash: release_3_2_2-0-g0d122c4953
Running TotalCommander searching for '*mormot*' in fpc+Laz dir Nothing found
Lazarus 2.2.0 (rev lazarus_2_2_0-0-g4d49533f10) FPC 3.2.2 i386-win32-win32/win64
Package Mormot v2.0.1 "recompile clean" + Recompile All required
Mormot2tests clean up and build
results:
! Core process - TDocVariant
! Exception ESynVariant raised with messsage:
! TDocVariant.DispInvoke: invalid (1) call
- TDecimal128: 17,446 assertions passed 4.48ms
! Core process - BSON
! Exception EVariantInvalidOpError raised with messsage:
! Invalid variant operation
3.3. Bidirectional remote connection:
- Websockets protocols: 30,000 assertions passed 18.75ms
- Run http server: 2 assertions passed 40.16ms
! - Soa callback on server side: 2,646 / 4,580 FAILED 10.19ms
! - Soa callback via json websockets: 3,969 / 6,898 FAILED 444.18ms
! - Soa callback via binary websockets: 3,969 / 6,898 FAILED 398.09ms
- Relay start: 4 assertions passed 35.80ms
! - Relay soa callback via json websockets: 3,969 / 6,899 FAILED 1.27s
- Relay connection recreate: 1 assertion passed 64.81ms
! - Relay soa callback via binary websockets: 3,969 / 6,899 FAILED 1.39s
- Relay shutdown: 2 assertions passed 297.95ms
- TRecordVersion: 20,068 assertions passed 173.88ms
Total failed: 18,522 / 82,251 - Bidirectional remote connection FAILED 4.18s
Alfred the download/install of fpc was done 25-30min ago for your logs
Any help is welcomed. I do not want to consume anyone's time.
Compiling the same source for linux I am getting the following for debug mode:
An unhandled exception occurred at $000000000053BA7F:
EAccessViolation: Access violation
$000000000053BA7F REDIRECTCODE, line 4141 of ../../../../../Delphi/G/mORMot2/src/core/mormot.core.os.pas
$000000000058A79E REDIRECTRTLCALL, line 1144 of ../../../../../Delphi/G/mORMot2/src/core/mormot.core.rtti.fpc.inc
$000000000059D2DA INITIALIZEUNIT, line 8882 of ../../../../../Delphi/G/mORMot2/src/core/mormot.core.rtti.pas
$000000000059D329 MORMOT.CORE.RTTI_$$_init$, line 8910 of ../../../../../Delphi/G/mORMot2/src/core/mormot.core.rtti.pas
$000000000041A44Cand the following for release more
An unhandled exception occurred at $00000000006B7387:
EHttpSocket: MainHttpClass: No THttpRequest class known!
$00000000006B7387Should I try FPC 2.2 with fixes?
I have only the following in 1.2 Core process:
! Core process - TDocVariant
! Exception ESynVariant raised with messsage:
! TDocVariant.DispInvoke: invalid (1) call
- TDecimal128: 17,446 assertions passed 4.41ms
! Core process - BSON
! Exception EVariantInvalidOpError raised with messsage:
! Invalid variant operationan accepted in SynDBRemote as I am not running it as admin
and the following:
3.3. Bidirectional remote connection:
- Websockets protocols: 30,000 assertions passed 18.66ms
- Run http server: 2 assertions passed 37.99ms
! - Soa callback on server side: 2,646 / 4,580 FAILED 8.81ms
! - Soa callback via json websockets: 3,969 / 6,898 FAILED 354.72ms
! - Soa callback via binary websockets: 3,969 / 6,898 FAILED 423.36ms
- Relay start: 4 assertions passed 34.62ms
! - Relay soa callback via json websockets: 3,969 / 6,899 FAILED 1.22s
- Relay connection recreate: 1 assertion passed 50.94ms
! - Relay soa callback via binary websockets: 3,969 / 6,899 FAILED 1.33s
- Relay shutdown: 2 assertions passed 279.34ms
- TRecordVersion: 20,068 assertions passed 187.54ms
Total failed: 18,522 / 82,251 - Bidirectional remote connection FAILED 3.97sThank you a lot Arnaud.
Probably, I did not noticed the redirect as I always set it automatically.
I am not sure for many about this Java server as I am not responsible for it. I can not be sure if it is due to the webserver or the firewall and authentication system that exists between.
I can assure you that all the Big and well Known company names exist between my request and this Java web server (including this O-Java server, I mentioned no names ).
Thanks again.
PS I have sent you an other gist about fpc and today's RTTI update in github did not change it. Thank you in advance.
I think the result code was 200 and not 302
I sent you a message about
trying to debug it I found that probably it is not related to basic authentication
headers are parsed ok but Http.ContentLength is -1 and that causes the body not to be parsed
The same url works ok with Twinhttp from mormot
var u: TUri;
h:THttpClientSocket;
i:integer;
begin
h:=THttpClientSocket.Create;
u.From('https://user:pass@url');
h.Open(u.Server, u.Port, nlTcp, 10000, u.Https);
i:=h.Get(u.Address,0,'Authorization: Basic '+u.UserPasswordBase64); //tested also: i:=h.Get(u.Address,0,'Authorization: Basic '+u.UserPasswordBase64+#13+#10);Response code with correct user/name password is 200 and h.http.content is empty (h.Http.ContentType is returned correct)
using no authentication or with wrong password response code is 401 and h.http.content is OK
calling h.GetBody does not help
Any ideas?
Thank you Arnauld, I though so about Zeos, so probably I should return back to 7.0 for the moment....
What exactly do you want to see from PCHRserver.lpr as is about 40 units. Do you wan to see the varman unit that it is in the Undefined symbol error message?
Concerning ZEOS problem?
With Lazarus 2.2.0 (rev lazarus_2_2_0-0-g4d49533f10) FPC 3.2.2 i386-win32-win32/win64
It is compiled for the first time giving again the same error.
After that, without changes it can not be compiled and I am getting an error:
PCHRserver.lpr(52,1) Error: Undefined symbol: TC_$VARMAN_$$_itp_vardisp_calldesc$VARMAN$3
Varman is an wrapper unit having a class that has a variant and add/returns data using PDocVariantData and _safe(_v)^
I can not test it for linux in debug mode as I am running lazarus in windows.
It can not reproduced in your side, but are you using windows or Linux?
Should I forget fpc for windows (I already have Delphi 11 Pro) and use it only for Linux?
Concerning the ZEOS problem in linux can you reproduce the following?
My linux executable is searching for libmariadb.dll and I have tried to set the location with both ways:
a) myzurl:=TZURL.Create('zdbc:mysql://',server,port,db,rootuser,rootpass,zopts); with zopts to have "zopts.Add('LibLocation='+{$IFNDEF OSWINDOWS}'/usr/lib/x86_64-linux-gnu/libmariadb.so')"
b) myzurl.LibLocation
Thank you in advance
Thank you very much for the reply.
The problem is much more complicated than I expected.
To run mormot2 server as a separate executable is OK for me and for my case.
For linux, I think it is more easy than windows.
To be honest, I am not sure how windows will deal with a service that executes programs and the program itself, but I will try
Thank you again
I am looking for an automatic update mechanism and totally independent of the operating system that the mormot2 server is running.
In windows, if running as a windows service, I do not want a second windows service to exist for stopping/updating/starting the mormot2 service.
In both linux and windows, you need a separate script/executable to restart the service and I am not in favor of
My idea is to compile the mormot2 server with everything it needs to a library:
1. A .dll for windows that can be loaded/unloaded by a simple windows service that checks if a updated version of the dll exists and does the dirty job: download it, verify integrity, stops the mormot2 server, unloads the dll, updates the dll, reload itself the dll, start again the mormot2 server
2. A .so library for linux that it is loaded by a linux executable that runs as a service with the excellent TSynDaemon and does the same thing as the windows service.
As I am not so experienced as you, what do you think of this idea? What are the possible problems that I could arrive to? Does it needs something special? Do you propose something else?
I already managed to compile a small mormot2 server as windows DLL with both Delphi and Lazarus/fpc, and it works from a windows service.
I have not managed to do the same thing in linux with Lazarus/fpc as I am receiving the following linker error when compiling the same library:
Verbose: Linking C:\pchr\projects\pchr\servers\fpc\libserverlib.so
Debug: C:\fpcupdeluxe\fpcupdeluxe\cross\bin\x86_64-linux\x86_64-linux-ld.exe: C:\DG\mORMot2\src\db\..\..\static\x86_64-linux\sqlite3.o: relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
Debug: C:\fpcupdeluxe\fpcupdeluxe\cross\bin\x86_64-linux\x86_64-linux-ld.exe: C:\DG\mORMot2\src\core\..\..\static\x86_64-linux\libdeflatepas.a(adler32.o): relocation R_X86_64_32 against `.text' can not be used when making a shared object; recompile with -fPIC
Debug: C:\fpcupdeluxe\fpcupdeluxe\cross\bin\x86_64-linux\x86_64-linux-ld.exe: C:\DG\mORMot2\src\core\..\..\static\x86_64-linux\libdeflatepas.a(crc32.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
Debug: C:\fpcupdeluxe\fpcupdeluxe\cross\bin\x86_64-linux\x86_64-linux-ld.exe: C:\DG\mORMot2\src\core\..\..\static\x86_64-linux\libdeflatepas.a(deflate_compress.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
Debug: C:\fpcupdeluxe\fpcupdeluxe\cross\bin\x86_64-linux\x86_64-linux-ld.exe: C:\DG\mORMot2\src\core\..\..\static\x86_64-linux\libdeflatepas.a(deflate_decompress.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
C:\fpcupdeluxe\fpcupdeluxe\cross\bin\x86_64-linux\x86_64-linux-ld.exe: final link failed: Nonrepresentable section on outputI am beginner with fpc and I have not managed to find anything about that. I have put the -fPIC in custom options and I have tried to use the options in "Compilation and Linking" without success
An probably this has to do with the compiled units from static.
Can you help me?
I decided to give a try to FPC and lazarus as @ab favors them
I have working code in delphi and in FPC in release mode but not in debugging for FPC
In Compiler Option Debugging, I have:
Check and assertion group all ticked
Generate info for the debugger ticked (Dwarf with sets)
Display line numbers in run-time errors ticked
Use Heaprtc unit ticked
All others are unchecked
-MObjFPC, Lazarus 2.2.0 (rev lazarus_2_2_0-122-gb464aafe69) FPC 3.2.3 i386-win32-win32/win64
An unhandled exception occurred at $006B732A:
EInvalidCast: Invalid type cast
$006B732A SETPARSERTYPE, line 9666 of ../../../../../DG/mORMot2/src/core/mormot.core.json.pas
$004CE255 CREATE, line 7328 of ../../../../../DG/mORMot2/src/core/mormot.core.rtti.pas
$004CFBC1 DOREGISTER, line 8096 of ../../../../../DG/mORMot2/src/core/mormot.core.rtti.pas
$004CFC92 DOREGISTER, line 8110 of ../../../../../DG/mORMot2/src/core/mormot.core.rtti.pas
$004D0CFD NEWINSTANCE, line 8642 of ../../../../../DG/mORMot2/src/core/mormot.core.rtti.pas
$004B980B CREATEEX, line 4373 of ../../../../../DG/mORMot2/src/core/mormot.core.data.pas
$006BE229 GLOBALCRYPTALGOINIT, line 4284 of ../../../../../DG/mORMot2/src/crypt/mormot.crypt.secure.pas
$006BBB56 IMPLEMENTS, line 3305 of ../../../../../DG/mORMot2/src/crypt/mormot.crypt.secure.pas
$0073619D INITIALIZEUNIT, line 5338 of ../../../../../DG/mORMot2/src/crypt/mormot.crypt.ecc.pas
$00736278 MORMOT.CRYPT.ECC_$$_init$, line 5345 of ../../../../../DG/mORMot2/src/crypt/mormot.crypt.ecc.pas
$0040ED44
An other problem I found is that LibLocation of mysql library dll is ignored when compiled in FPC (in Delphi it works)
I am using ZEOS 8.0-patches from marsupilami79 and Mormot2 from Github in both Delphi/FPC