Showing posts with label Delphi_7. Show all posts
Showing posts with label Delphi_7. Show all posts

Friday, September 1, 2017

Yet another EurekaLog bug. How many until now?

I stepped last week in a multiple-bug situation with EurekaLog for Delphi. I again wasted MORE than a day with this buggy "exception tracer tool".

My DRP file is like this:

PROGRAM MyProgram;
uses
  {$ifdef win32}fastmm4,{$endif}
  EurekaLog_units_come_here

This worked fine until I compiled the program to 64 bits.
On 64 bit, EurekaLog refused to work. After lots of emails exchanged with their (slow) customer support I got NOTHING.
In the end I have found the problem: a bug (oh yes, another one) in EurekaLog. Eureka v7.4 could not properly parse the DRP file when it contains conditional directives like {$ifdef}.
So, because EurekaLog parse my dpr file was like this

 
PROGRAM MyProgram;
uses
  {$ifdef win32}fastmm4,
  EurekaLog_units_come_here
  {$endif}

Solution? None. The support guy from EurekaLog (Alex) invided me to pay for a new license on order to get a small update (same version, so update, no upgrade) to v7.5 which allegedly works. I won't do that. I should receive the UPDATE to the non-bugged version for free AT LEAST for the reason that I have invested time to help them locate the bug.

________________

Maybe they should write a bug tracker tool for their one bug tracker tool :)

Friday, January 7, 2011

Delphi compiler crash because of faulty DPR code

Recently I wanted to test some things and I wanted to comment some of the units used in my project, in the DRP file. Unfortunately, I forgot to close the comment (close bracket}) so I commented too much code in that DPR. As soon as I compiled the project I got an access violation in module dcc70.dll.

After a while I figured out the problem and closed the comment. Yes, instead of showing there is a problem in the code, the compiler just AVed. Delphi compiler is very happy since I fixed the comment.
I seems this also can appear when you have invalid code in the top of the unit (in the INTERFACE section) or when you have strange programming errors (also typos) in code. 

Other people reported problems with code like this: 

procedure aa;
var
  sn:string;
  xx:double;
  err:integer;
begin
    system.Val(sn,xx,err); // this caused the AV problem !!!
end; 

or 

const
  SeparatorIndices: array(1..7) of integer = (6, 13, 39, 65, 72, 75, 76);

instead of the correct code:
const
  SeparatorIndices: array[1..7] of integer = (6, 13, 39, 65, 72, 75, 76);


The solution is to comment pieces of code until the compiler starts to work again, then un-comment and see where the problem is.


Strange Delphi behavior/No icon in compiled program

Today my Delphi went ape. At a moment I recompiled and run a program. FastMM started to report all kind of strange memory leaks but it was unable to locate the source of the error (unknown address). After a while I tried disabling FastMM and recompiling the program. The program was recompiled but it had no icon.

Solution:
After a long trial and error session I have found that rebuilding my VCLs solved the issue.
 It seems that even if my VCLs are set to "rebuild as needed' Delphi recompiles their DCUs but not also the afferent BPL/DCP files.

Monday, November 1, 2010

"Tpopupmenu not found" error in Delphi while loading a DPK file.

I got recently a nasty “tpopupmenu not found” error while trying to load an old DPK file. I finally figure out that the error was in the DOF file associated with the project. I just deleted the “c:\program files\borland\delphi7\Bin\dclact70.bpl=Borland ActionBar Components” line from [Excluded Packages] section and it worked.

Sunday, October 31, 2010

How to add high-resolution icons to a Delphi 7 application?

This seems to be a tough question for Delphi community. However, recently, after some trials I figured out is not that difficult. So, here is my 1, 2, 3 solution:


1. Prepare the images you want to have them as high res icons. Save each image in a separated “.ICO” file. Use RGB+Alpha color depth. You can use Axialis IconWorkshop Pro 6.5 for this. It is a bit stubborn but it does the job.

