[comp.sys.mac.programmer] LSP bugs

rask@daimi.dk (Jorgen Rask) (06/23/89)

I have been working on a project in LSP for some months now 
and suddenly a lot of strange behaviour is occuring.

The project is medium size (around 20.000 lines) ported from
Turbo Pascal. In the last month or two a lot of work has gone 
into the program and it is now in late-beta testing.

Yesterday a link error occured and "Check Link" revealed:
    undefined "THEPORT" (Runtime.lib)
    < repeated 5 times...! >
Naturally I panicked - everything had run smoothly the hole
day and I was only recompiling after a few cosmetic changes.
  Fortunately this mysterious error disappeared after a complete
rebuild of the project.

Today the editor begins to garble in a most disquieting way:
when scrolling a file pagewise, big chunks of code gets 
displaced and after sufficiently long (short) time of scrolling
around LSP bombs. Also when using the search facility text in 
the line below a pattern match is hilited.
  Similiar behaviour was observed two months ago, and after a
few days tracking I then found that compound statements in a
case-statement (i.e. with "begin"s in some of the cases) was the
culprit. Especially when there is a comment next to the "begin"!!
  At other times I have noticed that the editor occasionally
looses a "begin" when you are editing close to it (in the line
below or similarly). I'm not sure whether these events are
connected or not.
  I have looked loosely at a saved file the editor didn't like
with MacTools (which displays the disk contents directly) and
nothing seems to be wrong with the file. Neither is there any-
thing to see in the editor before it looses its grip so nothing
reveals exactly what is wrong.

My system configuration:
  LSP 2.0p1
  Mac Plus with 2.5 Mb
  SystemTools 6.0.2
  GateKeeper and TMON


Prior to these happenings I was quite satisfied with LSP,
particularly its source code debugger.

Hope something can be done about these bugs, so I can rest more
assured the hole project doesn't corrupt before the application
 is on the street

keough@mbunix.mitre.org (Jerry E. Keough) (06/23/89)

In article <2589@daimi.dk> rask@daimi.dk (Jorgen Rask) writes:

>I have been working on a project in LSP for some months now 
>and suddenly a lot of strange behaviour is occuring.
>    (... describes behaviour ... )
>  Fortunately this mysterious error disappeared after a complete
>rebuild of the project.

One project I have is about 10,000 lines of code
and it's heavily object-oriented (keeping all those
method tables quite full I'd guess). I once added one method to an
object, and the linker told me, essentially, that just about everything
I'd ever defined was 'undefined'. As you say, rebuilding after deleting
the object code cleared everything up.

I'd recommend doing this rebuild from scratch every so often as
standard procedure, no matter how large a project you put together.
Although you'd think that it might be related to the complexity of the
code (like: lots of objects and methods to resolve) or its volume, it's not.
I saw a friend's project recently (<1000 lines) where a call to 'concat' was
incorrectly compiled - it seemed as if all the references to
library routines were "off just a few bytes". Rebuilding did the trick.

>Today the editor begins to garble in a most disquieting way:
>when scrolling a file pagewise, big chunks of code gets 
>displaced and after sufficiently long (short) time of scrolling
>around LSP bombs. 

I had this one just the other day, without the bomb. Quitting and restarting
seemed to clear things up, so I'd guess that memory was a little low
(although it was an 1800K partition under multifinder on an SE/30 
- with 5 megs).

>  Similiar behaviour was observed two months ago, and after a
>few days tracking I then found that compound statements in a
>case-statement (i.e. with "begin"s in some of the cases) was the
>culprit. .......

There are cases where the formatter can get faked out - as can one
of the nicest features of getting quickly to any procedure in a unit.
For example, define a procedure like X(y:integer;external:boolean).
'external' is not reserved, the formatter seems OK about it, but if
you do an option-click on the title bar to list procedures, the
list will be pretty much out of whack after the declaration of X.
(I'm pretty sure that's the exact sequence, anyway; I could be more
specific if necessary)

In general, I'm impressed by LSP and I recommend it highly to all. The
problems described above are, generally, rare and infrequent; but
of course I'd like to see them fixed too. (Keep up the good work, Rich!)

Jerry Keough
Lead Scientist
The MITRE Corporation
keough@mbunix.mitre.org

billkatt@caen.engin.umich.edu (Steve Bollinger) (06/23/89)

