Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to solve Delphi's [Pascal Fatal Error] F2084 Internal Error: LA33?

I'm really sick of this problem. Google searches always seem to suggest "delete all bpls for the package", "delete all dcus". Sometimes this just-does-not-work. Hopefully I can get some other ideas here.

I have a package written in-house, which had been installed without issue a few months ago. Having made a few changes to the source, I figured it was time to recompile/reinstall the package. Now I get two errors, the first if I choose "install" is

Access violation at address 02422108 in module 'dcc100.dll'. Read of address 00000000.

...or if I try to build/compile the package, I get

[Pascal Fatal Error] F2084 Internal Error: LA33

This is one of those Delphi problems that seems to occur time and time again for many of us. Would be great if we could collate a response something along the lines of "any one or combination of these steps might fix it, but if you do all these steps it will fix it...."

At the moment, I've removed all references to the bpl/dcp files for this package, but still getting the same error...

Using BDS2006 (Delphi)

Update 01-Oct-2008: I managed to solve this - see my post below. As I can't accept my own answer, I'm not entirely sure what to do here. Obviously these types of issues occur frequently for some people, so I'll leave it open for a while to get other suggestions. Then I guess if someone collates all the info into a super-post, I can accept the answer

like image 286
Graza Avatar asked Sep 30 '08 14:09

Graza


4 Answers

I managed to solve this, following the below procedure

  1. Create a new package
  2. One by one, add the components to the package, compile & install, until it failed.
  3. Investigate the unit causing the failure.

As it turns out, the unit in question had a class constant array, eg

TMyClass = class(TComponent)
private
  const ErrStrs: array[TErrEnum] of string
    = ('', //erOK
       'Invalid user name or password', //erInvUserPass
       'Trial Period has Expired'); //erTrialExp
protected
  ...
public
  ...
end;

So it appears that Delphi does not like class constants (or perhaps class constant arrays) in package components

Update: and yes, this has been reported to codegear

like image 160
Graza Avatar answered Nov 02 '22 02:11

Graza


These are bugs in the compiler/linker. You can find many references of these bugs on the internet in different Delphi versions, but they are not always the same bugs. That makes it difficult to give one solution for all those different kind of problems.

General solutions that might fix it are, as you noted:

  • Remove *.dcp *.dcpil *.dcu *.dcuil *.bpl *.dll
  • Rewrite your code in another way
  • Tinker with compiler options
  • Get the latest Delphi version

I personally found one of such bugs to be resolved if I turned off Range Checking. Others are solved if you don't use generics from another unit. And one was solved if the unit name and class name was renamed to be smaller.

And of course you should report any problem you have on http://qc.codegear.com

like image 38
Lars Truijens Avatar answered Nov 02 '22 02:11

Lars Truijens


Maybe the following step will be a better solution:
Declare the array as a type and just define the class constant with this type, eg.

TMyArray = array[TErrEnum] of string;

TMyClass = class(TComponent)
private
  const ErrStrs: TMyArray
    = ('', //erOK
       'Invalid user name or password', //erInvUserPass
       'Trial Period has Expired'); //erTrialExp
protected
  ...
public
  ...
end;

This makes the array declaration explicit.

like image 3
Biz Avatar answered Nov 02 '22 04:11

Biz


I wasted several hours on this issue, deleting dcu's, etc to no avail.

Finally, what worked for me was to uncheck Overflow Checking in Compiler Options, rebuilding the project, re-checking Overflow Checking, and rebuilding again. Voila! the problem has gone away. Go figure. (still using D7).

like image 3
Pete Avatar answered Nov 02 '22 04:11

Pete