2. Open your application RES file in Melander’s ResourceEditor. Go to ‘Icon->MAINICON’. You will see the default Delphi 7 icon there. Right click and say ‘Load variant…’. Navigate and locate your icon files. Load them one by one. Save the RES file back.

3. Open Delphi and compile the project. Done.


Easy right?

-----------------------------------

Resource Hacker 3.5.2 is also a decent resource file viewer. It shows a lot of errors though, when it encounters some ‘home made’ RES files, like the one describe above.






Related article: How difficult is to write a solid software protection (licensing) scheme?


 

Tuesday, June 1, 2010

Delphi 2007 - (bad) Review

Delphi 2007 - Same old stuff under a new hat?


We all love Delphi. It is smart, easy to understand, really fast and user friendly.
But is the IDE the one that makes is so nice or the language?
Every time Borland released a new version forced as to go through a painful learning and re-adaptation process. But not because of the language but because of the buggy IDE.
You can't argue with me: there are HUGE lists of unresolved bugs for every possible version released.
It is the same for Delphi 2007? Let’s find out. I just installed Delphi 2007 on my computer. First time I was really glad to have it because people ware speaking nice about this new version.
After the first attempt to install it failed, I tried again and I somehow succeed.

Until now I can report more bad stuff that good ones. Anyway I am still happy that I can report also good stuff.
Compared with Delphi 2005, Delphi 2007 is a charm. Compared with Delphi 2006 it is a little bit better. Compared with Delphi 7 it is worst.

* I thought that Delphi 2007 is free of .Net. Well that was a lie. Delphi 2007 refuses to install without .Net 2.0 (and other craps like this).

* The first bug I saw few minutes after I open the IDE for the first time was the fast blinking icons in the tool bar. I had the same problem with Delphi 2005 and 2006.

* The next bug, this time a really big one was the help system which in 30% is working. Imagine yourself what is with the rest of 70%.
The help system is a disaster. It takes much more time to load than Delphi itself. If you ask help for an instruction/window on IDE it always answers: 'Error. No help found for 2029. OK | Details'.
When it does not display that stupid answer then it returns allot of garbage from MS .Net and MS API help. In most cases the right answer is not there.
For example after pressing F1 for while the cursor was on the reserved word 'Function', the help system returned (after 37 seconds!).




Conclusions?

* Sometimes the cursor has the same color as the IDE background. You can have big fun trying to figure out where is your cursor on the screen. The solution is to restart the IDE and pray to work. If not, restart again (and pray harder).

* Delphi 2007 takes a lot of time to load to memory (my system is AMD 64 x2 4.6GHz and 1GB DDR2 at 800MHz). The average amount of memory for small projects is 50-120MB. But sometimes if goes to 600-1000MB.


So you need at least 2GB or RAM to work with this version of Delphi.

* Other small problems can be observed in IDE. Many windows behave strange or you have no buttons to configure them. For example if you have error when you compile a program, the 'Messages' will pop-up at the bottom of the IDE. This is ok. Right? But after you fix the problem the window does not close itself as in Delphi 7. So every time you compile a program you need to go and manually close that window.

* The undo system is also a disaster. Sometimes is working, sometimes (most of the cases) is not. So if you made a mistake you can't undo it so you need to rewrite all that code.

I don't think that Delphi 2007 is better than Delphi 7. Actually it is a disaster. Not as big as Delphi 2005 but still a disaster. I hope that Borland (hic, CodeGear) will release a patch (or more) really soon, but until then Delphi 2007 can't be used.
I didn't post here every small bug I have found, but only the big ones. I will update this entry as I will find out more.

Now I am supposed to speak also about the good parts of Delphi 2007. Well until I will have the patch to be able to run Delphi 2007 form more than 1 hour, I will post also the nice parts of Delphi 2007, until then I will stick with Delphi 7 and with its already known bugs (and work around).

Please drop me a line if you know how to make the help system to work and how to remove the useless (MS API) results from a search.