Is the XML Parser in Symbian 9.2 Flawed? (MobileKnox / Safe)
I am the main developer of MobileKnox (formerly known as Safe). One of our customers informed me that MobileKnox's synchronization feature is not working on his Nokia 6120 Classic cell-phone. This was surprising because it worked pretty well for Nokia devices in the past. However, I remembered another incident with a Nokia E90. In this case, a user with basic knowledge about computers was also unable to get synchronization to work. Given this two cases I decided to investigate what went wrong, especially, the two devices are Symbian 9.2-based and I haven't tested MobileKnox on this platform so far. So, the question is: Is it just a configuration problem or even worse is MobileKnox flawed?

Before I start with the analysis of the problem let me quickly explain how MobileKnox works. MobileKnox is a J2ME midlet supposed to run on cell-phones. For synchronization it requires Web Services as defined in JSR 172 to invoke methods on a remote host. Web Services are basically a remote invocation method that define which method to call with which parameters by using XML documents. For this, XML documents are send back and forth between the machine that invokes a remote method and the host that performs the action associated to this method. So, every cell-phone that supports JSR 172 requires a XML parser to interpret the content of such XML documents. MobileKnox uses Web Services to synchronize its data with data stored on a PC. The counterpart of MobileKnox that runs on the PC is called DesktopKnox. The parameters for the remote method invocation that are send back and forth between MobileKnox and DesktopKnox are also XML documents.

The first thing I was looking into was the network traffic transferred between a Nokia 6120 Classic running MobileKnox and a PC running DesktopKox. One of our customers was so kind to provide me with such a traffic file. The analysis of the network traffic hasn't revealed any problems with the data transmitted. The only thing that looked suspicious was that the communication stopped right after a XML document was send as a parameter from DesktopKnox to MobileKnox. My first guess was that the source code that handles this document is buggy. However, this code was completely written in Java which means it should be platform independent. This code worked fine for many cell-phones. So, I looked deeper into the problem but I couldn't learn more from the traffic file. Instead, I needed to get my hands on one of the recently released Symbian 9.2-based cell-phone to debug the application while running. By chance, one of my friends told me that he bought a Nokia E90. This was perfect because he told me that I could borough the phone for some time. As soon as I got the phone I started debugging MobileKnox. The first thing I was looking at was the result the remote method invocation returned. Form a network traffic analysis I run while debugging MobileKnox I know that the return value was valid. Actually, the return value is also a XML document which was well-formed and valid. It looked like this: <?xml version="1.0" encoding="UTF-8" standalone="no"?><SafeCatalog version="2"/>. However, the return value I received from the Web Service started with <xml version="1.0" encoding="UTF-8" standalone="no"> followed by <SafeCatalog version="2"/>. The starter or XML declaration, how it is named in the XML recommendation document, is not valid. It looks like the XML parser that handles the Web Service document is erroneously modifying the payload of the message. The bad thing about this is that this XML parser is part of the operating system which means to solve the problem the cell-phone must be patched. In the meantime, until a patch for the operating system is available and applied on a wide range, applications that are built on top of JSR 172 must be modified to get them work with Symbian 9.2-based devices. This means a workaround must be added to all these applications to handle this bug. For MobileKnox such an workaround could easily be added and since a few days a new version of MobileKnox is available that runs without problems on Symbian 9.2-based devices.

As a next step I will contact Nokia get the bug confirmed. I let you know what they say about this problem.

Best regards,
Thomas

P.S: Symbian 9.2-based devices are for instance Nokia N95, Nokia N82, Nokia E90, Nokia E51, Nokia 6290, and Nokia 6120.
Posted by Thomas King at 11:03 2008-01-15 | Trackbacks (0) | Comments (0)

Submit a comment