Board index » cppbuilder » BCB 3.0: Internal error GH2608 + GH1761

BCB 3.0: Internal error GH2608 + GH1761

Hi,

BCB 3.0 (3.70) just arrived and I am trying to build a project
including a few Delphi files.

I am astonished to notice that I cannot get anything but the most
trivial code to compile on WinNT 4.0 SP3, plenty of CPU time and
plenty of RAM. Almost always I get

- Internal error GH2608

and, in the rare cases where this does not happen,

- Internal error GH1761

Just a quick example:

- Create a new project group
- Add a new project
- Add this incredibly complex unit to the project

******************************

    unit Maths_good_copy;

    interface

    uses
      SysUtils; { for Exceptions....}

    type
      E__InvalidArgument = class(Exception)
      end;

    implementation

    initialization

   end.

****************************

Build project - this results in an Internal error GH2608 in the above
unit.

All files in question are _perfectly_ working Delphi 1/2/3/4 units
providing raw services like kernel object encapsulation or just number
crunching engines.

Questions:

1.) What causes these internal errors?
     Does the "GH" give a hint?

2.) How can I work around this?

I am _not_ prepared to reformat my hard drive in order to get a messed
up compiler to work.

I need a reliable way to include Pascal source code into a project -
_sometimes_ and for no apparent reason, the above compiles. Five
minutes later, without changing any setting, it doesn't.

The interesting thing is: _sometimes_ a unit _will_ compile, but as
soon as another unit throws an Internal Error (for whatever reason),
the unit that originally compiled no longer will compile. When I
restart BCB, the game starts again. First compile, then a couple of
minutes later - Internal Error. I have completely turned off
precomiled headers, to no avail.

What astonishes me is that a "simple" internal error requires BCB to
be completely _restarted_ (no, closing and opening the project group
does not help) - the whole compiler is messed up after that.

_Any_ hint that gives me some stable results will be greatly
appreciated.

Stefan

 

Re:BCB 3.0: Internal error GH2608 + GH1761


There must be more to it than your simple steps, becuase I've tried it
3 times, and rebuilt each several times, and never once had an
internal compiler error.

If your project is as simple as you describe, I think that Inprise
might appreciate it if you could "donate" a working example.  There
may be project and/or environment settings that affects that that I
don't have set.

I don't know of any official way to submit binaries to them, but
surely they're interested in ways to reproduce internal errors.

--
Chris (TeamB)

Quote
Stefan Hoffmeister wrote:

> Hi,

> BCB 3.0 (3.70) just arrived and I am trying to build a project
> including a few Delphi files.

> I am astonished to notice that I cannot get anything but the most
> trivial code to compile on WinNT 4.0 SP3, plenty of CPU time and
> plenty of RAM. Almost always I get

> - Internal error GH2608

Re:BCB 3.0: Internal error GH2608 + GH1761


: "Chris Uzdavinis (TeamB)" <ch...@uzdavinis.com> wrote:

Quote
>There must be more to it than your simple steps, becuase I've tried it
>3 times, and rebuilt each several times, and never once had an
>internal compiler error.

>If your project is as simple as you describe, I think that Inprise
>might appreciate it if you could "donate" a working example.  There
>may be project and/or environment settings that affects that that I
>don't have set.

See my other posting re: GH1761 - it _appears_ as if GH2608 was
triggered by GH1761 which in turn was triggered by a perfectly legal
OP construct.

The steps in the other posting are 100% complete and detailed.

Arghhh.

Stefan

--
Stefan.Hoffmeister (at) Uni-Passau.de
http://kakadu.rz.uni-passau.de/~w4hoff01/
   DIR: Delphi FAQs, KBs, docs

Private email regarding Delphi will usually be ignored
unless it has been expressedly invited.

Re:BCB 3.0: Internal error GH2608 + GH1761


How about showing us the .bpr or .bpk file from a project that gets the
internal compiler error?

Laurie (Inprise)

Quote
Stefan Hoffmeister wrote in message <35b97875.248...@forums.inprise.com>...
>- Internal error GH2608

