Crashes in NumberedHeadings documents

M

mansky99

Hi all,
I'm running Word 10.1.8 on OSX 10.3.9 and am getting fairly regular
crashes in Word
when I try to "Save As" a new document with numbered headings styles. These
docs are
based on my custom document template that contains the various styles I want
to use in
various numbered headings.

Here's a snippet from the Crash log:

Command: Microsoft Word
Path: /Applications/Microsoft Office X/Microsoft Word
Version: ??? (???)
PID: 560
Thread: 0

Exception: EXC_BAD_ACCESS (0x0001)
Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x00000078

Thread 0 Crashed:
0 com.apple.HIToolbox 0x928992f8 IsWindowContainedInGroup + 0x38
1 com.apple.HIToolbox 0x9289c470 _IsWindowContainedInGroup +
0x10
2 com.apple.HIToolbox 0x92898390
GetWindowsOrIndex(OpaqueWindowGroupRef*, unsigned long, OpaqueWindowPtr**,
unsigned long*, unsigned long) + 0x90
3 com.apple.HIToolbox 0x928d5d80 GetIndexedWindow + 0x48
4 com.apple.HIToolbox 0x928b23d4
GetWindowGroupRange(OpaqueWindowGroupRef*, unsigned long*, unsigned long*,
OpaqueWindowPtr**, OpaqueWindowPtr**) + 0x8c
5 com.apple.HIToolbox 0x928c601c SetWindowGroup + 0xd8
6 MCPZ.stb 0x005fdcb8 0x5c59d0 + 0x382e8
7 Microsoft Word 0x02162220 0x2008000 + 0x15a220
8 Microsoft Word 0x0217c624 0x2008000 + 0x174624
9 Microsoft Word 0x0217c414 0x2008000 + 0x174414
.....


One common thread I've been able to notice is that in many of the crashes,
Copy and then Paste actions immediately precede the "Save As" action. The
Cutting and Pasting is occuring between two Word docs both w/numbered
headings styles based on different (or the same) custom Word templates I've
created.

As for the Pasting operation itself, we're doing "Paste Special" to handle
the Styled text that's usually in the system clipboard.

Any ideas as to why we're getting these crashes in Word while
cutting/pasting and saving Numbered Heading docs would be greatly appreciated!

Ed
 
J

John McGhie

Hi Ed:

You have conflicting information in your list numbering templates.

You have customised the styles, but you may not have defined the list
templates into the styles correctly. Or some of the definitions in the list
templates or styles may be inconsistent with each other.

In technical terms "The document and/or the template are pooched."

The crash happens on save because that is when Word attempts to resolve the
pointers.

Replace the template from which you are creating the document with a clean
new one (uncustomised numbering) and I think the problem will go away. If
it does, then carefully customise the numbering again.

Pasting numbering from one document into another is always a high-risk
activity. You may wish to paste as unformatted text and re-number when you
get into the destination document.

Hope this helps


Hi all,
I'm running Word 10.1.8 on OSX 10.3.9 and am getting fairly regular
crashes in Word
when I try to "Save As" a new document with numbered headings styles. These
docs are
based on my custom document template that contains the various styles I want
to use in
various numbered headings.

Here's a snippet from the Crash log:

Command: Microsoft Word
Path: /Applications/Microsoft Office X/Microsoft Word
Version: ??? (???)
PID: 560
Thread: 0

Exception: EXC_BAD_ACCESS (0x0001)
Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x00000078

Thread 0 Crashed:
0 com.apple.HIToolbox 0x928992f8 IsWindowContainedInGroup + 0x38
1 com.apple.HIToolbox 0x9289c470 _IsWindowContainedInGroup +
0x10
2 com.apple.HIToolbox 0x92898390
GetWindowsOrIndex(OpaqueWindowGroupRef*, unsigned long, OpaqueWindowPtr**,
unsigned long*, unsigned long) + 0x90
3 com.apple.HIToolbox 0x928d5d80 GetIndexedWindow + 0x48
4 com.apple.HIToolbox 0x928b23d4
GetWindowGroupRange(OpaqueWindowGroupRef*, unsigned long*, unsigned long*,
OpaqueWindowPtr**, OpaqueWindowPtr**) + 0x8c
5 com.apple.HIToolbox 0x928c601c SetWindowGroup + 0xd8
6 MCPZ.stb 0x005fdcb8 0x5c59d0 + 0x382e8
7 Microsoft Word 0x02162220 0x2008000 + 0x15a220
8 Microsoft Word 0x0217c624 0x2008000 + 0x174624
9 Microsoft Word 0x0217c414 0x2008000 + 0x174414
....