In article <2589@daimi.dk> rask@daimi.dk (Jorgen Rask) writes:
>
>
>I have been working on a project in LSP for some months now 
>and suddenly a lot of strange behaviour is occuring.
>
>The project is medium size (around 20.000 lines) ported from
>Turbo Pascal. In the last month or two a lot of work has gone 
>into the program and it is now in late-beta testing.
>
>Yesterday a link error occured and "Check Link" revealed:
>    undefined "THEPORT" (Runtime.lib)
>    < repeated 5 times...! >
>Naturally I panicked - everything had run smoothly the hole
>day and I was only recompiling after a few cosmetic changes.
>  Fortunately this mysterious error disappeared after a complete
>rebuild of the project.
>
<more errors deleted>
>  I have looked loosely at a saved file the editor didn't like
>with MacTools (which displays the disk contents directly) and
>nothing seems to be wrong with the file. Neither is there any-
>thing to see in the editor before it looses its grip so nothing
>reveals exactly what is wrong.
>
>My system configuration:
>  LSP 2.0p1
>  Mac Plus with 2.5 Mb
>  SystemTools 6.0.2
>  GateKeeper and TMON
>
>
>Prior to these happenings I was quite satisfied with LSP,
>particularly its source code debugger.
>
>Hope something can be done about these bugs, so I can rest more
>assured the hole project doesn't corrupt before the application
> is on the street

Sounds like you have some memory problems in your program, and they are
tromping on LightSpeed's heap.  I'd look for pointer problems.

It is a little known "bug" in LightSpeed that if you somehow write a program
than manages to corrupt the CODE resources stored in your project file, they
will stay corrupted until that segment is modified or you do a complete
rebuild (see above).

I really believe your problem is with your program.

+----------------------+----------------------------------------------------+
| Steve Bollinger      | Internet: billkatt@sol.engin.umich.edu             |
| 4297 Sulgrave Dr.    +------+---------------------------------------------+
| Swartz Creek, Mi. 48473     | "My employer doesn't take my opinion any    |
+-----------------------------+  more seriously than you do."               |
| "You remember the IIe, it   +---------------------------------------------+
| was the machine Apple made before they decided people didn't need         |
| machines with big screens, color, or slots."                              |
|                                 - Harry Anderson (from NBC's Night Court) |
+---------------------------------------------------------------------------+

mnkonar@manyjars.SRC.Honeywell.COM (Murat N. Konar) (06/24/89)

In article <2589@daimi.dk> rask@daimi.dk (Jorgen Rask) writes:
>
>
>I have been working on a project in LSP for some months now 
>and suddenly a lot of strange behaviour is occuring.
>

I have never had any of the probelems reported you write
about.  Did you copy all the files that came with the 
update?  

My system: 
Mac II 2 megs
TMON
lots of INITs (>15)



____________________________________________________________________
Have a day. :^|
Murat N. Konar        Honeywell Systems & Research Center, Camden, MN
mnkonar@SRC.honeywell.com (internet) {umn-cs,ems,bthpyd}!srcsip!mnkonar(UUCP)

siegel@endor.harvard.edu (Rich Siegel) (06/26/89)

In article <2589@daimi.dk> rask@daimi.dk (Jorgen Rask) writes:
>
	[edited for brevity[

>Yesterday a link error occured and "Check Link" revealed:
>    undefined "THEPORT" (Runtime.lib)

	If it's been working OK up til that point, then it's possible that
your project document is smashed.

	[Editing problems]

>  Similiar behaviour was observed two months ago, and after a
>few days tracking I then found that compound statements in a
>case-statement (i.e. with "begin"s in some of the cases) was the
>culprit. Especially when there is a comment next to the "begin"!!

	Thanks, and I'll try to track it down. However, I use
compounds as CASE variants all the time, and haven't noticed this.
Perhaps comments are the linchpin...

		--R.



~~~~~~~~~~~~~~~
 Rich Siegel
 Staff Software Developer
 Symantec Corporation, Language Products Group
 Internet: siegel@endor.harvard.edu
 UUCP: ..harvard!endor!siegel

 I classify myself as a real developer because my desk is hip-deep in
 assembly-language listings and I spend more than 50% of my time in TMON.

~~~~~~~~~~~~~~~

rubinoff@linc.cis.upenn.edu (Robert Rubinoff) (06/26/89)

Well, I managed to get a project so badly corrupted that the machine would
crash if you tried to *open the project*!  I had to recreate the project file
from scratch.  Fortunately, there were only about ten files, so it wasn't much
hassle.  The source files were all okay.

This happened after I ran some code that was dereferencing nil and undefined
pointers (not deliberately!), so I can hardly blame LSP for behaving
erratically.  Still, it's hard to imagine a worse bug than this.  

  Robert