#1 2018-05-27 16:03:25

wai-kit
Member
From: Amsterdam, the Netherlands
Registered: 2012-11-27
Posts: 90

Compile error in DEBUG mode, but not in RELEASE mode???

Hi everybody,

Can somebody help me with this issue?
I get this compile error in unit mORMot when I compile my project with DEBUG settings on. With these settings off, no compile error...
The error is "Class or Object types TSetWeakZeroClass and TSQLRecordProperties are not related".
I am lost on how to solve this.

error_image

I am on the latest version of NewPascal (1.9) Win32.

Thanks in advance,
Wai

Last edited by wai-kit (2018-05-27 16:12:41)


fpcdeluxe, FPC 3.2 / Lazarus 2.0, mORMot on Windows 10 ...

Offline

#2 2018-05-27 21:07:51

hnb
Member
Registered: 2015-06-15
Posts: 291

Re: Compile error in DEBUG mode, but not in RELEASE mode???

I can't see the attached image. Did you try to clean all *.ppu and *.o files? Btw, 1.9 is the version of Lazarus, current NewPascal is 1.0.55.


best regards,
Maciej Izak

Offline

#3 2018-05-28 05:47:00

AOG
Member
Registered: 2014-02-24
Posts: 442

Re: Compile error in DEBUG mode, but not in RELEASE mode???

Goto Project Options -> Debugging -> then, uncheck "Verify method calls".

Offline

#4 2018-05-28 07:46:56

wai-kit
Member
From: Amsterdam, the Netherlands
Registered: 2012-11-27
Posts: 90

Re: Compile error in DEBUG mode, but not in RELEASE mode???

I did a clean and build, but to no avail.

I don't know why the image is nit showing with the img tag. According to the help docu it should.

Where do I find NewPascal's version info ?


fpcdeluxe, FPC 3.2 / Lazarus 2.0, mORMot on Windows 10 ...

Offline

#5 2018-05-28 08:18:33

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 11,482
Website

Re: Compile error in DEBUG mode, but not in RELEASE mode???

I guess that dropbox doesn't allow to nest images as <img> tags to avoid using their site as web content provider.
Direct link to https://www.dropbox.com/s/fbvsqpamlo2ayws/Error.JPG shows the error.
Error: Class or Object types ”arg1” and ”arg2” are not related
The doc says: "There is a typecast from one class or object to another while the class/object are not related. This will probably lead to errors."

What is weird is that the code line on the screenshot is 62444, whereas currently it is: 62530.

Try with the following syntax:

    result := TSetWeakZeroClass(TSQLRecordProperties(pointer(result)).fWeakZeroClass);

There is an explicit check of the type in the previous line, so this code is pretty safe (and fast, which helps for this method which is called very often with fake interfaces).

But the previous code was correct since Delphi 1, and with previous versions of FPC.
Did you change some lines in Synopse.inc ?

Offline

#6 2018-05-28 09:30:54

wai-kit
Member
From: Amsterdam, the Netherlands
Registered: 2012-11-27
Posts: 90

Re: Compile error in DEBUG mode, but not in RELEASE mode???

@Ab, I didn't change anything in the source of mORMot.

I noticed that this strange error only occured after I moved my source from Dropbox to OneDrive.  I copied the source back to
Dropbox and all is compiling/building without any errors. I have no explanation for it.

Also strange that the error occured in mORMot source since it's source resides on my local harddrive, C:.

Thanks everybody for taking the time.


fpcdeluxe, FPC 3.2 / Lazarus 2.0, mORMot on Windows 10 ...

Offline

Board footer

Powered by FluxBB