Recent

Author Topic: EResource error on startup with trunk cross compile to arm (solved)  (Read 1461 times)

Bram71

  • New Member
  • *
  • Posts: 26
I have a project that gives a EResource error on startup trying to read form.left when compiled with latest trunk cross compiler installed with fpcupdeluxe on XUbuntu 18.04 64 bit (last few days).

When i compile the same project with "fixes" FPC 3.2 and Lazarus 2.0 the project runs fine on armv7a, debian on beaglebone black without any errors. Also when using trunk and compiling to x86-64 Linux (native for my system) everything works fine.

Anyone else having EResource errors after cross compiling with current trunk?

I did a clean reinstall of trunk several times last few days (and also today) to verify the problem persisted and have now reverted back to FPC 3.3.1-r42309 and Lazarus 2.1.0 r61490 from around 30-06-2019. When cross compiling the project with that version without changing anything, everything is ok...

I did notice the "working" compiled executable is about 100 kb bigger than with latest trunk
« Last Edit: July 22, 2019, 12:00:07 pm by Bram71 »

Thaddy

  • Hero Member
  • *****
  • Posts: 14198
  • Probably until I exterminate Putin.
Re: EResource error on startup with trunk cross compile to arm
« Reply #1 on: July 21, 2019, 08:30:37 pm »
I can not reproduce this. Either with linux-x86_64 or Windows 10 cross compiling for Raspberry Pi.
Specialize a type, not a var.

Bram71

  • New Member
  • *
  • Posts: 26
Re: EResource error on startup with trunk cross compile to arm
« Reply #2 on: July 22, 2019, 10:14:18 am »
Ok, thanks for testing.

I also tried with a new "empty" project (single form) and that also gives me a AV but now on trying to read Form1.LCLVersion... Now setting up a "clean" XUbuntu 18.04 vm with latest trunk to see if its something specific to my work pc.

Bram71

  • New Member
  • *
  • Posts: 26
Re: EResource error on startup with trunk cross compile to arm (solved)
« Reply #3 on: July 22, 2019, 11:59:39 am »
Ok,

Tested on Win7 x64 vm and on a "clean" XUbuntu x64 vm and both cross compile ok. Dit a clean reinstall on my work pc and now also ok on that system so whatever the cause was, appears to be fixed now.

Again thanks for testing.

wp

  • Hero Member
  • *****
  • Posts: 11854
Re: EResource error on startup with trunk cross compile to arm (solved)
« Reply #4 on: July 22, 2019, 12:21:38 pm »
The IDE does not always detect when something is changed in the resources needed by a project. So, when I get a resource error after a simple "Run" > "Compile", I always do a "Run" > "Build" of the project.

Thaddy

  • Hero Member
  • *****
  • Posts: 14198
  • Probably until I exterminate Putin.
Re: EResource error on startup with trunk cross compile to arm (solved)
« Reply #5 on: July 22, 2019, 01:52:06 pm »
The IDE does not always detect when something is changed in the resources needed by a project. So, when I get a resource error after a simple "Run" > "Compile", I always do a "Run" > "Build" of the project.
Yes, when the code is unaltered but the resource content has changed you should always do a full build.
Specialize a type, not a var.

Bram71

  • New Member
  • *
  • Posts: 26
Re: EResource error on startup with trunk cross compile to arm (solved)
« Reply #6 on: July 22, 2019, 04:31:02 pm »
Yes, i know, thanks for the tips and i hope it helps someone.

It's one of those pitfalls for the less experienced (i started in TP times)

When in doubt i always do a cleanup and build, especially when switching target platform(s) and or debug to release modes (including fcl / lcl) just to be sure.

In my projects i also use cpu + platform dependent unit output directory's in a dedicated folder i can clear beforehand (its actually on a tmpfs / ramdrive on my system).

Also keeping paths short without spaces and special chars does wonders...

Again thanks all for taking a look and coming forward with suggestions and possible solutions!

 

TinyPortal © 2005-2018