Just bought marked - uses 100% CPU
I have the command-line version of multimarkdown installed on my system. I'm running osx 10.7.3. This afternoon I purchased Multimarkdown Composer and Marked. Unfortunately, Marked isn't working. It fires up multimarkdown in the background, which uses 100% of the CPU on my system. If I kill that, it fires up another one. Killing that process brings up a blank Marked preview window.
What have I done wrong?
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Brett on 25 Feb, 2012 09:03 PM
I haven't heard this reported before. While it sounds fairly certain, to be sure that it's the multimarkdown process from Marked (as opposed to one run by MultiMarkdown Composer), have you seen this happen even when Composer isn't running?
If you check Activity Monitor, can you see if there are more than one `multimarkdown` processes running at the time that the CPU cycles go up?
Lastly, you can try the command below to enable basic logging to console, which you can view in Console.app under system log. It sounds like a process is getting stuck while rendering the preview, so this log may be able to tell us at what point the issue is happening.
defaults write com.brettterpstra.marky debugMode 1
Thanks,
Brett
2 Posted by Mike Johnston on 25 Feb, 2012 10:22 PM
Thanks for responding, Brett.
The problem happens whether I am running Composer or not. I haven't been able to successfully fire up Marked once yet. I just dragged an MD document to it and it hung again. In Activity Monitor, Marked is shown as not responding. There is one multimarkdown process running. It is using 100% CPU. I killed that. Another multimarkdown process fires up. It, too, uses 100%. Then I killed it and Marked opened, albeit with a blank preview.
Here are the resulting log entries:
2/25/12 5:15:02.759 PM sudo: mjold : TTY=ttys002 ; PWD=/Users/mjold/Downloads ; USER=root ; COMMAND=/usr/bin/defaults write com.brettterpstra.marky debugMode 1
2/25/12 5:16:29.812 PM Marked: {
} 2/25/12 5:18:48.052 PM Marked: {
} 2/25/12 5:18:56.606 PM Marked: GetISImageRefFromIconRefInternal: could not retain image ref 0x28690001 (err=-2580)
2/25/12 5:18:56.662 PM Marked: GetISImageRefFromIconRefInternal: could not retain image ref 0x28690001 (err=-2580)
2/25/12 5:18:56.662 PM Marked: GetISImageRefFromIconRefInternal: could not retain image ref 0x28690001 (err=-2580)
2/25/12 5:18:56.662 PM Marked: GetISImageRefFromIconRefInternal: could not retain image ref 0x28690001 (err=-2580)
2/25/12 5:18:56.662 PM Marked: GetISImageRefFromIconRefInternal: could not retain image ref 0x28690001 (err=-2580)
2/25/12 5:18:56.662 PM Marked: GetISImageRefFromIconRefInternal: could not retain image ref 0x28690001 (err=-2580)
2/25/12 5:18:56.662 PM Marked: GetISImageRefFromIconRefInternal: could not retain image ref 0x28690001 (err=-2580)
2/25/12 5:18:56.662 PM Marked: GetISImageRefFromIconRefInternal: could not retain image ref 0x28690001 (err=-2580)
2/25/12 5:18:56.662 PM Marked: GetISImageRefFromIconRefInternal: could not retain image ref 0x28690001 (err=-2580)
2/25/12 5:18:56.662 PM Marked: GetISImageRefFromIconRefInternal: could not retain image ref 0x28690001 (err=-2580)
2/25/12 5:18:56.662 PM Marked: GetISImageRefFromIconRefInternal: could not retain image ref 0x28690001 (err=-2580)
2/25/12 5:18:56.662 PM Marked: GetISImageRefFromIconRefInternal: could not retain image ref 0x28690001 (err=-2580)
2/25/12 5:18:56.662 PM Marked: GetISImageRefFromIconRefInternal: could not retain image ref 0x28690001 (err=-2580)
2/25/12 5:18:56.662 PM Marked: GetISImageRefFromIconRefInternal: could not retain image ref 0x28690001 (err=-2580)
2/25/12 5:18:56.662 PM Marked: GetISImageRefFromIconRefInternal: could not retain image ref 0x28690001 (err=-2580)
2/25/12 5:18:56.662 PM Marked: GetISImageRefFromIconRefInternal: could not retain image ref 0x28690001 (err=-2580)
2/25/12 5:18:56.662 PM Marked: GetISImageRefFromIconRefInternal: could not retain image ref 0x28690001 (err=-2580)
2/25/12 5:18:56.662 PM Marked: GetISImageRefFromIconRefInternal: could not retain image ref 0x28690001 (err=-2580)
2/25/12 5:18:56.662 PM Marked: GetISImageRefFromIconRefInternal: could not retain image ref 0x28690001 (err=-2580)
2/25/12 5:18:56.662 PM Marked: GetISImageRefFromIconRefInternal: could not retain image ref 0x28690001 (err=-2580)
2/25/12 5:18:56.662 PM Marked: GetISImageRefFromIconRefInternal: could not retain image ref 0x28690001 (err=-2580)
2/25/12 5:18:56.662 PM Marked: GetISImageRefFromIconRefInternal: could not retain image ref 0x28690001 (err=-2580)
2/25/12 5:18:56.662 PM Marked: _GetISImageRefFromIconRefInternal: could not retain image ref 0x28690001 (err=-2580)
2/25/12 5:21:20.674 PM Marked: {
} 2/25/12 5:21:33.092 PM Marked: {
}
3 Posted by Mike Johnston on 25 Feb, 2012 10:26 PM
I nearly forgot: I inspected the process in Activity Monitor. This is the path:
/Applications/Marked.app/Contents/Resources/multimarkdown
Could there be a collision of some kind between Marked and the command-line version of multimarkdown?
Support Staff 4 Posted by Brett on 25 Feb, 2012 10:35 PM
I don't think so, it specifically calls the internal version and there shouldn't be any confusion or conflict. I'm going to talk to Fletcher (MultiMarkdown author) about the error and see if he can shed any light on it. I'll get back to you as soon as possible.
I'm assuming that since you haven't been able to launch Marked, you've never tried to open a document? If you _have_ tried, can you send me a copy of the document?
Thanks,
Brett
5 Posted by Michael Johnsto... on 25 Feb, 2012 11:11 PM
Ok. I see what's happening. The problem is that I am, at least in part, an
idiot. But allow me to qualify that statement slightly.
One of the reasons I bought Multimarkdown Pro was because it allows me to
open and save OPML documents. Previously, I used Mindnode Pro to create
mind maps, save them as OPML, then open them in OmniOutliner.
Unfortunately, OO didn't allow me to save the OPML as markdown, while
Multimarkdown Pro does. This explains the purchase. It streamlines my
workflow.
So, I used MM Pro to open an OPML document. Since the icon looks like a
Markdown icon, this explains how it happened. MM Pro opened the document
just fine, but Marked was trying to preview the OPML, which seems to have
caused the hanging.
So that appears to explain the cause. However, I think perhaps Marked might
do a better job of detecting when it is being used to preview a
non-Markdown document - lest it take an unexplained visit to 1 Infinite
Loop. Also, this causes problems for me in MM Pro. By opening an OPML
document but having Marked selected as the preview pane viewer, the problem
is migrated to MM Pro as well.
Clear as mud, right?
Support Staff 6 Posted by Brett on 25 Feb, 2012 11:46 PM
Well, that does explain the issue, and you're correct: Marked should prevent this from happening.
The main issue is that Marked has to be able to open any file extension. There are too many variants among Markdown users to collect and define them all. Therefore it attempts to open anything. It immediately discards binary and RTF files, but if the file opens as plain text, it attempts to process it (with multimarkdown by default).
I can, however, put a simple check for an OPML extension and process or provide an error. I just added an error check to the code, so it will provide a note about saving as MultiMarkdown before opening and not hang the system. Hopefully I'll work out a decent method of internally translating the OPML in the future.
Thanks for helping me catch this and clear it up.