Looking for an workaround for set of 0..255

Hi,

At moment we’re having problems with a specific kind of variable.

In a class, we have declared a set type:

type TCOD = public Set of 0..255;

In another class we have declared a bunch of const type, for example:

const
COD_EXAMPLE_0 = 0;
COD_EXAMPLE_1 = 1;
COD_EXAMPLE_2 = 2;

and a in the same class var like:
class var CONST_LIST : TCOD := (COD_EXAMPLE_0,COD_EXAMPLE_1,COD_EXAMPLE_2);

When calling this list CONST_LIST from a 3rd class we are constantly receiving not found field:

System.MissingFieldException
  HResult=0x80131511
  Message=Campo não encontrado: 'CSLog.basegeral.TCodigo.CONST_LIST'.
  Source=dxserver
  StackTrace:
   at CSLog.dxserver.ZipcodeService.solicitaContatos(Int32 id_contr, Int32 usuario, String cpf) in D:\siscob_trunk\net\dxserver\ZipcodeService_Impl.pas:line 205
   at CSLog.dxserver.ZipcodeService_Invoker.Invoke_solicitaContatos(IROService ___Instance, IMessage ___Message, IServerChannelInfo ___ServerChannelInfo, ResponseOptions& ___oResponseOptions) in D:\siscob_trunk\net\dxserver\dxserver_Invk.pas:line 977
   at RemObjects.SDK.Server.ServerChannel.InvokeMethod(ServiceInfo serviceInfo, IServerChannelInfo channel, IMessage message)

Instead, calling the directly the const ones. It works fine.

Windows: 7
RemObjects: RemObjects Data Abstract for Water and Visual Studio, Server Edition - 10.0.0.1495.exe
Water: RemObjects Elements with Water - 10.0.0.2607.exe

Before updating this structure was working fine. Is there any change on Echoes?

Sry for my english.

Regards.

Hi.

Any chance you could put this together as a small self-contained test case, ideally without dependency in Remoting SDK?

Thanks!

Hi.

I apologise for the the delay.

I`ve developed a small test case from scratch of our solution within the problem:

  1. I`ve tested declaring the Set 0…255 using the call inside the same class. It worked fine;

  2. But acording our project the base classes are used widely and when called from client aplication the server return the mentioned error right here:

BusinessLogicLibrary_Intf.pas
self.ClientChannel.Dispatch(___localMessage);

The problem is related to this calling at
RemObjectsServerTest
Class: BusinessLogicService_Impl.pas

method Process(value: System.String): System.Int32; virtual;    
begin
  var base : TBase;            
  var base_return : String;
  
  base_return := base._teste(TCodigo.CONST_LIST);  **<~ HERE (Line ~ 69)**

  if (String.IsNullOrEmpty(value)) then begin
    Result := -1;
  end else begin
	      Result := (base_return + "Secret Salt").GetHashCode();
  end;
end;

Case RemObjects 2021-03-17.zip (2.6 MB)

Regards.

no matter which solution I open, the projects are missing because the relative file paths seem to be all wrong (the zip has everything flat?)

HI,

I’ve openned on Water and VS 2019 and worked fine.

Re-Uploaded:
Case.zip (2.6 MB)

What Is exactly wrong?.

Using Ebuild - Both were compiled correctly.

Regards.

this one has folder structure. I’ll have a look at the project in the morning.

Any chance you can narrow this down to a simple test case that does not rely on Remoting SDK? this one still does.

Hi, good morning.

I figured out the problem, was on the preferences of the project, I`ve deleted the files in the folder “.vs”

Follow both projects uploaded again.

Case element_2021-03-18.zip (3.6 MB)

About “does not rely on Remoting SDK”, what do you mean? Do you have an example?

Regards.

Your problem is a compiler issue, right? so it should be able to be reproduced in a simple app that, say, just has one or two classes, and does not rely on “third party” libraries that have nothing to do with the problem, such as Remoting SDK.

This new zip is missing the folder structure again; all the files are in one folder, meaning all the relative paths between solution, projects, and files etc are broken. :(. Whatever tool you are using to create these zips seem to have a problem…

Hi

So. I don`t know what is the issue, because the problem hits in the class named as “_Invk.pas” (Generated Automatically by the Edit Server Lib)

This is why I`ve sent a sample of Remoting SDK.

Regards.

This new zip is missing the folder structure again; all the files are in one folder, meaning all the relative paths between solution, projects, and files etc are broken. :(. Whatever tool you are using to create these zips seem to have a problem…

I did it using Visual Studio on Windows 7. Do you have an Windows environment?

Regards

Ah, I see. But the Ink class just calls your service class, and that has the bug, right? so ideally this should repro without going thru RO. But in any case, I’ll just log tis with the team and see if they can repro from what we have.

I do, but that should not matter, as the compiler is the same whether I’m on Mac or Windows. Your latest zip is broken, as was the first one (the previous one was fine); all the filenames are mangled and have \ in their names, rather than having the proper folder structure, as you can see in my screenshot.

I recommend, on Windows, just right-clicking the folder and choosing “Send to Compressed Folder” to zip; that has been working reliably in my experience.

Thanks, logged as bugs://85743

HI,

Ok, may be the software Zip I`m using.

Zipped using 7zip software:

Case element.zip (3.6 MB)

Regards.

That one’s good again, thanx. I recommend to tell the makers of 7zip that their zip files are not compatible cross-platform :wink:

FWIW, I see no reverify errors for the three binaries (usually peveerify will flag errors that would cause a System.MissingFieldException or the like).

➜  Cherry:~/Downloads/Case element/RemObjectsServerTest/bin/Debug # peverify RemObjectsServerTest.exe
➜  Cherry:~/Downloads/Case element/RemObjectsServerTest/bin/Debug # peverify base.dll
➜  Cherry:~/Downloads/Case element/RemObjectsServerTest/bin/Debug # peverify basegeral.dll

I’ll have to leave this with the compiler team.

bugs://85743 got closed with status fixed.

HI

Where can I find the new version?

Regards.

This will be in coming Friday’s build, 2615.