Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: TClientDataSet 64bit midas.dll


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 6 - Last Post: May 5, 2016 3:21 PM Last Post By: Oliver Weinheimer Threads: [ Previous | Next ]
Oliver Weinheimer

Posts: 73
Registered: 8/20/04
TClientDataSet 64bit midas.dll  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 14, 2015 9:45 AM
I am using TClientDataSet in a self written database interface class.
This database class is used in two of my projects.
A small one and a large project.
I am using bcc64, C++Builder10.1 .
In the small project everything works fine - debug and release build. No problems.

But in the larger project (beside the fact I can not link a debug build since a long time because of the "out of memory"-bug of the linker!)
the linker gives for the release build sometimes an exe that runs without problems and sometimes I get an exe that crashes as soon as TClientDataSet is used.
The linker does not produce the same result - depending on pure chance?

Both projects use midas.dll. Can this be the problem?
Any hints are welcome.
I recognized that TClientDataSet catches exceptions internally in the small project - this internal catching works if the large project links fine and it does not work if the large project crahses ... but I do not understand what is going wrong.

This problem was not with C++BuilderXE7.1 .
Oliver Weinheimer

Posts: 73
Registered: 8/20/04
Re: TClientDataSet 64bit midas.dll  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 16, 2015 1:16 AM   in response to: Oliver Weinheimer in response to: Oliver Weinheimer
A complete rebuild, using Build in the IDE, seems to solve the problem for the larger project.
Using Make 2 or 3 times in the IDE leads to a not usable exe.

addition:
I just realized that a complete rebuild does not always solve the problem :-(

Edited by: Oliver Weinheimer on Dec 16, 2015 4:40 AM
Arkady Semylio

Posts: 87
Registered: 9/18/15
Re: TClientDataSet 64bit midas.dll  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 16, 2015 1:20 AM   in response to: Oliver Weinheimer in response to: Oliver Weinheimer
Oliver Weinheimer wrote:
A complete rebuild, using Build in the IDE, seems to solve the problem for the larger project.
Using Make 2 or 3 times in the IDE leads to a not usable exe.

Try to disable incremental link for all platforms in the IDE's Linker settings.

Bye bye
Oliver Weinheimer

Posts: 73
Registered: 8/20/04
Re: TClientDataSet 64bit midas.dll  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 16, 2015 4:46 AM   in response to: Arkady Semylio in response to: Arkady Semylio
Arkady Semylio wrote:
Oliver Weinheimer wrote:
A complete rebuild, using Build in the IDE, seems to solve the problem for the larger project.
Using Make 2 or 3 times in the IDE leads to a not usable exe.

Try to disable incremental link for all platforms in the IDE's Linker settings.

Bye bye

I just tried your proposal.
Unfortunately, it does not help
Oliver Weinheimer

Posts: 73
Registered: 8/20/04
Re: TClientDataSet 64bit midas.dll  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 6, 2016 12:02 PM   in response to: Oliver Weinheimer in response to: Oliver Weinheimer
I changed in Project Objects->C++ Linker
Object Alignment from
0x00001000
to
0x00002000.
Since then maybe the last 20 build were Ok
(Builder CX Update 1 with midas.dll)
This seems to be at least a workaround for the release build - keep fingers crossed.
Maybe someone has an explanation why this leads to a successful build?

Debug build is still not possible because of "Out of memory" bug
.
I hope the next RAD Update will include a new linker - it is no fun to work around and work around and work around the linker problems ...
Oliver Weinheimer

Posts: 73
Registered: 8/20/04
Re: TClientDataSet 64bit midas.dll  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 7, 2016 7:11 AM   in response to: Oliver Weinheimer in response to: Oliver Weinheimer
Oliver Weinheimer wrote:
I changed in Project Objects->C++ Linker
Object Alignment from
0x00001000
to
0x00002000.
Since then maybe the last 20 build were Ok
(Builder CX Update 1 with midas.dll)
This seems to be at least a workaround for the release build - keep fingers crossed.
Maybe someone has an explanation why this leads to a successful build?

Debug build is still not possible because of "Out of memory" bug
.
I hope the next RAD Update will include a new linker - it is no fun to work around and work around and work around the linker problems ...

Linker Problem is back again :-(
I changed
Object Alignment from
0x00002000
back to
0x00001000
and linking works again.

I think there are memory and/or pointer problems in the linker ...
Oliver Weinheimer

Posts: 73
Registered: 8/20/04
Re: TClientDataSet 64bit midas.dll  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 5, 2016 3:18 PM   in response to: Oliver Weinheimer in response to: Oliver Weinheimer
Eventually the problem was there permanently.
My solution was to encapsulate all database action in a dll - the dll compiles and linkes without any problem.
Note: I linked the dll against static midaslib.a - because I do not like the way midas.dll is used.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02