You are here: Foswiki>Tasks Web>Item584 (03 Jan 2009, CrawfordCurrie)Edit Attach

Item584: WYSIWYG Crash

pencil
Priority: Urgent
Current State: Closed
Released In:
Target Release:
Applies To: Engine
Component: WysiwygPlugin
Branches:
Reported By: TimotheLitt
Waiting For:
Last Change By: CrawfordCurrie
I got a wysisyg plugin crash creating a new topic. I can't reproduce it (at least, not yet), but perhaps the traceback will mean something.

I was creating a topic with nested numbered lists. Wanting to save my work, I clicked save and continue. I got an "internal error" screen. Server log has the traceback below.

I went back and (fortunately!) my work was in the editor buffer. I had left an open numbered list item. (By that, I mean that the number was there, but there was nothing on the line.)

I removed this, and tried "save". This time it worked.

I have a screenshot of the buffer (I'd prefer not to post it, but can supply on request), and I have saved the topic.txt file (obviously, after the save worked.)

I tried going back and just adding the open list item - but this was't sufficient to reproduce the crash.

Looking at the code in Node.pm, it looks like we're following a linked list relating to <[dou]l> tag fixup, and end up in the weeds.

Perhaps someone more familiar with the code can figure this out from the traceback. I need to get back to my writing...

I have marked this Urgent because I hit this as an ordinary user editing, and most people would have lost their work.

Secondary observation It would be good if the plugin had an exception handler that saved work on a crash. Both to help the user restart and to preserve the data for analysis.

This is under 4.2.3.

Thanks.

[Sun Dec 28 09:35:06 2008] [error] [client 192.168.148.108] Use of uninitialized value in pattern match (m//) at /var/www/servers/twiki/lib/TWi
ki/Plugins/WysiwygPlugin/HTML2TML/Node.pm line 620., referer: https://my.network.server/twiki/bin/edit/History/?onlynewtopic=on&topic=HowToMakeChan
ges&topicparent=WebHome&templatetopic=
[Sun Dec 28 09:35:06 2008] [error] [client 192.168.148.108] Use of uninitialized value in pattern match (m//) at /var/www/servers/twiki/lib/TWi
ki/Plugins/WysiwygPlugin/HTML2TML/Node.pm line 626., referer: https://my.network.server/twiki/bin/edit/History/?onlynewtopic=on&topic=HowToMakeChan
ges&topicparent=WebHome&templatetopic=
[Sun Dec 28 09:35:06 2008] [error] [client 192.168.148.108] Can't call method "generate" on unblessed reference at /var/www/servers/twiki/lib/T
Wiki/Plugins/WysiwygPlugin/HTML2TML/Node.pm line 630., referer: https://my.network.server/twiki/bin/edit/History/?onlynewtopic=on&topic=HowToMakeCh
anges&topicparent=WebHome&templatetopic=
[Sun Dec 28 09:35:06 2008] [error] [client 192.168.148.108]  at /var/www/servers/twiki/lib/TWiki/Plugins/WysiwygPlugin/HTML2TML/Node.pm line 63
0, referer: https://my.network.server/twiki/bin/edit/History/?onlynewtopic=on&topic=HowToMakeChanges&topicparent=WebHome&templatetopic=
[Sun Dec 28 09:35:06 2008] [error] [client 192.168.148.108] \tTWiki::Plugins::WysiwygPlugin::HTML2TML::Node::_convertList('TWiki::Plugins::Wysi
wygPlugin::HTML2TML::Node=HASH(0x960ff4c)', '\\x{15}') called at /var/www/servers/twiki/lib/TWiki/Plugins/WysiwygPlugin/HTML2TML/Node.pm line 9
21, referer: https://my.network.server/twiki/bin/edit/History/?onlynewtopic=on&topic=HowToMakeChanges&topicparent=WebHome&templatetopic=
[Sun Dec 28 09:35:06 2008] [error] [client 192.168.148.108] \tTWiki::Plugins::WysiwygPlugin::HTML2TML::Node::_LIST('TWiki::Plugins::WysiwygPlug
in::HTML2TML::Node=HASH(0x960ff4c)', 16) called at /var/www/servers/twiki/lib/TWiki/Plugins/WysiwygPlugin/HTML2TML/Node.pm line 1173, referer:
https://my.network.server/twiki/bin/edit/History/?onlynewtopic=on&topic=HowToMakeChanges&topicparent=WebHome&templatetopic=
[Sun Dec 28 09:35:06 2008] [error] [client 192.168.148.108] \tTWiki::Plugins::WysiwygPlugin::HTML2TML::Node::_handleOL('TWiki::Plugins::Wysiwyg
Plugin::HTML2TML::Node=HASH(0x960ff4c)', 16) called at /var/www/servers/twiki/lib/TWiki/Plugins/WysiwygPlugin/HTML2TML/Node.pm line 453, refere
r: https://my.network.server/twiki/bin/edit/History/?onlynewtopic=on&topic=HowToMakeChanges&topicparent=WebHome&templatetopic=
[Sun Dec 28 09:35:06 2008] [error] [client 192.168.148.108] \tTWiki::Plugins::WysiwygPlugin::HTML2TML::Node::generate('TWiki::Plugins::WysiwygP
lugin::HTML2TML::Node=HASH(0x960ff4c)', 16) called at /var/www/servers/twiki/lib/TWiki/Plugins/WysiwygPlugin/HTML2TML/Node.pm line 486, referer
: https://my.network.server/twiki/bin/edit/History/?onlynewtopic=on&topic=HowToMakeChanges&topicparent=WebHome&templatetopic=
[Sun Dec 28 09:35:06 2008] [error] [client 192.168.148.108] \tTWiki::Plugins::WysiwygPlugin::HTML2TML::Node::_flatten('TWiki::Plugins::WysiwygP
lugin::HTML2TML::Node=HASH(0x9522664)', 16) called at /var/www/servers/twiki/lib/TWiki/Plugins/WysiwygPlugin/HTML2TML/Node.pm line 460, referer
: https://my.network.server/twiki/bin/edit/History/?onlynewtopic=on&topic=HowToMakeChanges&topicparent=WebHome&templatetopic=
[Sun Dec 28 09:35:06 2008] [error] [client 192.168.148.108] \tTWiki::Plugins::WysiwygPlugin::HTML2TML::Node::generate('TWiki::Plugins::WysiwygP
lugin::HTML2TML::Node=HASH(0x9522664)', 16) called at /var/www/servers/twiki/lib/TWiki/Plugins/WysiwygPlugin/HTML2TML/Node.pm line 227, referer
: https://my.network.server/twiki/bin/edit/History/?onlynewtopic=on&topic=HowToMakeChanges&topicparent=WebHome&templatetopic=
[Sun Dec 28 09:35:06 2008] [error] [client 192.168.148.108] \tTWiki::Plugins::WysiwygPlugin::HTML2TML::Node::rootGenerate('TWiki::Plugins::Wysi
wygPlugin::HTML2TML::Node=HASH(0x9522664)', 16) called at /var/www/servers/twiki/lib/TWiki/Plugins/WysiwygPlugin/HTML2TML.pm line 126, referer:
 https://my.network.server/twiki/bin/edit/History/?onlynewtopic=on&topic=HowToMakeChanges&topicparent=WebHome&templatetopic=
[Sun Dec 28 09:35:06 2008] [error] [client 192.168.148.108] \tTWiki::Plugins::WysiwygPlugin::HTML2TML::convert('TWiki::Plugins::WysiwygPlugin::
HTML2TML=HASH(0x90faf70)', '<h1>How to Make Changes to this Web&nbsp;</h1><p>%TOC%</p><p>...', 'HASH(0x955ddf4)') called at /var/www/servers/tw
iki/lib/TWiki/Plugins/WysiwygPlugin.pm line 228, referer: https://my.network.server/twiki/bin/edit/History/?onlynewtopic=on&topic=HowToMakeChanges&
topicparent=WebHome&templatetopic=
[Sun Dec 28 09:35:06 2008] [error] [client 192.168.148.108] \tTWiki::Plugins::WysiwygPlugin::TranslateHTML2TML('<h1>How to Make Changes to this
 Web&nbsp;</h1><p>%TOC%</p><p>...', 'HowToMakeChanges', 'History') called at /var/www/servers/twiki/lib/TWiki/Plugins/WysiwygPlugin.pm line 196
, referer: https://my.network.server/twiki/bin/edit/History/?onlynewtopic=on&topic=HowToMakeChanges&topicparent=WebHome&templatetopic=
[Sun Dec 28 09:35:06 2008] [error] [client 192.168.148.108] \tTWiki::Plugins::WysiwygPlugin::afterEditHandler('<!--WYSIWYG content - do not rem
ove this comment, and never u...', 'HowToMakeChanges', 'History', 'TWiki::Meta=HASH(0x9511e04)') called at /var/www/servers/twiki/lib/TWiki/Plu
gin.pm line 266, referer: https://my.network.server/twiki/bin/edit/History/?onlynewtopic=on&topic=HowToMakeChanges&topicparent=WebHome&templatetopi
c=
[Sun Dec 28 09:35:06 2008] [error] [client 192.168.148.108] \tTWiki::Plugin::invoke('TWiki::Plugin=HASH(0x93fcfd0)', 'afterEditHandler', '<!--W
YSIWYG content - do not remove this comment, and never u...', 'HowToMakeChanges', 'History', 'TWiki::Meta=HASH(0x9511e04)') called at /var/www/
servers/twiki/lib/TWiki/Plugins.pm line 344, referer: https://my.network.server/twiki/bin/edit/History/?onlynewtopic=on&topic=HowToMakeChanges&topi
cparent=WebHome&templatetopic=
[Sun Dec 28 09:35:06 2008] [error] [client 192.168.148.108] \tTWiki::Plugins::_dispatch('TWiki::Plugins=HASH(0x8de0370)', 'afterEditHandler', '
<!--WYSIWYG content - do not remove this comment, and never u...', 'HowToMakeChanges', 'History', 'TWiki::Meta=HASH(0x9511e04)') called at /var
/www/servers/twiki/lib/TWiki/Plugins.pm line 647, referer: https://my.network.server/twiki/bin/edit/History/?onlynewtopic=on&topic=HowToMakeChanges
&topicparent=WebHome&templatetopic=
[Sun Dec 28 09:35:06 2008] [error] [client 192.168.148.108] \tTWiki::Plugins::afterEditHandler('TWiki::Plugins=HASH(0x8de0370)', '<!--WYSIWYG c
ontent - do not remove this comment, and never u...', 'HowToMakeChanges', 'History', 'TWiki::Meta=HASH(0x9511e04)') called at /var/www/servers/
twiki/lib/TWiki/UI/Save.pm line 542, referer: https://my.network.server/twiki/bin/edit/History/?onlynewtopic=on&topic=HowToMakeChanges&topicparent=
WebHome&templatetopic=
[Sun Dec 28 09:35:06 2008] [error] [client 192.168.148.108] \tTWiki::UI::Save::save('TWiki=HASH(0x8a8c990)') called at /var/www/servers/twiki/l
ib/TWiki/UI.pm line 159, referer: https://my.network.server/twiki/bin/edit/History/?onlynewtopic=on&topic=HowToMakeChanges&topicparent=WebHome&temp
latetopic=
[Sun Dec 28 09:35:06 2008] [error] [client 192.168.148.108] \tTWiki::UI::__ANON__() called at /usr/lib/perl5/site_perl/5.8.8/Error.pm line 426,
 referer: https://my.network.server/twiki/bin/edit/History/?onlynewtopic=on&topic=HowToMakeChanges&topicparent=WebHome&templatetopic=
[Sun Dec 28 09:35:06 2008] [error] [client 192.168.148.108] \teval {...} called at /usr/lib/perl5/site_perl/5.8.8/Error.pm line 418, referer: h
ttps://my.network.server/twiki/bin/edit/History/?onlynewtopic=on&topic=HowToMakeChanges&topicparent=WebHome&templatetopic=
[Sun Dec 28 09:35:06 2008] [error] [client 192.168.148.108] \tError::subs::try('CODE(0x8a8c93c)', 'HASH(0x9511c0c)') called at /var/www/servers
/twiki/lib/TWiki/UI.pm line 197, referer: https://my.network.server/twiki/bin/edit/History/?onlynewtopic=on&topic=HowToMakeChanges&topicparent=WebH
ome&templatetopic=
[Sun Dec 28 09:35:06 2008] [error] [client 192.168.148.108] \tTWiki::UI::run('CODE(0x8d7e8e8)', 'save', 1) called at /var/www/servers/twiki/bin
/save line 32., referer: https://my.network.server/twiki/bin/edit/History/?onlynewtopic=on&topic=HowToMakeChanges&topicparent=WebHome&templatetopic
=

Timothe

I assume this is with the current TWiki 4.2.4 code.

I recognize the problem.

Let me guess that you edited using Firefox.

And when you saved the last line was a bullet with no text - just the bullet.

That creates a crash.

And that bug is fixed in the new Foswiki 1.0.0. See Foswikitask:Item6041

Kenneth,

TWiki 4.2.3 (as indicated).

Edited with Internet Explorer 7. Yes, the last line was a bullet with no text.

But I subsequently got another crash with identical footprint (same document) where the last line wasn't an open bullet. The only way to fix that (and save my work) was to stick a "last if blessed($grandkid)" in the loop. Obviously not a real fix. The odd thing is that these don't reproduce after saving.

I'll look at your fix - thanks.

OK, that's a huge checkin, mostly renaming TWiki to foswiki. For the benefit of anyone else, the relevant part seems to be just this: part of changeset 1043, lines 619 - 643. Only two real lines change; the block is bracketed by if ($grandkid) and indented.

I've backported that to what I'm running. Since, like you, I had no clean reproducer, we'll have to see if this recurrs with the patch.

Thanks again for the quick help.

I submitted a patch to the TWiki team with just that change in it; however they don't seem to have opened a problem report. Sounds like you identified the change correctly, though.

-- CrawfordCurrie - 30 Dec 2008

Since this report is against 4.2.3 and the reported crash is long since fixed in Foswiki, I'm closing it.

ItemTemplate edit

Summary WYSIWYG Crash
ReportedBy TimotheLitt
Codebase
SVN Range TWiki-4.2.3, Wed, 06 Aug 2008, build 17396
AppliesTo Engine
Component WysiwygPlugin
Priority Urgent
CurrentState Closed
WaitingFor
Checkins
ReleasedIn
Topic revision: r5 - 03 Jan 2009, CrawfordCurrie
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy