Recent

Author Topic: Reference to object set to Nil after installation of IBX Components  (Read 3438 times)

eenplus

  • New Member
  • *
  • Posts: 11
Hallo, I've installed the latest version of the IBX components in two Lazarus versions. One on Mac High Sierra 10.13.16 ( native ) and on Windows 10 in Parallels.
After each install via the Online Package Manager and rebuilding and restarting the IDE , Lazarus quits with a 'Reference set to object is Nil' . Afterwards I need
to reinstall Lazarus.

Is this a known issue ?

Tia.

/Dirk 

GetMem

  • Hero Member
  • *****
  • Posts: 3635
Re: Reference to object set to Nil after installation of IBX Components
« Reply #1 on: April 22, 2021, 08:38:12 pm »
@eenplus
Quote
Hallo, I've installed the latest version of the IBX components in two Lazarus versions. One on Mac High Sierra 10.13.16 ( native ) and on Windows 10 in Parallels.
After each install via the Online Package Manager and rebuilding and restarting the IDE , Lazarus quits with a 'Reference set to object is Nil' . Afterwards I need
to reinstall Lazarus.

Is this a known issue ?
First of all you don't have to reinstall Lazarus, you always have a backup of the binary in the installation folder(see attached screenshot). Delete the current executable, then rename lazarus.old to lazarus.
Secondly I don't think this issue is related to OPM, please try to install IBX by opening the lpk file. Does the same error occurs?

eenplus

  • New Member
  • *
  • Posts: 11
Re: Reference to object set to Nil after installation of IBX Components
« Reply #2 on: April 22, 2021, 09:55:05 pm »
Hallo, as per suggestion of GetMem I did. Unfortunately same issue. I enclose an image of the error at startup. Rgds.

GetMem

  • Hero Member
  • *****
  • Posts: 3635
Re: Reference to object set to Nil after installation of IBX Components
« Reply #3 on: April 23, 2021, 06:51:24 am »
Quote
Hallo, as per suggestion of GetMem I did. Unfortunately same issue. I enclose an image of the error at startup. Rgds.

Tested with:
Lazarus: 2.0.12/Trunk
FPC:  3.2.0
OS: Windows 10

IBX works fine here.

eenplus

  • New Member
  • *
  • Posts: 11
Still suffering with installation of IBX controls .... whatever way I install the componenten, each installation ends up with Lazarus not being able anymore to start. Always "Object reference is Nil."

And I can start over to rename the old Lazarus.app etc. to get things going.

Is there a possibility to start Lazarus in some kind of 'safe mode' , of debug mode ?

« Last Edit: May 11, 2021, 04:34:51 pm by eenplus »

patyit

  • New Member
  • *
  • Posts: 18
I also have this problem, "Object reference is Nil." when I start the Lazarus !

XUbuntu 20.04 LTS 64bit fresh installation on new laptop (Acer Intel N5000 CPU, 8Gb RAM, 128Gb SSD),
FpcUpDeluxe FPC Fixes (v3.2.1), Lazatus Fixes (v2.0.13), date 2021.05.15.

Installed all dependencies for Lazarus, maybe something else is missing for the IBX ? 
p.s. Firebird 3.0.7 64bit installed before Lazarus and IBX !
« Last Edit: May 16, 2021, 10:11:52 am by patyit »

egsuh

  • Hero Member
  • *****
  • Posts: 869
Re: Reference to object set to Nil after installation of IBX Components
« Reply #6 on: September 06, 2021, 06:43:46 am »
This happens in Windows 10 as well, with Lazarus 2.0.12 and FPC 3.2.0.

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1799
  • Former Delphi 1-7, 10.2 user
Re: Reference to object set to Nil after installation of IBX Components
« Reply #7 on: September 06, 2021, 08:18:27 am »
@egsuh Did you install any IBX dependenceies first? See the post above yours, Firebird needed to be installed before IBX.
Lazarus 2.3, FPC 3.3.1 macOS 12.1 x86_64 Xcode 13.2
Lazarus 2.3, FPC 3.3.1 macOS 12.1 aarch64 Xcode 13.2
Lazarus 2.3, FPC 3.2.2 FreeBSD 13.0 amd64 VM
Lazarus 2.3, FPC 3.2.2 FreeBSD 12.2 amd64 VM
Lazarus 2.1 r61574 FPC 3.0.4 Ubuntu 20.04 VM
Lazarus 2.0.10 FPC 3.2.0 Win10 amd64 VM

GetMem

  • Hero Member
  • *****
  • Posts: 3635