>and, in the rare cases where this does not happen,

>- Internal error GH1761

>Just a quick example:

>- Create a new project group
>- Add a new project
>- Add this incredibly complex unit to the project

Re:BCB 3.0: Internal error GH2608 + GH1761


Quote
Stefan Hoffmeister wrote:
> See my other posting re: GH1761 - it _appears_ as if GH2608 was
> triggered by GH1761 which in turn was triggered by a perfectly legal
> OP construct.

> The steps in the other posting are 100% complete and detailed.

You are correct.  I got the same error.  

[PascalFatal Error] test1.pas(17): Internal error: GH1761.

Default compiler settings.  Do you think it's related to the two files
mutually "use" each other, perhaps causing it to keep recursively load
the other until it overflows?  My pascal is as recent as TP6.0 with
objects.  So I'm basically inclined to guess.  But at least I could
confirm it.

Actually, your example isn't the smallest one it takes to show this
problem.  I whittled it down to this:

Just make a test1.pas out of this and add it to a new project.

unit test1;
interface
type
  TTest1 = class(TObject)
  end;
implementation
end.

It will give a different internal error, but they are probably
related.

[PascalFatal Error] test2.pas(12): Internal error: GH2608.
--
Chris (TeamB)

Re:BCB 3.0: Internal error GH2608 + GH1761


: "Chris Uzdavinis (TeamB)" <ch...@uzdavinis.com> wrote:

Quote
>Stefan Hoffmeister wrote:
>> See my other posting re: GH1761 - it _appears_ as if GH2608 was
>> triggered by GH1761 which in turn was triggered by a perfectly legal
>> OP construct.

>> The steps in the other posting are 100% complete and detailed.

>You are correct.  I got the same error.  

>[PascalFatal Error] test1.pas(17): Internal error: GH1761.

>Default compiler settings.  Do you think it's related to the two files
>mutually "use" each other, perhaps causing it to keep recursively load
>the other until it overflows?  My pascal is as recent as TP6.0 with
>objects.  So I'm basically inclined to guess.  

I don't think so (but have not tried) - I have a gut feeling that at
some time I threw this combination at BCB 3.0 and it may have worked
(I tried a lot...).

Anyway, the interesting part was that if I replaced the property
declaration in test2.pas with

  private
    Fp: integer;
  published
    property p: integer read Fp write Fp;

everything appeared to compile just fine.

I suspect that GH1761 has to do with using property accessor methods
in test2 which have been implemented in test1 (background: before
t{*word*220} down, this was a huge COM-enabled class library)

Quote
>But at least I could
>confirm it.

Good! I hope that this increases the chance of getting attention and a
fix.

Quote
>Actually, your example isn't the smallest one it takes to show this
>problem.  I whittled it down to this:
>Just make a test1.pas out of this and add it to a new project.

>unit test1;
>interface
>type
>  TTest1 = class(TObject)
>  end;
>implementation
>end.

>It will give a different internal error, but they are probably
>related.

>[PascalFatal Error] test2.pas(12): Internal error: GH2608.

Interesting!

It appears as if there are two different problems chasing each
other... Perhaps GH1761 is triggered by GH2608 and in a race condition
we see one or the other first.

One aspect of this problem is _pretty_ bad: once any of the internal
errors is triggered, it appears to be mandatory to restart BCB in
order to be able to reliably compile any Pascal file. So much for
error recovery...

Thanks!

Stefan

--
Stefan.Hoffmeister (at) Uni-Passau.de
http://kakadu.rz.uni-passau.de/~w4hoff01/
   DIR: Delphi FAQs, KBs, docs

Private email regarding Delphi will usually be ignored
unless it has been expressedly invited.

Re:BCB 3.0: Internal error GH2608 + GH1761


Quote
: "Laurie" <lben...@corp.borland.com> wrote:
>How about showing us the .bpr or .bpk file from a project that gets the
>internal compiler error?

The (trimmed down) lines I am including actually apply to the other
posting "reproducable pascal bug: GH1761"; they are the BCB 3.0
shipping default settings. I have not had a chance to modify the
defaults yet, 6 hours after installation :-/. If I have deleted too
much, let me know - I had read the docs late at night.

