#1 Re: mORMot 2 » Delphi 11.2 problem with debugger in win64 with mormot2 » 2023-02-14 07:20:16

I can't reproduce that problem either, do it almost daily with "just the normal problems" of the Delphi debugger.

#2 Re: mORMot 2 » EAccessViolation at TUriTreeNode.RewriteUri » 2023-02-09 10:12:33

Just checked, definitely not and I have not used the TUriRouter either.


#3 Re: mORMot 2 » EAccessViolation at TUriTreeNode.RewriteUri » 2023-02-09 09:50:58


only came once at this point, at startup. No calls to the server at this point. And sadly, I cannot reproduce it al atm.


#4 mORMot 2 » EAccessViolation at TUriTreeNode.RewriteUri » 2023-02-09 05:16:21

Replies: 4

Today I got the following AV:

20230209 05111254 00000000AD4F394E  & EXCOS EAccessViolation (c0000005) [] at cc2926 
  mORMot.Net.Server.pas TUriTreeNode.RewriteUri (1729)  
  mormot.core.os.windows.inc GetModuleHandle (394) 
  mormot.core.os.windows.inc GetModuleHandle (394) 
  System.pas TMonitor.RemoveWaiter (20266) 
  System.Classes.pas ResetSyncEvent (15692) 
  System.pas @InitResStringImports (24792)

It happened only once with yesterdays mORMot2 sources. I cannot reproduce or give any hints as to when or why that happend. I simply started a mORMot-server and the AV happened. Restarting the server was without any problems.

I'll keep my eyes peeled, but wanted to put it out here in case anyone sees somethings similar or has any idea.

Sorry for being vague, but I can't tell more at this time :-(


#6 mORMot 2 » Please add TSynAutoCreateFieldsClass definition » 2023-02-06 10:55:48

Replies: 1

It would help in many cases to have the simple declaration of

TSynAutoCreateFieldsClass = class of TSynAutoCreateFields

in mormot.core.json, thus freeing us from declaring it elsewhere :-)


#8 Re: mORMot 2 » delphi compilation error after xxxxxxxxxxxxx » 2023-01-26 12:33:57

I have the same error message, you mark value as Pointer, but SortFind expects TOrmCacheEntryValueDynArray, which value is already.

#10 mORMot 2 » Unknown Identifier: rkGetIntegerPropTypes » 2023-01-18 10:04:03

Replies: 1


in the current drop in mormot.core.data -> IniToObject
at line 4421 you reference rkGetIntegerPropTypes

Delphi 11 does not know this one.


#11 Re: mORMot 2 » mORMot 2 Release Candidate » 2023-01-12 14:39:21

Hi Arnaud,

in mormot.db.core, you define _ENDCLAUSE (line 2410) with different options, suche as left, right, ..., how about adding WHERE itself? Would make it easier, when we build a where clause, that could be used in different contexts.


#13 Re: mORMot 1 » High-performance frameworks » 2022-12-16 05:54:01

Leads to a compiler error atm.

When using {$ifdef USE_WINIOCP}, in mormot.core.thread, line 3216 you call fSafe.Init, which is not defined for USE_WINIOCP.

#15 Re: mORMot 1 » IRestOrm - Retrieve Error Information » 2022-11-07 09:29:54

No one else wondering what the last error has been? How do you retrieve it, when using IRestOrm interface?

#17 Re: mORMot 1 » QuickJS und ServiceContainer » 2022-10-21 10:48:50

Well, happens. Would be nice to see it someday :-)

#18 mORMot 1 » QuickJS und ServiceContainer » 2022-10-21 08:57:49

Replies: 2


Is there already a way to grant access to registered factories to QuickJS scripts?


#19 mORMot 1 » IRestOrm - Retrieve Error Information » 2022-10-19 14:29:01

Replies: 2


when using IRestOrm (mORMot2) and running into an error, it would be nice to get access to the error code returned by the sql engine.
Internally it runs TSqlRequest.Step and that raises an ESqlite3Exception, but the user of IRestOrm cannot get any details on the error occured.

Is there a way to access those information for possible internal handling of such situations.


#20 Re: mORMot 1 » SetPropsFromText and TArray<...> » 2022-09-26 06:36:08