Re: Reference to object set to Nil after installation of IBX Components
« Reply #8 on: September 06, 2021, 09:18:47 am »
@egsuh Did you install any IBX dependenceies first? See the post above yours, Firebird needed to be installed before IBX.
OK. I do have Firebird running on my computer, so most likely this is the reason why IBX works at my side. Still showing a strange, cryptic message like: "Object reference is Nil", then blocking the entire IDE is not a good practice in my opinion, even when Firebird is not installed.

patyit

  • New Member
  • *
  • Posts: 18
Re: Reference to object set to Nil after installation of IBX Components
« Reply #9 on: September 06, 2021, 10:36:57 am »
In my case, there was a Firebird server on the machine before the IBX was installed,
however, Lazarus did not want to start.
The solution was that after installing FlameRobin, Lazarus also started smoothly !
So I’m assuming that some addiction has been fulfilled with FlameRobin, but I don’t know what !

tonyw

  • Full Member
  • ***
  • Posts: 242
    • MWA Software
Re: Reference to object set to Nil after installation of IBX Components
« Reply #10 on: September 06, 2021, 11:15:45 am »
Are you using the 32-bit or 64-bit version of Lazarus? If installing FlameRobin cured the problem, it does suggest a problem with the client library. If you are running with 32-bit Lazarus then you need the 32-bit client library and if only the 64-bit is installed then this will certainly cause problems when IBX tries to load the client library. If Flame Robin was 32-bit then would have brought in the needed 32-bit DLL

It may be that an error message needs improving here.

patyit

  • New Member
  • *
  • Posts: 18
Re: Reference to object set to Nil after installation of IBX Components
« Reply #11 on: September 06, 2021, 11:54:24 am »
XUbuntu 20.04 LTS 64bit, FlameRobin allso 64bit. Im not using 32bit at all.

patyit

  • New Member
  • *
  • Posts: 18
Re: Reference to object set to Nil after installation of IBX Components
« Reply #12 on: September 06, 2021, 12:19:24 pm »
There are the following 3 so-files with the same creation date as when the server was installed in /usr/lib/x86_64-linux-gnu/

libfbclient.so.3.0.7
@libfbclient.so.2   (symlink from libfbclient.so.3.0.7)
@libfbclient.so      (symlink from libfbclient.so.3.0.7)

may add @libfbclient.so.3 symlink, but it is not relevant to error.

I don't see what FlameRobin adds.

tonyw

  • Full Member
  • ***
  • Posts: 242
    • MWA Software
Re: Reference to object set to Nil after installation of IBX Components
« Reply #13 on: September 06, 2021, 12:22:26 pm »
The current test environment for IBX under Linux is Mint 20 which is derived from Ubuntu 20.04 and so there really should be no reason for IBX not to work.

If you look at the Flame Robin dependencies list then libfbclient2 is the only common dependency, so it does suggest that there was something wrong with your Firebird Client library that was corrected once Flame Robin was installed.

When IBX starts in the IDE, it first checks to ensure that the client library has been successfully loaded. If not then it will show the error message "'IBX is unable to locate the Firebird Library - have you remembered to install it?'" and once you click on OK, the register procedure exits allowing the IDE to continue. Your experience has pointed to the need to protect this check inside a "try..except" block as an error in loading the library can clearly block the IDE. That will be included in the next release.

Generally, the library load is very robust given that it is probably the most heavily tested and used feature. Looking through the code I did find one unprotected call to a library handle buried deep in TFBClientAPI.GetProcAddr, which will also be protected in the next release.

However, all this is really doing is improving the error message. The underlying issue seems to be with a corrupt Firebird Client Library, and the solution will always be to re-install the client library. All the error messages can do is to make this step more obvious.

tonyw

  • Full Member
  • ***
  • Posts: 242
    • MWA Software
Re: Reference to object set to Nil after installation of IBX Components
« Reply #14 on: September 06, 2021, 12:36:35 pm »
There are the following 3 so-files with the same creation date as when the server was installed in /usr/lib/x86_64-linux-gnu/

libfbclient.so.3.0.7
@libfbclient.so.2   (symlink from libfbclient.so.3.0.7)
@libfbclient.so      (symlink from libfbclient.so.3.0.7)

may add @libfbclient.so.3 symlink, but it is not relevant to error.

I don't see what FlameRobin adds.
That's the same versions that I am using. The fix may have been as simple as rebuilding your .so cache after Flame Robin was installed.

 

TinyPortal © 2005-2018