#1 Re: mORMot 2 » ObjArrayAdd mormot.core.base vs mormot.core.os » 2024-02-23 10:19:27

I've checked through, there are not to many instances. I could create a pull request of the relevant places I've found, however, more may exist.

#2 mORMot 2 » ObjArrayAdd mormot.core.base vs mormot.core.os » 2024-02-23 10:13:26

sakura
Replies: 1

Hi,

in mormot.core.os is a method ObjArrayAdd with different params, than in mormot.core.base.
When both units are referenced, Delphi cannot find the correct version to call.
For example in mormot.core.unicode and mormot.core.rtti the compiler stops, only when prefixing them with mormot.core.base the compiler will find the correct one.
I am sure more instances would occur, when I look further.

Regards,
Daniel

PS: Current commit on github

#4 mORMot 2 » Changes in TJsonSaveContext » 2023-11-24 07:25:03

sakura
Replies: 2

Hi Arnaud,

it's been a while that I had a chance to update my local mORMot2 rep, as another project attacked my (not so) well laid out time table.

Anyway, one change, that grabbed my be surprise, is the use of records with methods, rather than the previous object approach. In mormot.core.json defines the TJsonSaveContext. In our project, I have created my own version of the (previously) object, and could, through a helper object, easily access the fields

    W: TJsonWriter;
    Options: TTextWriterWriteObjectOptions;
    Info: TRttiCustom;
    Prop: PRttiCustomProp;

to implement very specific sub cases. I do propose making those fields public, please :-)

Regards,
Daniel

#5 Re: mORMot 2 » Away From Keyboard for 2 Weeks » 2023-05-30 04:38:36

Well deserved. Enjoy and relax and refill!

#6 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.

#7 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.

Regards,
Daniel

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

Hi,

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

Regards,
Daniel

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

sakura
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 :-(

Regards,
Daniel

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

sakura
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 :-)

Thanks,
Daniel

#13 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.

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

sakura
Replies: 1

Hi,

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

Delphi 11 does not know this one.

Regards,
Daniel

#16 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.

Regards,
Daniel

#18 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.

#20 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?

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

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

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

sakura
Replies: 2

Hi!

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

--Daniel

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

sakura
Replies: 2

Hi,

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.

Regards,
Daniel

#25 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

Prop.Value.Name

to get the type.
When using TArray it propagate as

TArray<Unitname.Typename.SubTypeName>

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.

Regards,
Daniel

#26 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.

#27 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+

Regards,
Daniel

#28 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.

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

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

https://pastebin.com/JyzF67hN

Enable/Disable lines 14&17 to see difference.

#30 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

Thanks,
Daniel

#31 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.

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

sakura
Replies: 8

Hi,

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 ... ?

Regards,
Daniel

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

sakura
Replies: 2

Hi Arnaud,

not sure this affects mORMot as well, but here we go
https://nvd.nist.gov/vuln/detail/CVE-2022-37434

Regards,
Daniel

#35 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.

#36 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...

#37 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...

https://pastebin.com/M4h7sWTb

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

sakura
Replies: 3

Hi,

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;
begin
  with GetTypeData(@self)^ do
  begin
    aDataSize := elSize;
    result := pointer(elType);
    if result <> nil then
      result := PPointer(result)^;
  end;
end;

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 ;-)

Regards,
Daniel

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

sakura
Replies: 0

Has anyone already tried porting the SynDBExplorer to mORMot2?

Regards,
Daniel

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

ab wrote:

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

<3

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

Wonderful, thanks a bunch!

--Daniel

#42 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

Regards,
Daniel

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

sakura
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 :-)

Regards,
Daniel

#45 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 ;-)

--Daniel

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

sakura
Replies: 1

Hi,

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

Possbily change to

if not StreamUnCompress(S, D, Magic, ForceHash32) then
  exit(False);

Regards,
Daniel

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

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

#48 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.

#49 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?

#50 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.

Regards,
Daniel

Board footer

Powered by FluxBB