While this part works now, I have noticed another small, Delphi specific glitch around that. From the original sample code, I used


to get the type.
When using TArray it propagate as


Due to including the unit name, FindType will not recognize the Type. Should prop value name be handled specific in that case?

I uploaded example it would generate

SomeStr: UTF8String;Fail:TArray<Decl.TPpCallSecurityRight>;

<-- note the Decl.


#21 Re: mORMot 1 » Project opens in full window and cannot resize » 2022-09-26 04:05:30

The question remains, what project are you talking about? All mormot demos work normal, not as described. Simply reset your repo to the one distributed.

#22 Re: mORMot 1 » SetPropsFromText and TArray<...> » 2022-09-23 09:13:49

Digging deeper, you call GetNextFieldProp, which in turn only selects alphanumeric and underscores

  while tcIdentifier in tab[P^] do
    inc(P); // go to end of ['_', '0'..'9', 'a'..'z', 'A'..'Z'] chars

Therefore, the <....> part never becomes part of the typename, therefore failing the test in lns 9000+


#23 Re: mORMot 1 » SetPropsFromText and TArray<...> » 2022-09-23 09:10:05

Checking into it (ln 7900)
alen = 6
aname = 'TArray'

so, Typename does not contain the expected 'TArray<TPpCallSecurityRight>, but simply TArray.

#24 Re: mORMot 1 » SetPropsFromText and TArray<...> » 2022-09-23 09:06:07

Here is a simple sample, breaking with TArray<...>, working with array of ...


Enable/Disable lines 14&17 to see difference.

#25 Re: mORMot 1 » SetPropsFromText and TArray<...> » 2022-09-22 14:58:38

Hm, it crashed on me today, I'll give more details tomorrow. Had just shut down my VM. :-D


#26 Re: mORMot 1 » Forum Search future does not work » 2022-09-22 09:55:06

radexpol wrote:

I have to wait 30 second to retry all other variations of my search criteria.

Especially, when signed into the forum as known user, yeah, I read you and feel the same.

#27 mORMot 1 » SetPropsFromText and TArray<...> » 2022-09-22 08:57:11

Replies: 8


in Delphi, there is the possibility to declare arrays using TArray<...> rather than array of ..., which has a few advantages.

However, TRttiCustom.SetPropsFromText only handles array of ..., when parsing a string of properties.

When using code such as

  OrigRtti := Rtti.RegisterClass(aOrmClass);
  for var Prop in OrigRtti.Props.List do
      PropText := PropText + ';' + Prop.Name + ':' + Prop.Value.Name;

Prop.Value.Name will return TArray<...> when declared in that way.

Is there a fair chance of getting TRttiCustom.SetPropsFromText to work with TArray<...>, which from a mORMot pov would be the same, as array of ... ?


#29 mORMot 1 » ZLib Vulnerability » 2022-09-01 08:55:01

Replies: 2

Hi Arnaud,

not sure this affects mORMot as well, but here we go


#30 Re: mORMot 1 » Fatal Error (Exception External:?) in Interfaced based Services » 2022-08-26 06:27:21

Service Methods shall never leak Exceptions, rather work with return codes. IIRC that is mentioned in the documentation. Thus allowing the framework to optimize for speed. If exceptions may occur in your service method, you are required to use try...except...end to catch those.

#31 Re: mORMot 1 » Using CopyObject always copies arrays without creating copies elements » 2022-08-11 10:41:30

still wondering what copyobject does, if not copy an objects properties...

#32 Re: mORMot 1 » Using CopyObject always copies arrays without creating copies elements » 2022-08-01 12:06:42

Created a sample, explaining what I'd expect from copy object, and what I actually get...


#33 mORMot 1 » Using CopyObject always copies arrays without creating copies elements » 2022-08-01 06:01:02

Replies: 3


not sure, whether it is as-designed, or a bug.

