Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal Error: URW1147 #255

Closed
Uefi1 opened this issue May 28, 2024 · 21 comments
Closed

Internal Error: URW1147 #255

Uefi1 opened this issue May 28, 2024 · 21 comments

Comments

@Uefi1
Copy link

Uefi1 commented May 28, 2024

Hello in the new version 2.2 when trying to compile on Delphi XE2 error F2084 Internal Error: URW1147 this error occurs in the file mormot.core.json

@synopse
Copy link
Owner

synopse commented May 28, 2024

Did you try with the latest trunk revision?

@Uefi1
Copy link
Author

Uefi1 commented May 28, 2024

Oh, sorry, not version 2.2, but the latest one, if downloaded via github>code>download

@synopse
Copy link
Owner

synopse commented May 28, 2024

This is a compiler bug, specific to XE2.
I don't have this compiler installed, so I can't fix it. It work on my side with Delphi 2010 and XE4.

@Uefi1
Copy link
Author

Uefi1 commented May 28, 2024

This is a compiler bug, specific to XE2. I don't have this compiler installed, so I can't fix it. It work on my side with Delphi 2010 and XE4.

You know, I once encountered such a bug, the problem was in the inline directive

@synopse
Copy link
Owner

synopse commented May 28, 2024

Yes, I know but without a compiler, I don't know how to circumvent it.

You could try to disable some "inline;" in the source code, perhaps not even in mormot.core.json but in mormot.core.rtti.
Try first to add {$undef HASSAFEINLINE} in the beginning of the unit.

@Uefi1
Copy link
Author

Uefi1 commented May 28, 2024

Damn, there’s something deeper there, I tried as you said, but it didn’t work ( I can’t even track this error with a debugger (

@Uefi1
Copy link
Author

Uefi1 commented May 28, 2024

Hi, it looks like the latest release that compiled without this error is b546540

@synopse
Copy link
Owner

synopse commented May 29, 2024

I don't get how 30b619c2813a3 (the very next commit) could be invalid for Delphi XE2. It is 64-bit specific code, which is not used by XE2 at all.

@Uefi1
Copy link
Author

Uefi1 commented May 29, 2024

Or maybe the binaries do not fit the latest library and that’s why the error occurs?

@synopse
Copy link
Owner

synopse commented May 29, 2024

URW errors are a pure Delphi compiler bugs.
It is just a bug of the compiler which is not able to compile the code.
Nothing to do with static linking of external librairies.

@Uefi1
Copy link
Author

Uefi1 commented May 29, 2024

Can you somehow fix this ?

@synopse
Copy link
Owner

synopse commented May 30, 2024

Without the compiler itself, I can't.

@Uefi1
Copy link
Author

Uefi1 commented May 30, 2024

Try downloading Delphi XE2 ?

@Uefi1
Copy link
Author

Uefi1 commented May 30, 2024

Hello, I actually found the latest version that still compiles on Delphi XE2, this one:
0f65917

@synopse
Copy link
Owner

synopse commented May 30, 2024

What if you change
procedure AddU(Value: PtrUInt);
into
procedure AddU(Value: cardinal);
in mormot.core.text ?

@Uefi1
Copy link
Author

Uefi1 commented May 31, 2024

No, unfortunately it didn’t help =(

@synopse
Copy link
Owner

synopse commented Jun 3, 2024

I was able to install a Delphi XE2 compiler.

First of all, I see no problem with Win32 target.
Only on Win64 I got this F2084 Internal Error: URW1147.
I will try to investigate. Delphi is just buggy as hell.

It sounds linked to generics: https://stackoverflow.com/questions/9429484/what-should-i-do-about-an-internal-error-when-i-declare-a-generic-array-of-t
But even if I disable generics... it does not compile...

@synopse
Copy link
Owner

synopse commented Jun 3, 2024

@Uefi1
Did you install all available updates on your Delphi XE2? That is UP4+HF1?
https://blog.marcocantu.com/blog/delphi_xe2_hotfix_4_1.html

synopse pushed a commit that referenced this issue Jun 3, 2024
@synopse
Copy link
Owner

synopse commented Jun 3, 2024

Please try with this above commit.

@Uefi1
Copy link
Author

Uefi1 commented Jun 4, 2024

Please try with this above commit.

Yes, this commit compiles successfully, it worked, thank you very much =)

@Uefi1
Copy link
Author

Uefi1 commented Jun 4, 2024

Hurray, the latest version now compiles if you download it from github>Code>download zip thanks for the correction !

@synopse synopse closed this as completed Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants