#1 mORMot 2 » DCC error on delphi 2010 of the newest version » 2024-09-20 07:20:22

yslmyr1990
Replies: 1

hi,
the newest version of mORMot2 has some problem

[DCC Error] mormot.core.log.pas(3537): E2197 Constant object cannot be passed as var parameter

delphi2010 compile,OS is windows 11
delphi 12 is OK,no problem

#2 Re: mORMot 2 » How can I get Client IP on the server side? » 2024-05-29 00:32:37

ab wrote:

By convention, LowLevelRemoteIP equals '' if the client IP is 127.0.0.1.

but the client and server is on diffrent computer of the LAN, TRestHttpRemoteLogServer.RemoteLog(Ctxt: TRestServerUriContext) the LowLevelRemoteIP is ''

#3 mORMot 2 » How can I get Client IP on the server side? » 2024-05-28 09:50:42

yslmyr1990
Replies: 2

Why the LowLevelRemoteIP of ctxt: TRestServerUriContext is nil, the RemoteIP is nil too.

#4 Re: mORMot 2 » It`s seems like a BUG of TRestClientLibraryRequest » 2024-04-03 01:49:53

ab wrote:

I don't understand what you mean, sorry.
call.url is nil?

Do you mean that HTTP_NOTIMPLEMENTED should be tested instead of HTTP_NOTFOUND?

no,if call.url is null, after InternalUri() the call.OutStatus is HTTP_BADREQUEST.
sorry, i misunderstood before, i thought this code is test to connect the restserver in dll.

if call.OutStatus <> HTTP_BADREQUEST then

This seems right.

#5 mORMot 2 » It`s seems like a BUG of TRestClientLibraryRequest » 2024-04-02 15:13:25

yslmyr1990
Replies: 2

Hi ab,
   constructor of the TRestClientLibraryRequest, has some questions maybe.

...
   aClient := TRestClientLibraryRequest.Create(TOrmModel.Create([]), 'Project2.dll');
...
constructor TRestClientLibraryRequest.Create(aModel: TOrmModel;
  const LibraryName: TFileName);
...
  call.Init;
  InternalUri(call);
  if call.OutStatus <> HTTP_NOTFOUND then
  begin
    @fRequest := nil;
    LibraryClose(h);
    raise ERestException.CreateUtf8(
      '%.Create: % doesn''t export a valid LibraryRequest() function (ret=%)',
      [self, LibraryName, call.OutStatus]);
  end;
...
end;

if the call.url is nil, the call.OutStatus must be HTTP_NOTFOUND, then raise the exception. There will never be another return value.

I'm not sure if there's something wrong with what I'm using, or this is a bug.

The rest server in dll is a TRestServerFullMemory, just ExportServerGlobalLibraryRequest.

#6 Re: mORMot 2 » [DCC Error] E2201 Need imported data reference ($G) » 2024-03-20 14:32:40

ab wrote:

Did it previously work?
I don't remember having changed anything about crcblock().

Did you try with another/newer version of Delphi?

Did you search in the forum?
Did you try https://synopse.info/forum/viewtopic.ph … 802#p23802 ?

Or just try to not use packages.

Hi ab,
   I have try all above include {$define USEPACKAGES} , Change this setting to Generate DCUs only, and so on, but it`s seem like just not work on delphi 2010, the other version(i try delphi 12) is OK.
   Project1.dll build with runtime package Package1.bpl, and both them use The unit mormot.core.log.pas.
   i`m build a mOrmot.bpl public package to resolve my problem, thanks for your ansower.

#7 Re: mORMot 2 » [DCC Error] E2201 Need imported data reference ($G) » 2024-03-20 12:56:57

ab wrote:

Which compiler do you use?
With which language?

Does your project involve packages?

I think i know why,this dll requires a pulic package, and in the public package use Unit mormot.core.log.pas, do i need to build a mormot.bpl for every package? Or something to avoiding this problem?

#8 Re: mORMot 2 » [DCC Error] E2201 Need imported data reference ($G) » 2024-03-20 09:18:32

i use delphi 2010, and the project is a dll, build with the runtime packages

#9 mORMot 2 » [DCC Error] E2201 Need imported data reference ($G) » 2024-03-19 23:47:59

yslmyr1990
Replies: 6

Hi ab,
   After i pull code from the newest, i got a dcc error, even i reset the code, the error was still there, i don`t know why.
  [DCC Error] E2201 Need imported data reference ($G) to access 'crcblock' from unit 'mormot.crypt.core'

#10 mORMot 2 » Compling Error F2084 Internal Error:C15700 on newest code » 2024-03-14 02:23:19

yslmyr1990
Replies: 1

Hi Ab,
After i pull the newest code today, my project compling error on core.search.pas line 3131. IDE version is Delphi 2010.
[DCC Fatal Error] mormot.core.search.pas(3131): F2084 Internal Error: C15700

The sample MVCServer comple OK, but the sample which has vcl form comple error, like sample ThirdPartyDemos\tbo\04-HttpServer-InterfaceServices\TestRestClient.dpr

One more question:when i use RestClient in a dll,comple can`t find some function in *.inc,dll build with runtime package.

#11 mORMot 2 » When i test the demo httpServerRaw,i got an error » 2024-02-02 02:42:09

yslmyr1990
Replies: 1

The code of mORMot2 is newest,the exception raise on mormot.core.base.asmx86.inc function MoveFast line 192

@sml24: movq    qword ptr [edx + 8], xmm2     // second 8.

This is the call stack:

    mormot.core.base.MoveFast(???,???,???)
    mormot.core.buffers.TRawByteStringBuffer.RawAppend($8E99A3,17)
    mormot.net.server.THttpServerRequest.SetupResponse($3210098,-1,262144)
    mormot.net.async.THttpAsyncConnection.DoResponse(soContinue)
    mormot.net.async.THttpAsyncConnection.DoRequest
    mormot.net.async.THttpAsyncConnection.OnRead
    mormot.net.async.TPollAsyncSockets.ProcessRead($331DF00,(230210247126809292, 61209292, 53600000, 61209292, 53600000, (64204, 933, 57088, 817), (204, 250, 165, 3, 0, 223, 49, 3)))
    mormot.net.async.TAsyncConnectionsThread.Execute

My test enviroment is Delphi 11, windows 11, cpu is i7-1360P.
I try it on other Delphi version and Lazarus,it`s raise same exception.

Board footer

Powered by FluxBB