I would be _most_ grateful for a work-around.

In case you have not noticed yet: Chris Uzdavinis has been able to
reproduce the problem I posted separately, see the messages in this
thread.

It is good to know that Inprise cares. I am a lot happier with BCB 3.0
support 6 hours after installation than with Delphi support - after 3
_years_ of heavy use and (VCL and compiler) bug tracking.

Stefan

*****************************************+

#
---------------------------------------------------------------------------
!if !$d(BCB)
BCB = $(MAKEDIR)\..
!endif

VERSION = BCB.03
#
---------------------------------------------------------------------------
PROJECT = Project2.exe
OBJFILES = Test2.obj test1.obj Project2.obj Unit1.obj
RESFILES = Project2.res
DEFFILE =
RESDEPEN = $(RESFILES) Unit1.dfm
LIBFILES =
LIBRARIES =
SPARELIBS = VCL35.lib
PACKAGES = vclx35.bpi VCL35.bpi vcldb35.bpi vcldbx35.bpi bcbsmp35.bpi
dclocx35.bpi Qrpt35.bpi teeui35.bpi VclSmp35.bpi teedb35.bpi \
  tee35.bpi ibsmp35.bpi NMFast35.bpi inetdb35.bpi inet35.bpi
#
---------------------------------------------------------------------------
PATHCPP = .;
PATHASM = .;
PATHPAS = .;
PATHRC = .;
DEBUGLIBPATH = $(BCB)\lib\debug
RELEASELIBPATH = $(BCB)\lib\release
#
---------------------------------------------------------------------------
CFLAG1 = -Od -Hc -w -Ve -r- -k -y -v -vi- -c -b- -w-par -w-inl -Vx -tW
CFLAG2 = -I$(BCB)\include;$(BCB)\include\vcl -D_RTLDLL;USEPACKAGES
-H=$(BCB)\lib\vcl35.csm
CFLAG3 = -Tkh30000
PFLAGS = -U$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH)
-I$(BCB)\include;$(BCB)\include\vcl -D_RTLDLL;USEPACKAGES -$Y -$W -$O-
-v \
  -JPHN -M
RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -D_RTLDLL;USEPACKAGES
AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /d_RTLDLL /dUSEPACKAGES
/mx /w2 /zd
LFLAGS = -L$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) -aa -Tpe -x -Gn
-v
IFLAGS =
#
---------------------------------------------------------------------------
ALLOBJ = c0w32.obj $(PACKAGES) sysinit.obj $(OBJFILES)
ALLRES = $(RESFILES)
ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib
#
---------------------------------------------------------------------------

Quote
>Stefan Hoffmeister wrote in message <35b97875.248...@forums.inprise.com>...
>>- Internal error GH2608

>>and, in the rare cases where this does not happen,

>>- Internal error GH1761

>>Just a quick example:

>>- Create a new project group
>>- Add a new project
>>- Add this incredibly complex unit to the project

--
Stefan.Hoffmeister (at) Uni-Passau.de
http://kakadu.rz.uni-passau.de/~w4hoff01/
   DIR: Delphi FAQs, KBs, docs

Private email regarding Delphi will usually be ignored
unless it has been expressedly invited.

Re:BCB 3.0: Internal error GH2608 + GH1761


Quote
>I suspect that GH1761 has to do with using property accessor methods
>in test2 which have been implemented in test1 (background: before
>t{*word*220} down, this was a huge COM-enabled class library)

  Yes, this is correct.  You managed to confuse the compiler with
something you've done with that property accessor method.  If you can
give me a test case, we can fix it.  Probably not a patch, but most
likely you won't see it in the next product.
  The other internal error you are getting is at a point that the
compiler expected a certain thing to be true (it _has_ to be true),
but it wasn't.  This error is most likely caused by some other error
that happened earlier.  The only thing the compiler can safely do at
that point is quit.
  I hope to see a reproducible case in my mailbox soon.  :^)
 Thank you.
  -edj

Other Threads