I have a KDD object with published object arrays (all deriving from TSynAutoCreateFields. When creating a copy, using CopyObject from mormot.core.rtti, all properties get copied.

However, for dynarrays, it creates a copy of the array, but not the elements itself.

Internally, it flows from CopyObject -> cf.Props.CopyProperties(pointer(aTo), pointer(aFrom)) -> Value.ValueCopy(Dest + OffsetSet, Source + OffsetGet) -> fCopy(Dest, Source, fCache.Info) [aka mormot.core.rtti. _DynArrayCopy ] -> DynArrayCopy. There it calls Info^.DynArrayItemType(itemsize) to determine the array element type.

In mormot.core.rtti.delphi.inc, this is defined as

function TRttiInfo.DynArrayItemType(out aDataSize: PtrInt): PRttiInfo;
  with GetTypeData(@self)^ do
    aDataSize := elSize;
    result := pointer(elType);
    if result <> nil then
      result := PPointer(result)^;

elType seems to be nil always. Defined in Delphi Rtti only for managed arrays, which those seem not to be. However, using

result := pointer(elType2);

will actually return the expected array element type.

So, my question would be, is CopyObject supposed to create copies of the array elements, or just the array itself. If later, the idea of TSynAutoCreateFields breaks, however.
Using Delphi 11 ;-)


#34 mORMot 1 » SynDBExplorer and mORMot2 » 2022-07-22 09:18:20

Replies: 0

Has anyone already tried porting the SynDBExplorer to mORMot2?


#35 Re: mORMot 1 » High-performance frameworks » 2022-07-21 13:07:50

ab wrote:

Let's see where our little rodent will be.:)


#36 Re: mORMot 1 » Documentation as for mORMot 1... » 2022-07-12 07:33:57

Wonderful, thanks a bunch!


#37 Re: mORMot 1 » HtmlEscapeMarkdown output does not match specification » 2022-07-12 07:31:51

The ones mentioned by tbo are standard of almost all. As a well known one, I'd suggest the github md style:
https://docs.github.com/en/get-started/ … ing-syntax


#38 mORMot 1 » Documentation as for mORMot 1... » 2022-07-11 13:02:16

Replies: 2

Hi Arnaud,

are there plans to release a compiled doc, as you have for mORMot 1 on https://synopse.info/files/html/Synopse … 01.18.html ?

It's a wonderful way to get new users started :-)


#40 Re: mORMot 1 » mORMot 2 Release » 2022-06-08 04:55:18

I am not using it on production yet, simply because our product is way away from alpha release. However, in day to day development use and testing, it's running flawless.

However, no haevy duty tests yet, no massive connections, etc. So I should not be taken seriously, when I say: go ahead ;-)


#41 mORMot 1 » Value assigned to 'TAlgoCompress.FileUnCompress' never used » 2022-05-23 05:51:18

Replies: 1


in mormot.core.buffers.pas, line 5660, that hint appears.

Possbily change to

if not StreamUnCompress(S, D, Magic, ForceHash32) then


#42 Re: mORMot 1 » what happened to ab? » 2022-05-06 15:23:16

He is fine, just "out of network for a week".

#43 Re: mORMot 1 » TDocVariant.names raise AV » 2022-05-06 09:27:41

This is rather a behavior designed as-is in Delphi. If the DCU timestamp is newer than the timestamp of the PAS file with the same name, the DCU is considered to be correct on compile. Only a rebuild will fix that. This saves compile-time and is sufficing in most cases. This is not a fault of mORMot.

#44 Re: mORMot 1 » Forum search for class names » 2022-04-13 12:04:35

And while were are at it, could the "wait before searching again" be turned down for logged in users?

#45 Re: mORMot 1 » How to setup the TLS version for THttpApiServer? » 2022-04-12 04:46:45

What OS are you using?

TLS 1.2 support comes from the OS, for Windows this support was introduces with Windows 8.1.


#46 Re: mORMot 1 » Error in mormot.core.buffers » 2022-03-07 07:13:50

Bad compiler message, problem is, that Delphi expects reintroduce; before overload;, not thereafter. Lines 2228 and 2230.

#47 Re: mORMot 1 » Stop the war! » 2022-03-02 06:02:18

Hi Pavlo,

i haven't been online since last week - taking a break from work working on other things. This war has been long in coming and is as insane as it gets. I am ashamed of the sub-par response from Europe and the world as to this aggression. Nowadays all you get is a few sanctions, usually hitting the people, rather than the leaders. Which of them cares not being allowed to fly into Europe - but the honest people are blocked from traveling. And it is certainly no help at all to you as Ukrainians. I just hope politicians finally get their asses up and send some real help to you. Putin ain't stoppin' there...