One common thread I've been able to notice is that in many of the crashes,
Copy and then Paste actions immediately precede the "Save As" action. The
Cutting and Pasting is occuring between two Word docs both w/numbered
headings styles based on different (or the same) custom Word templates I've
created.

As for the Pasting operation itself, we're doing "Paste Special" to handle
the Styled text that's usually in the system clipboard.

Any ideas as to why we're getting these crashes in Word while
cutting/pasting and saving Numbered Heading docs would be greatly appreciated!

Ed

--
Don't wait for your answer, click here: http://www.word.mvps.org/

Please reply in the group. Please do NOT email me unless I ask you to.

John McGhie, Consultant Technical Writer
McGhie Information Engineering Pty Ltd
http://jgmcghie.fastmail.com.au/
Nhulunbuy, Northern Territory, Australia
+61 4 1209 1410, mailto:[email protected]
 
M

mansky99

Hi John,
Thanks very much for the information. What you said makes a lot of sense
to me. I will indeed take a close look at the templates to see where they
differ and to see if the list templates are defined correctly. Your point
about pointers during the "Save As" action is also spot on I suspect.

In addition to using Paste Special to handle the styled text from the
Clipboard, would you recommend using other clipboard programs (PTHPastboard)
instead of the System Clipboard, or even an intermediate flat file (via Text
Edit), to strip out other objects during the paste operation?

In reading other threads here, I read of suggestions of using TextEdit to
create an intermediate file that could be used in copying contents of web
pages into Word documents. I wrote some VB macros that call an Applescript
code that does create a temp file on the fly for the problem of Copying and
Pasting Web pages into Word. Seems to work fine. The crashes I had earlier
haven't re-appeared.

Ed
 
J

John McGhie

Hi Ed:

We have found that any program that does things with the Clipboard pretty
much guarantees crashes and hangs in Word.

Nearly all of us use a macro for this:

Sub EditPaste()
'
' Macro1 Macro
' Macro recorded 20/12/00 by John McGhie
'
On Error GoTo JustPaste
If ActiveDocument.Kind <> wdDocumentEmail And _
(Selection.Type = wdSelectionIP Or _
Selection.Information(wdWithInTable) = False) Then
Selection.PasteSpecial DataType:=wdPasteText
Else
PasteNormal
End If
End

JustPaste:
Selection.Paste
End Sub

That's the Word 2003 version I happen to find first: you may need to comment
out the wdDocumentEmail line, I don't think that constant exists in Mac
Word.

The issue you have is the List Templates. You won't even see them unless
you read up on them in the VBA Help. They are a nasty little add-on to the
object model that is not well integrated, and thus, very fragile.

When you copy text that has bullets or numbering, you copy over three
things:

* The Text
* The List Template
* A pointer to the list template.

If the List Template is one of the built-in ones, there is a chance of an
unresolved (ambiguous) pointer. That's what causes the crashes. If the
numbering has been hacked around in the source document, badness is pretty
much guaranteed.

Hope this helps


Hi John,
Thanks very much for the information. What you said makes a lot of sense
to me. I will indeed take a close look at the templates to see where they
differ and to see if the list templates are defined correctly. Your point
about pointers during the "Save As" action is also spot on I suspect.

In addition to using Paste Special to handle the styled text from the
Clipboard, would you recommend using other clipboard programs (PTHPastboard)
instead of the System Clipboard, or even an intermediate flat file (via Text
Edit), to strip out other objects during the paste operation?

