Greetings!

   I am a long time Macintosh user, and have been using Perl and
MacPerl for a couple of years now.  I've been working on our build
system and I'm using MacPerl and perl.

   Things seem to work great under OSX, but the MacPerl side is having
some issue.  Crashes and annoying behavior.

   The crashes revolve around the use of DoAppleScript I believe.  I
need to do things in the finder that I can't do in perl so I create
simple little Applescripts on the fly and run them.  Things like
moving folders, get disk names, renaming items, etc.

   What I am seeing is many crashes, at random intervals.  It appears
that the heap get corrupted somewhere and thing go *bad* real quick.

   I have a stack trace or two, but they don't really show much.  My
cursor gets currupted on a crash  (usually a good sign of heap
corruption) and the MacsBug indicates that the the Master Pointer
Block is bad.  (Another sign of bid screwage.)

   Here's one of my macsbug session logs.

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

  Calling chain using A6/R1 links
   Back chain  ISA  Caller
   03E69A39    PPC  FFCEC0CC  EmToNatEndMoveParams+00014
   03E699C0    PPC  01B41528  'WDEF 0040 0002'+00148
   03E69980    PPC  00A50FD8  DocWindowEntry+001F4
   03E698A0    PPC  00A51620  SideUtilityWindowEntry+001A8
   03E69860    PPC  00A4E908
   03E697E0    PPC  00954500  DrawThemeWindowFrame+00120
   03E69780    PPC  0097B7FC  GetThemePlaylist+1A474
   03E69720    PPC  009810E8  GetThemePlaylist+1FD60
   03E69660    PPC  00977A08  GetThemePlaylist+16680
   03E69610    PPC  00981B70  GetThemePlaylist+207E8
   03E695C0    PPC  FFD0F51C  NewRgn+00014
   03E69580    PPC  004B3B28  NQDNewRgn+00018
   03E69540    PPC  FFD08FAC  NewHandle+00024
   03E69500    PPC  00447E98  __NewHandle+00018

PowerPC unmapped memory exception at 0044A270 YourHeapIsProbablyCorrupt+0124C

  The "MacPerl" heap at 0348A290 is bad
   Relative handle is bad
  Block header

   039800D0  0398 00B0 AB00 000A  0000 0020 FCDF 5D98  *�*��****** ��]�
  Heap zones
   #1  Mod       32276K  00002800 to 01F8783F  SysZone^
   #2  Mod           6K    000191F0 to 0001ABDF  ROM read-only zone
   #3  Mod         288K    006D2C20 to 0071AC1F
   #4  Mod          94K    007BACA0 to 007D287F
   #5  Mod       62367K  01F87840 to 05C6F55F  Process Manager zone
   #6  Mod        7237K    02D38C00 to 0344A17F  "ToolServer"
   Unable to access that address
   PC: 07AB65DE
   Frame Type: B008
Bus Error at 0161DD1E
while reading word from 0D0D0D0D in User data space

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

   As one can see hc won't even list the Heap for MacsBug, the heap is
messed up so bad.   The reading word from 0D0D0D0D appears as if
someone is using an unitialized pointer.

   I've tried using ATHCA (A-Trap Heap Check Application) while
running my script and I can't seem to find out what the problem is
that way.  It crashes before the ATHCA is tripped.  (So a trap call
isn't screwing things up.)

   This all seems to revolve around my new usage of the DoAppleScript
routine.  I haven't been able to create a reproducible case yet to
submit, but my guess is that someone is doubple Dipose-ing something
at the end of a routine.  (The sorts of crashes and heap corruptions
are sympotmatic of that bug.)

   I am seeing the same errors in 5.6.1b4.

   Has anyone seen anything like this?    Has anyone else made
extensive use of DoAppleScript?

   I will submit a test case when I can pin it down.

-Andrew
--

Reply via email to