#48 Re: mORMot 1 » v1.18.4952 is the best? » 2021-12-10 07:17:40

Pretty much everything, we want automated. As sample (sorry for posting directly, but that makes discussing easier:

  [PXDomain, PXDomainSubstitute, PXDomainEasyAccess, PXCrudRW, PXDomainHistoryEnable, PXDomainLink(TPpAddress, 1), PXDomainLink(TPpContactPoint, 1)]
  TPpDoc = class(TPpUser)
    [PXDomainElement] property EFN: UTF8String read FEFN write FEFN;
    [PXDomainElement] property Birthname: TPpPersonName read FBirthname write FBirthname;

Our Domains, which the client may work with, look something like that - at the start all of them are analyzed and prepared. The meanig for those attributes are:

  • PXDomain - available for client use

  • PXDomainSubstitute - replaces the parent domain (TPpUser) in all services/calls automatically, thus allowing us creating a base server framework that can be reused for other purposes. This server will be for docs, but the same server/client framework will be implemented for support as well, where the TPpUser might be overridden by TPpSupportMember

  • PXDomainEasyAccess - Allow general functions to be used for streaming/searching/creation/etc for that domain, so that the developers do not have to write some vanilla code for every domain (relies heavily on generics)

  • PXCrudRW - client may read/write, but not delete data

  • PXDomainHistoryEnable - automatically versioning for this record

  • PXDomainLink(TPpAddress, 1), PXDomainLink(TPpContactPoint, 1) - link to other domains, and at least one of each is needed for the record to be valid - no need to declare ORM records for the link tables, or anything. This one line does it all.

PXDomainElement marks elements of the domain, which the client may manipulate, we have many more attributes for validators, constraints, etc.
Thus, the developer simply declares, what he needs, all the validation/transformation/historization/etc. is automated

Similar it is for the MVC routines, the ones available are marked with information as to which input/output parameters, the calls can be marked for access rights, thus the call never gets to them, if the current user misses the rights needed to access them. Call can be marked asynchronous, so that the server automatically spawns a new thread, before the actual MVC call is started, automatically taking their results and sending them out over websockets as they are done, or if those are missing, they will be send piggy back with any next client call made.

  [PXModule('Users', 'Benutzerverwaltung', 'core', nil, True, True)]
  TPpUsersApplication = class(TPpMvcApplication)
    [PXCall('number', TPpUser), PXUserRights(purtUserAdministration)]
    procedure User_Get(const aCtxt: TPpSQLRestServerURIContext);

Here you see part of the generic user library access. In our main product, though declared using TPpUser, the call will return a TPpDoc (see above), as this one overrides TPpUser, thus allowing the client to show all Data of TPpDoc, not just TPpUser. This needs no changes to the code of the module, there very same code will be used for our support server and the cloud administration server, each and every time returning different record types, based upon which class actually will manage the users of the system. Input is a single number (record id ;-) ), and the caller needs rights to the user administration, in order to access the call. All is part of the "users" module, part of the "core" system.

And so on, attributes basically allow us to automate almost all mundane tasks of development and we concentrate solely on the business logic. The client (web client completely done in TypeScript) gets all those information from the server and will be able to render the UI based on the rights of the user, modules started, etc. The framework will take about 1 1/2 years t develop, but afterwards we hope to reuse it for many internal projects.

#49 Re: mORMot 1 » v1.18.4952 is the best? » 2021-12-09 20:54:24

edwinsn wrote:

Is the use of [Attributes] a new feature in mORMot 2? That sounds good, ...

Just part of Delphi, the creation and use of them is part of our internal development team.

#50 Re: mORMot 1 » v1.18.4952 is the best? » 2021-12-09 16:09:24

@edwin - I would think it should be possible, depending on the size, it might take a while, but it will be worth it.

However, I have used mORMot1 in my old company, at my current place I've started right out with mORMot2 and have to recreate things from scratch. It is different, but similar that it is, usually, easy enough to adapt my knowledge. We use Delphi, not FPC, because of the [Attributes] which gives me an amazing power to extend mORMot easily even further - and I love it :-) Many things in our new app will be working by simply marking things using attributes, up to replacing whole classes in services with more refined versions.

Board footer

Powered by FluxBB