In reading other threads here, I read of suggestions of using TextEdit to
create an intermediate file that could be used in copying contents of web
pages into Word documents. I wrote some VB macros that call an Applescript
code that does create a temp file on the fly for the problem of Copying and
Pasting Web pages into Word. Seems to work fine. The crashes I had earlier
haven't re-appeared.

Ed

--
Don't wait for your answer, click here: http://www.word.mvps.org/

Please reply in the group. Please do NOT email me unless I ask you to.

John McGhie, Consultant Technical Writer
McGhie Information Engineering Pty Ltd
http://jgmcghie.fastmail.com.au/
Nhulunbuy, Northern Territory, Australia
+61 4 1209 1410, mailto:[email protected]
 
M

mansky99

Hi John,
Your script is much appreciated. I'll compare it with what I've written to
see the differences. Many thanks.

A couple of more questions come to mind after talking with my Users. The
issues of Word crashing upon "Save As", after Copying and Pasting between 2
documents based upon 2 custom templates w/Numbered Headings styles defined
doesn't occur on a MacBook running Tiger and Office 2004, with the same
templates.

The machine the Word problems are occurring on is a PowerMac G4 (dual
1.25GHz/2Gb RAM) running Panther (10.3.9) and Office X (updated to 10.1.8).
These updates done to Office X were updates, not clean installs of the entire
Office X suite. Could the problems I've described be due to our using Office
X instead of Office 2004? Were there changes to Office 2004 in outline
heading styles in particular that I'm missing in Office X? Or will simply
doing a clean Uninstall and re-install of Office X potentially solve the
problem? Or is it the OS? Should I upgrade to Tiger? (I was planning to
upgrade that machine in the near future anyway)

Office X is still on the original root hard drive that came with the
system when bought in 2002. I've not had any problems, or failures with any
of the hard drives on the G4 MDD DP1.25GHz machine. I've run DiskUtility
periodically on all the disks, no problems reported.


Ed
 
J

John McGhie

Hi Ed:

The OS is not the problem. It's the version of Word. You're one patch
behind the play, I think, but that's probably not it either.

Word X is simply not as rugged as Word 2004 in these circumstances.

Chances are, the document is simply corrupt. A good Maggie ought to fix it:

1) Create a new blank document

2) Carefully select everything except the last paragraph mark.

3) Copy

4) Paste into the new document.

That leaves the mangled list templates behind and forces creation of new
ones in the target document.

Should be OK after that.

Cheers

Hi John,
Your script is much appreciated. I'll compare it with what I've written to
see the differences. Many thanks.

A couple of more questions come to mind after talking with my Users. The
issues of Word crashing upon "Save As", after Copying and Pasting between 2
documents based upon 2 custom templates w/Numbered Headings styles defined
doesn't occur on a MacBook running Tiger and Office 2004, with the same
templates.

The machine the Word problems are occurring on is a PowerMac G4 (dual
1.25GHz/2Gb RAM) running Panther (10.3.9) and Office X (updated to 10.1.8).
These updates done to Office X were updates, not clean installs of the entire
Office X suite. Could the problems I've described be due to our using Office
X instead of Office 2004? Were there changes to Office 2004 in outline
heading styles in particular that I'm missing in Office X? Or will simply
doing a clean Uninstall and re-install of Office X potentially solve the
problem? Or is it the OS? Should I upgrade to Tiger? (I was planning to
upgrade that machine in the near future anyway)

Office X is still on the original root hard drive that came with the
system when bought in 2002. I've not had any problems, or failures with any
of the hard drives on the G4 MDD DP1.25GHz machine. I've run DiskUtility
periodically on all the disks, no problems reported.


Ed

--
Don't wait for your answer, click here: http://www.word.mvps.org/

Please reply in the group. Please do NOT email me unless I ask you to.

John McGhie, Consultant Technical Writer
McGhie Information Engineering Pty Ltd
http://jgmcghie.fastmail.com.au/
Nhulunbuy, Northern Territory, Australia
+61 4 1209 1410, mailto:[email protected]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top