[comp.sys.mac.programmer] LSP Bug?

rcbaem@eutrc3.urc.tue.nl (Ernst Mulder) (09/04/89)

In article <878@eutrc3.urc.tue.nl> I write:
>> Could it be:
>>1) The resource manager can't handle the project anymore? Since LSP
>>   stores all info in separate resources this could be a possibility.

In article <2524@husc6.harvard.edu> siegel@endor.UUCP (Rich Siegel) writes:
>	Your project document may have gotten munged. Are you using
>MacroMaker? According to our Tech Support guys, MacroMaker has a known
>track record of smashing projects.

No MacroMaker. No INITs whatsoever, I always program on a totally clean
and standard System (6.0.2). I rebuilt the program's Project completely
from scratch and the problem remained.

It MUST be an error in the Linker. I had two Units, one of apr. 22K of
compiled code, one of apr. 8K of code. These two untis were in the
same Code segment, still <32K. With a real debugger I checked where the
address-error at run-time occurred: At the moment this Code segment was
loaded and a procedure in it was called.
 The Linker (while building the Application) crashes, probably while
linking these two units..

When I moved the two units into separate Code segments the problem 
disappeared. And suddenly the Linker doesn't crash anymore and my
program runs perfectly... (I, however, would like to have both units in
the same Code segment, because one calls the other rather frequently.)

It seems to be a linker problem, when Code segments have a size near
to the maximum of 32K, however this is weird, really weird.

A similar problem occurred earler. When I had 3 units in the same Code
segment, the Linker would crash when I DIDN'T call one of the procedures
in one of those units, and wouldn't crash when I DID..

The only non-common thing about the two units is that they have only
a small number of procedures, and one rather big procedure taking up
90% of the units compiled code size. It's not a compiler's problem, 
because when the two units are in separate Code segments, they compile
just fine and work like they should.

I hope this focusses the problem a little more, because I would like
to see it solved. :) Compilers shouldn't have bugs, because when something
goes wrong you always blame yourself and that costs a lot of time trying
to find errornous code which isn't there! :)

 Anyway, Bye!   Ernst.
                  >