The macosxhints Forums

The macosxhints Forums (http://hintsforums.macworld.com/index.php)
-   Applications (http://hintsforums.macworld.com/forumdisplay.php?f=5)
-   -   TextEdit freezing and related issues (http://hintsforums.macworld.com/showthread.php?t=100839)

lguerb 04-18-2009 02:36 PM

TextEdit freezing and related issues
 
Hello,

I'm having several issues with TextEdit. Whenever I open an existing file (either e.g. from Finder or by first opening TextEdit and doing File, Open...), the application freezes for 2 o 3 minutes until the file actually appears. I can close it by forcing it to quit, or wait until it opens. It happens with every user. I have tried opening both .rtf and .doc files.

TextEdit opens without problems if I launch it directly, but not if I open an existing file.

A related weird issue happens with OpenOffice. I have alread uninstalled it now, but I recall that whenever I launch it directly, either if I choose to begin with a blank new document or open an existing one, a delay of 2 o 3 minutes of freezing occurs. Pages also does a related thing: it opens fine the already existing documents, but launching it directly and choosing to start with a blank document, causes another freeze of some minutes.

I have sincerely no idea of what the problem is. NeoOffice works perfectly fine.

Thanks!

PS: I have a 2 ghz Core 2 Duo Macbook, 4 GB RAM.

hayne 04-18-2009 03:25 PM

1) I presume these documents are on your MacBook's hard drive? Or are they on a network-mounted drive?

2) Launch the "Console" application (under /Applications/Utilities) and look for relevant error messages. Note that messages are labeled with the date & time so you can use that to locate the part of the log to look at. Copy & paste the relevant messages back here so we can see them.
Be sure to look at system.log as well as the console log (Use the "Logs" button (top-left) to see the various logs available - note that you will probably need to be an "admin" user to see the system.log)

3) Does the problem occur with all existing documents? E.g. what if you create a new document, and then save it without typing in anything (i.e. create an empty document) - does the problem occur if you quit TextEdit and then re-launch it and try to open that empty document?

lguerb 04-18-2009 03:36 PM

1) yes, the documents are my MacBook's hard drive.

2) Console doesn't tell me anything new. Only a new entry appears when I force-quit TextEdit, but not before:

18/04/09 21:32:48 com.apple.launchd[84] ([0x0-0x47047].com.apple.TextEdit[467]) Exited: Terminated

3) I have tried saving a new document without typing anything. It actually makes TextEdit freeze when I save it*, not to mention when I try to open it later again. Same thig if I do type something.

I didn't mention it before, but if it's relevant, this is OS X 10.5.6.

hayne 04-18-2009 03:47 PM

