SAXParseException

40 views
Skip to first unread message

Andy Burnett

unread,
Sep 20, 2011, 8:41:22 PM9/20/11
to OpenQwaq Forum
One of our forums has suddenly stopped letting people in. It loads
about 20% and then throws the following error.

Note
A problem has prevented login
A problem has prevented entry to Exploratorium
SAXParseException XML expected 'Name literal'

I imagine we can fix the problem, but I am really curious about what
sort of user actions might have created the problem. Anyone got any
thoughts?

Cheers
Andy

dsl101

unread,
Sep 21, 2011, 6:46:27 AM9/21/11
to open...@googlegroups.com
Just to add - it looks like it could have been an autosave issue. The previous version (an autosave) exhibits the same problem, but the one before that (also an autosave) doesn't. So at least we can roll back into the not too distant past.

I'll have a go at comparing the c3z's and see if I can pinpoint the source.

Cheers,

Dave

dsl101

unread,
Sep 21, 2011, 7:32:19 AM9/21/11
to open...@googlegroups.com
Well, that was fun :) I eventually tracked the problem down to a single sticky note. Looking at the xml of the island (after unzipping the c3z which was causing the problem), I found that it had a literal ampersand character in it, rather than an encoded one (e.g. '&') - i.e. the contents tag read:

<contents>Bla Bla & Bla</contents>

Changing that single character to a '+' enabled the forum to load successfully again.

So, now I'm more stuck as to how it got in there in the first place. I guess we might have found a gap in the code where strings are not being encoded appropriately? But it must be an edge case - I've tried various ways of creating / editing stickynotes in a test forum, and can't get the same effect...

Happy to test further if anyone can point me in the right direction.

Cheers,

Dave.

dsl101

unread,
Sep 29, 2011, 10:12:56 AM9/29/11
to open...@googlegroups.com
Sorry to bump my own post, but we're continuing to see this error, and having trouble tracking down the source. Because we have several people using the Win32 and Mac versions of the client, and all coming and going at different times, it's very hard to create a test case which reproduces it.

But it seems to occur with stickynotes which are multiple-lines, and have ampersands in them. And it's happened more than once in the same space to the same stickynote (which I've now fixed twice by unzipping, editing island.xml and rezipping).

It must be in the serialisation of the island, but I don't know where the escaping is done when writing out the XML - is it a Squeak object or an OQ object which does that?

Anyway, any pointers gratefully received.

Thanks,

Dave.

Barbara Hohensee

unread,
Sep 29, 2011, 11:36:25 AM9/29/11
to OpenQwaq Forum
Hi Andy,
I don't no if this helps, but I had the same message "A problem has
prevented login " only with a Windows Client in a Virtual Machine. The
Linux Client on the same Computer didn't show it.
cheers
Barbara


On Sep 20, 5:41 pm, Andy Burnett <andy.burn...@knowinnovation.com>
wrote:

Andy Burnett

unread,
Sep 29, 2011, 12:34:51 PM9/29/11
to open...@googlegroups.com
Thanks Barbara,

We are working on tracking this down. Dave Lomas, and I, have narrowed it down to an unescaped & sign, but the problem is tricky to recreate.

Interesting that the Linux computer didn't complain. 

Cheers
Andy

dsl101

unread,
Oct 5, 2011, 7:45:36 AM10/5/11
to open...@googlegroups.com
Finally managed to create a test case - not sure if this is a known issue or not. I have a vague memory of seeing mention of it somewhere, but can't find it in the groups.

Basically, it comes down to Unicode is Not Your Friend. The error can easily be triggered by copying some unicode text from, e.g. Word or another unicode-aware application into a StickyNote. The text needs to contain unicode characters, obviously, and other non-valid XML characters (e.g. '&') to trigger the error.

What seems to happen is that if unicode characters are in the string, it isn't correctly encoded when the XML is written out to the c3z file. In our example, the univode characters were being encoded (although they aren't displayed properly in OQ), but the ampersand isn't encoded. I guess the encoder object is taking a different path if it finds unicode.

I'll put it on the google code page, but I'm happy to have a go at fixing it if someone can tell me which object (fails to) handle the XML encoding... I did try to follow the code through, but got lost :)

Thanks,

David.

dsl101

unread,
Oct 5, 2011, 11:58:23 AM10/5/11
to open...@googlegroups.com
I do feel like I'm talking to myself about this - perhaps it's not tripped anyone else up :)

Anyway, I found the cause of the error and have submitted a change set onto the google code issues page. I presume someone with more knowledge will take a look and see if I got it right?

Cheers,

Dave.
Reply all
Reply to author
Forward
0 new messages