RTC Forums
November 24, 2024, 10:10:15 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: BPL is not loaded ....  (Read 7245 times)
mastinfo
RTC License
***
Posts: 29


« on: October 21, 2014, 09:47:16 AM »

Hello,

i think there's a problem in rtcsdk_raw, rtcsdk_gate and rtcsdk_dba

If i try to drop a component that comes from one of this BPL i have the following exception:

Translated from Italian: cannot find access point @Rtcconn@TrtcConnection@SetTimeoutsOfApi$qqrpx25rtcconn@TRtcTimeoutsofapi in rtcSDK.bpl

If i first drop in a form a component from the base library (server or client) the problem disappears until i restart delphi again.

Roberto
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #1 on: October 21, 2014, 10:00:52 AM »

BPL's are being loaded by the Delphi IDE and not by the code inside components.

One possible reason for this error would be if you are keeping multiple versions of BPL files on your disk, so Delphi would sometimes find a new version while other times it would find the old version. Make sure there is only one version of each BPL file on your disks to avoid such problems.

Another reason for this error could be updating files in the Lib folder, without rebuilding ALL the packages in the correct order. To correctly update the packages, you either need to uninstall ALL the packages every time you update the Lib files, or you have to BUILD and INSTALL the packages in the correct order (the way they are listed in the Packages_Main Project group):

1. rtcSDK
2. rtcSDK_Gate // requires rtcSDK
3. rtcSDK_Raw // requires rtcSDK
4. rtcSDK_DBA // requires rtcSDK
5. rtcSDK_DBCli // requires rtcSDK and rtcSDK_DBA

If you do not rebuild one of the packages, or if you rebuild packages in a the wrong order, when the code has changed or new code was added and access points get shifted (making space for new/updated stuff) in a package during the compilation process, all the packages that require this newly compiled package will stop working, because they will still have the old (wrong) "access point" information. So, they also need to be rebuild to work correctly.

Best Regards,
Danijel Tkalcec
Logged
mastinfo
RTC License
***
Posts: 29


« Reply #2 on: October 21, 2014, 10:53:50 AM »

I mainly use Delphi XE2.
After Removing BPL in Delphi XE6 (yes, i have installed RTC in delphi XE6 also) the problem has been fixed in XE2 ...
It's not clear to me why....
Maybe i have to duplicate the RTC folder for each Delphi version ?

Roberto
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #3 on: October 21, 2014, 11:50:44 AM »

My guess is that Delphi is loading required BPL files without specifying the full path. If you have used components from the rtcSDK package, Delphi has already loaded that package using the full path. But if you did not use components from the rtcSDK package (or opened a Form or Data Module with components from the rtcSDK package) before trying to add components from another package (rtcSDK_Gate, rtcSDK_Raw, rtcSDK_DBA or rtcSDK_DBCli), it is possible that Delphi would try to load the required package (rtcSDK) without specifying the full path, relying on the System PATH variable instead. And if you have two Delphi versions with both paths to BPL files in the System PATH variable (one for Delphi XE2 and one for Delphi XE6), it is possible that Delphi will load the wrong rtcSDK BPL file.

Best Regards,
Danijel Tkalcec
Logged
mastinfo
RTC License
***
Posts: 29


« Reply #4 on: October 23, 2014, 05:13:00 PM »

I think that you should also provide DPK files with different names for each supported Delphi version.
This will simplify the installation in multiple Delphi IDE.

thanks  Smiley

Roberto
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #5 on: October 23, 2014, 09:17:00 PM »

And I think Embarcadero should fix the problem with package loading in their IDE Smiley

Anyway ... if you still haven't managed to get both Delphi versions working correctly, you could remove all Delphi folders from your System PATH variable and create a CMD file for starting each Delphi version, updating the PATH variable in the CMD files to point ONLY to folders used by that specific Delphi version. That would fix the problem of Delphi loading the wrong BPL files and also clean up your System PATH variable (which can get crowded if you have a lot of Delphi versions installed).

If you don't feel comfortable changing the System PATH variable, or don't like the idea for some other reason, you can easily make a separate DPK file for each Delphi version. Just open the rtcSDK DPK file in Delphi and save it with a new name in a folder of your choice, then compile and install it. To fix refferences to the rtcSDK package in other packages (rtcSDK_Gate, rtcSDK_Raw, rtcSDK_DBA and rtcSDK_DBCli), you just have to open those packages in Delphi and remove the rtcSDK package from the required list (also remove rtcSDK_DBA from the rtcSDK_DBCli), then save the package file under a new name and compile it. Delphi will prompt you to add the required packages. Confirm the package update, save the package file again, compile and install it. Repeat the process for all the packages and you will have a separate set of all packages for that Delphi version.

Best Regards,
Danijel Tkalcec
Logged
mastinfo
RTC License
***
Posts: 29


« Reply #6 on: October 24, 2014, 08:27:24 AM »

I can solve the problem easily (as you said) changing the RTC DPKs.
Mine was only a suggestion Smiley I see that others components developers use different DPK names for each Delphi version, and now i know why Smiley
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #7 on: October 24, 2014, 11:58:17 AM »

Well, now you have two solutions to your problem. Which one you choose is entirely up to you. Smiley

PS. I have a lot of things installed on my development machine (Windows 7, 64bit), including 11 different Delphi versions (D7, D2007, D2009, D2010, DXE, DXE2, DXE3, DXE4, DXE5, DXE6 and DXE7), so I preffer removing all Delphi folders from the System PATH environment variable and creating a CMD file for starting each Delphi version, adding only folders relevant to that specific Delphi version to the PATH variable. This doesn't only solve the problem with Delphi packages, but also leaves more space in the System PATH environment variable for other applications, so I don't have to worry about a broken OS after installing something that tried to extend the System PATH environment variable beyond its limits (1K, 2K or 8K - depending on your OS).

Best Regards,
Danijel Tkalcec
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #8 on: October 27, 2014, 01:29:01 PM »

RTC SDK v6.42 now has 2 additional sets of Package Groups (SDKPackagesX2_* and SDKPackagesX3_*), each with a separate set of RTC packages, so you don't have to create your own package copies if you have 2 or 3 Delphi versions installed on the same machine and don't want to manually remove BPL folders from the System PATH (as suggested above). It doesn't matter which packege set you use in which Delphi version, as long as you use a different one for each Delphi version.

PS. I'm not going to create a separate set of packages for every single Delphi version, since there are already 13 Delphi versions supported by the current RTC SDK release and this number is going to grow, but most developers aren't using more than 2 or 3 Delphi versions on the same machine and the only reason for different package names in each Delphi installation is to avoid BPL naming conflicts when BPL folders from all Delphi versions are inside the System PATH environment variable when starting any Delphi version.

Best Regards,
Danijel Tkalcec
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.027 seconds with 17 queries.