Maybe the problem is with your hard drive.
Try doing "Repair Disk" (different from "Repair Disk Permissions"!) in Disk Utility when booted from the Install CD/DVD. I.e. you restart from the Install CD/DVD, then run the version of Disk Utility that is available from one of the menus there (in 10.4.x, it's the Utilities menu), then go to the First Aid tab, select your boot drive, and click "Repair Disk" (NOT Repair Disk Permissions). If Repair Disk finds any errors at all, repeat the repair until no errors are found.
See this Apple doc:
http://docs.info.apple.com/article.html?artnum=106214

lguerb 04-22-2009 06:28 PM

It still doesn't work. I checked the hard drive with the disk utility and it doesn't give me any error at all.

I can't exactly recall, but not long ago I upgraded the MacBook memory. I took off the 1 GB it came with and replaced it with 4 GB (brand new). Everything else works perfectly, and they are well recognized by the system. I don't really know if this problem occured before that, but it seems weird that it might affect the behaviour of 2 o 3 specific text editors.

Hal Itosis 04-22-2009 11:05 PM

Launch Font Book and open its prefs.
Does this box have a checkmark?
[] Automatic font activation
If so, see if turning that off helps.

lguerb 04-23-2009 10:37 AM

Tried that too. First, I didn't have FontBook installed. Anyway, I installed it, but there is no such option in my preferences!.

FontBook also took a few minutes to load, but at least with a "Loading fonts" or something like that warning.

benwiggy 04-23-2009 11:38 AM

Quote:

Originally Posted by lguerb (Post 530019)
I didn't have FontBook installed.

FontBook is installed as part of a standard OS X installation. Have you deleted stuff from your OS, or customised your installation in some way? Perhaps you have removed some other vital components?

Create a brand new user account. Does the problem persist? if so, then the problem is at the OS level. If not, then the problem is a user setting or other problem within your old user account's Library folder.

lguerb 04-23-2009 11:45 AM

The problem happens with every user.

I don't know what FontBook is then. I did have to download and install it. Where is it located in a standard OS X installation? Maybe I just missed it.

benwiggy 04-23-2009 11:48 AM

FontBook is Apple's font management utility. It normally is found in /Applications/Utilities/

lguerb 04-23-2009 11:49 AM

Pss, I didn't find it in the first place because my OS Language is not English. Anyway, I do uncheck that option but the problem persists.

lguerb 04-25-2009 03:56 PM

I have confirmed that the same problem happens with Pages and Numbers (not with Keynote).

Cheech'i 04-25-2009 09:32 PM

Can you use TextWrangler? That way you can have a text editor and your office suite NeoOffice so you should be able to have a working program for everything, even if it is not your preferred program.

I have a feeling it is the drive as well. Disk utility can do a good job, but there should be some utilities on your OS X disc that can test the drive. It's possible that the problem is not discoverable by Disk Utility because the disk is in use running OS X. Doing it from the install disk (or techtool, etc) should eliminate that and allow the disk to be tested without other things going on.

Do the documents take longer than normal loading in NeoOffice? Do these documents have special characters outside of english characters? Can you copy a problematic document to another location (network share or flash drive) and see if you have the same issues?

Mikey-San 04-25-2009 09:45 PM

Quote:

Originally Posted by Cheech'i (Post 530317)
Can you use TextWrangler? That way you can have a text editor and your office suite NeoOffice so you should be able to have a working program for everything, even if it is not your preferred program.

This is not a good solution to the problem.

It may be revealing to reproduce the issue with TextEdit and sample it. You can take a sample of an application with Activity Monitor.

Cheech'i 04-26-2009 01:26 AM

It's good to solve the problem, but in the meantime if he needs to continue working and this is a usable workaround, the problem can be solved at a less hectic pace.

lguerb 04-26-2009 02:26 PM

Well, I have no problem using NeoOffice and another text editor, but the problem just bothers me because I know there is a problem :P

NeoOffice works just fine, it loads easily any document. And they don't have any special characters, I reproduce the problem with several files, even new files, blank files, files with just "hello", etc.

What other disk utilities could I use, besides Mac OS X Disk Utility?

hayne 04-26-2009 11:11 PM

Quote:

Originally Posted by lguerb (Post 529928)
I can't exactly recall, but not long ago I upgraded the MacBook memory. I took off the 1 GB it came with and replaced it with 4 GB (brand new).

You should check the RAM with 'memtest':
http://www.memtestosx.org/
Be sure to do the long test - several hours or overnight.

lguerb 04-28-2009 02:27 PM

Quote:

Originally Posted by hayne (Post 530431)
You should check the RAM with 'memtest':
http://www.memtestosx.org/
Be sure to do the long test - several hours or overnight.

I took the test as the installation process told me, with "memtest all 2". It took about 7500 seconds (about 2 hours), and everything was ok, with

"All test passed"

as the final message. Is there a longer test?

What about if it's not the memory? Any other ideas?

I will keep trying for a few days, otherwise I'll just backup everything and do a full reinstall to see if the problem is hardware related or software related.

PS: I discovered new instances of the problem. E.g., trying to save a song in Garage Band, or trying to print in Safari (I didn't try printing in other application). The problem is the same: it freezes for some minutes until it finally does what it has do to. These are probably not new, I just never tried them before.

Mikey-San 04-28-2009 03:26 PM

Quote:

What about if it's not the memory? Any other ideas?
Did you skip my post entirely?

lguerb 04-28-2009 03:55 PM

Quote:

Originally Posted by Mikey-San (Post 530643)
Did you skip my post entirely?

Activity Monitor doesn't give me any information. When TextEdit is working fine (e.g. before saving), I look at the monitor, then pres save in TextEdit and everything remains the same (except for the ¨Not responding¨label on the corresponding process).

Mikey-San 04-28-2009 03:58 PM

Quote:

Originally Posted by lguerb (Post 530648)
Activity Monitor doesn't give me any information. When TextEdit is working fine (e.g. before saving), I look at the monitor, then pres save in TextEdit and everything remains the same (except for the ¨Not responding¨label on the corresponding process).

I said sample the hung app with Activity Monitor.

http://img530.imageshack.us/img530/3...cture2b.th.png

The sample log may be revealing.

lguerb 04-28-2009 04:18 PM

Ok, I don't know anything about this, but the log (I sample the process when it is not responding) is the following.

Code:

Sampling process 175 for 1 seconds with 1 millisecond of run time between samples
Sampling completed, processing symbols...
Analysis of sampling TextEdit (pid 175) every 1 millisecond
Call graph:
    417 Thread_2507
      417 0x1df6
        417 NSApplicationMain
          417 -[NSApplication run]
            417 -[NSApplication sendEvent:]
              417 -[NSWindow sendEvent:]
                417 -[NSControl mouseDown:]
                  417 -[NSButtonCell trackMouse:inRect:ofView:untilMouseUp:]
                    417 -[NSCell trackMouse:inRect:ofView:untilMouseUp:]
                      417 -[NSCell _sendActionFrom:]
                        417 -[NSControl sendAction:to:]
                          417 -[NSApplication sendAction:to:from:]
                            417 -[NSSavePanel(NSSavePanelRuntime) ok:]
                              417 -[NSSavePanel(NSSavePanelRuntime) dismissWindow:]
                                417 -[NSApplication endSheet:returnCode:]
                                  417 -[NSSavePanel(NSSavePanelRuntime) _didEndSheet:returnCode:contextInfo:]
                                    417 -[NSDocument _savePanelWasPresented:withResult:inContext:]
                                      417 -[NSDocument saveToURL:ofType:forSaveOperation:delegate:didSaveSelector:contextInfo:]
                                        417 -[NSDocument _saveToURL:ofType:forSaveOperation:delegate:didSaveSelector:contextInfo:]
                                          417 0x8927
                                            417 -[NSDocument saveToURL:ofType:forSaveOperation:error:]
                                              417 -[NSDocument writeSafelyToURL:ofType:forSaveOperation:error:]
                                                417 -[NSDocument _writeSafelyToURL:ofType:forSaveOperation:error:]
                                                  417 -[NSDocument writeToURL:ofType:forSaveOperation:originalContentsURL:error:]
                                                    417 0x8b51
                                                      417 0x8fe1
                                                        417 0x9a59
                                                          417 -[NSPrintInfo paperSize]
                                                            417 -[NSPrintInfo(NSManagedAttributes) _objectForAttributeKey:]
                                                              417 -[NSPrintInfo(NSInternal) _pageFormatForGetting]
                                                                417 -[NSPrintInfo(NSInternal) _createDefaultOrUnflattenPageFormatIfNecessary]
                                                                  417 -[NSPrintInfo(NSInternal) _printSessionForGetting]
                                                                    417 PMCreateSession
                                                                      417 PJCCreateSession(OpaquePMPrintSession**)
                                                                        417 OpaquePMPrintSession::OpaquePMPrintSession(OpaquePMPrintSession*)
                                                                          417 OpaquePMPrintSession::SetCurrentPrinter()
                                                                            417 PJCGetCurrentPrinter
                                                                              417 CUPSPrinter::CUPSPrinter()
                                                                                417 OpaquePMPrinter::OpaquePMPrinter()
                                                                                  417 CPLCopyDefaultPrinterName
                                                                                    417 cachedCupsGetDests(cups_dest_s**)
                                                                                      417 cupsGetDests
                                                                                        417 httpConnectEncrypt
                                                                                          417 httpReconnect
                                                                                            417 connect$UNIX2003
                                                                                              417 connect$UNIX2003
    417 Thread_2603
      417 thread_start
        417 _pthread_start
          417 PrivateMPEntryPoint
            417 TSystemNotificationTask::SystemNotificationTaskProc(void*)
              417 CFRunLoopRun
                417 CFRunLoopRunSpecific
                  417 mach_msg
                    417 mach_msg_trap
                      417 mach_msg_trap
    417 Thread_2703
      417 thread_start
        417 _pthread_start
          417 PrivateMPEntryPoint
            417 TFSEventsNotificationTask::FSEventsNotificationTaskProc(void*)
              417 CFRunLoopRun
                417 CFRunLoopRunSpecific
                  417 mach_msg
                    417 mach_msg_trap
                      417 mach_msg_trap
    417 Thread_2803
      417 thread_start
        417 _pthread_start
          417 PrivateMPEntryPoint
            417 TNodeSyncTask::SyncTaskProc(void*)
              417 MPWaitOnQueue
                417 TSWaitOnConditionTimedRelative
                  417 TSWaitOnCondition
                    417 pthread_cond_wait$UNIX2003
                      417 __semwait_signal
                        417 __semwait_signal
    417 Thread_2903
      417 thread_start
        417 _pthread_start
          417 kevent
            417 kevent
    417 Thread_2a03
      417 thread_start
        417 _pthread_start
          417 select$DARWIN_EXTSN
            417 select$DARWIN_EXTSN
    417 Thread_2c03
      417 thread_start
        417 _pthread_start
          417 __NSThread__main__
            417 -[NSThread main]
              417 -[NSUIHeartBeat _heartBeatThread:]
                415 usleep$UNIX2003
                  415 __semwait_signal
                    415 __semwait_signal
                1 -[NSUIHeartBeat _heartBeatThread:]
                1 objc_msgSend
                  1 objc_msgSend
    408 Thread_2b03
      408 thread_start
        408 _pthread_start
          408 PrivateMPEntryPoint
            408 TFolderSizeTask::FolderSizeTaskProc(void*)
              408 MPWaitOnQueue
                408 TSWaitOnConditionTimedRelative
                  408 pthread_cond_timedwait_relative_np
                    408 _pthread_cond_wait
                      408 semaphore_timedwait_signal_trap
                        408 semaphore_timedwait_signal_trap

Total number in stack (recursive counted multiple, when >=5):
        7      _pthread_start
        7      thread_start

Sort by top of stack, same collapsed (when >= 5):
        mach_msg_trap        834
        __semwait_signal        832
        connect$UNIX2003        417
        kevent        417
        select$DARWIN_EXTSN        417
        semaphore_timedwait_signal_trap        408
Sample analysis of process 175 written to file /dev/stdout


Mikey-San 04-28-2009 04:23 PM

Did you take that while opening a file?

lguerb 04-28-2009 04:43 PM

No, that was trying to save a new file with one word in it. The log for opening a file is the following.

Code:

Sampling process 231 for 1 seconds with 1 millisecond of run time between samples
Sampling completed, processing symbols...
Analysis of sampling TextEdit (pid 231) every 1 millisecond
Call graph:
    651 Thread_2507
      651 0x1df6
        651 NSApplicationMain
          651 -[NSApplication run]
            651 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:]
              651 _DPSNextEvent
                651 AEProcessAppleEvent
                  651 aeProcessAppleEvent
                    651 dispatchEventAndSendReply(AEDesc const*, AEDesc*)
                      651 aeDispatchAppleEvent(AEDesc const*, AEDesc*, unsigned long, unsigned char*)
                        651 _NSAppleEventManagerGenericHandler
                          651 -[NSAppleEventManager dispatchRawAppleEvent:withRawReply:handlerRefCon:]
                            651 -[NSApplication(NSAppleEventHandling) _handleCoreEvent:withReplyEvent:]
                              651 -[NSApplication(NSAppleEventHandling) _handleAEOpenDocuments:]
                                651 -[NSApplication _doOpenFiles:]
                                  651 -[NSApplication _doOpenFile:ok:tryTemp:]
                                    651 -[NSDocumentController(NSInternal) _openFile:]
                                      651 0x9e04
                                        651 -[NSDocumentController openDocumentWithContentsOfURL:display:error:]
                                          651 -[NSDocumentController makeDocumentWithContentsOfURL:ofType:error:]
                                            651 -[NSDocument initWithContentsOfURL:ofType:error:]
                                              651 0xa07c
                                                651 0xac35
                                                  651 0xb039
                                                    651 -[NSPrintInfo paperSize]
                                                      651 -[NSPrintInfo(NSManagedAttributes) _objectForAttributeKey:]
                                                        651 -[NSPrintInfo(NSInternal) _pageFormatForGetting]
                                                          651 -[NSPrintInfo(NSInternal) _createDefaultOrUnflattenPageFormatIfNecessary]
                                                            651 -[NSPrintInfo(NSInternal) _printSessionForGetting]
                                                              651 PMCreateSession
                                                                651 PJCCreateSession(OpaquePMPrintSession**)
                                                                  651 OpaquePMPrintSession::OpaquePMPrintSession(OpaquePMPrintSession*)
                                                                    651 OpaquePMPrintSession::SetCurrentPrinter()
                                                                      651 PJCGetCurrentPrinter
                                                                        651 CUPSPrinter::CUPSPrinter()
                                                                          651 OpaquePMPrinter::OpaquePMPrinter()
                                                                            651 CPLCopyDefaultPrinterName
                                                                              651 cachedCupsGetDests(cups_dest_s**)
                                                                                651 cupsGetDests
                                                                                  651 httpConnectEncrypt
                                                                                    651 httpReconnect
                                                                                      651 connect$UNIX2003
                                                                                        651 connect$UNIX2003

Total number in stack (recursive counted multiple, when >=5):

Sort by top of stack, same collapsed (when >= 5):
        connect$UNIX2003        651
Sample analysis of process 231 written to file /dev/stdout


Mikey-San 04-28-2009 04:51 PM

The document system that TextEdit is based on (which some other apps also use) is attempting to contact a printer and waiting for that to finish. Do you have a printer/printers set up? How are they configured? Connected at all? Reachable? Someone with more patience for printers (I have none anymore) might be able to help here. :)

lguerb 04-28-2009 05:01 PM

Well, thanks Mikey-San!

I think I know what happens now. I had a bunch of printers configured some time ago, because I used the computer at job. Now I changed my job location, so those printers are no longer available. That must be the problem.

However, in System Preferences, no printers are configured, and it also freezes for some minutes before showing the Printers section :)

Edit: Solved. Just removed the file in /etc/cups.conf containing the printers server.

Mikey-San 04-28-2009 05:04 PM

Try removing those printers, restarting, and opening a problematic document in TextEdit.


All times are GMT -5. The time now is 03:44 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.