Another Nasty PIE Bug Found

http://www.smartphonemag.com/forum/topic.asp?TOPIC_ID=19763

Unfortunately, Internet Explorer (IE for short) has always been the biggest CSS StyleSheet development headache, especially the Pocket version, Pocket Internet Explorer (PIE for short). While the desktop version of IE doesn't crash upon encountering any kind of CSS/markup/layout combinations, the pocket version does. Upon a Pocket PC user complaint here at the PPCMag forum, I've spent some hours on throroughly scrutinizing the BBC World Service homepage to find out what causes PIE to crash on both WM2003 and WM2003SE devices, independent of the layout mode ("Fit to Screen" in WM2003 / "One Comumn/Default/Desktop" in WM2003SE) and whether images are allowed or not. Note that the PIE in PPC2k2 does not crash upon enocountering problematic pages – I've tested – and, according to PPCMag Forum Administrator David Hettel, they work on WM5 devices too. The Explanation for the Problem Whenever PIE encounters a Web page that doesn't display anything before displaying two elements with styletags 'float' and 'width' attributes defined next to each other (that is, without anything in between – not any kind of other tags, no text, not even a non-breakable space (&nbsp;) ) and one of the HTML elements is an ordered or an unordered list (<ol> or <ul> tags) then, PIE will just crash & immediately exit. A Very Simple Example of a Problematic Web Page <head> <style type="text/css"> div#ift-logo { float:right; width:2px; } div#ift-tabs { float:right; width:2px; } </style> </head> <body> <div id=ift-logo><IMG src="PPCMagJudge.gif"></DIV> <div id=ift-tabs> <ol> <LI>sometext 1</LI> <LI>sometext 2</LI> </ol> </DIV> </body> This page is also accessible online here - try loading it in both your desktop IE and PIE to see that the latter indeed crashes. (The page is rendered by the desktop IE as can be seen here.) As can be seen, there're two styled tags: ift-tabs and ift-logo. Both have both the 'float' and 'width' attributes defined (their values can be anything – any number of pixel or any floating direction; I've tested all combinations.) In the webpage, first, the image is rendered (ift-logo) before rendering anything else, and, then, the ordered list (ift-tabs), without rendering anything else in between. This will crash PIE. If you render anything else either before the image and the list tags (see this page) or in between them (see this page), PIE won't crash any more. Of course, it must be noted that an additional, say, &nbsp; will shift down the other elements with one; also, a &nbsp; at the start of the page will do the same but with the entire contents of the page. With most page layouts, however, this won't cause problems. Note that if you remove the <ol>...</ol> (or <ul>...</ul>) pair, the markup will be rendered OK on the desktop (assuming you're OK with the default, that is, unordered lists) and PIE won't crash any more. However, no bullets will be rendered by PIE (that is, you must use the external <ol>...</ol> (or <ul>...</ul>) tag pairs). You may want to see this in effect by following this link. What Should Be Done?
  1. Web Authors: beware of the above problems; try do create a page layout that doesn't start with element combos with specified float and width parameters without displaying anything else (even a &nbsp;) before - or, in between.
  2. Pocket PC users running into problematic pages like that of BBC: use an online content ripper/compresser service like MobileLeap to strip the offending CSS content/reformat the page. Please read my roundup linked from this blog entry on these services.
  3. Use alternative Web browsers. For example, NetFront 3.3 TP 1.02 renders these pages without problems: click for a screenshot.
Please note that this is not the first bug of Windows Mobile I've found. You may want to read, for example, this bug report on Pocket Word (alternatives: iPAQ HQ, AximSite, PPC Magazine, FirstLoox, BrightHand), which, in between, has been officially filed into the bug database by Microsoft, based on my bug report. Discussions of this Blog Entry AximSite EDIT at 17:56 GMT, the same day: iPAQ HQ and FirstLoox forum members told me BBC World Service works with Spb Pocket Plus and other PIE plug-ins. That's indeed true - or, at least, to a certain degree. The browser indeed isn't shut down but nothing else than the first image is rendered - see for example this BBC screenshot with MultiIE (an iPAQ 2210 alternative here with ftxPBrowser), at least on my, freshly hard reset test Pocket PC's. The same stands for the first (the one that crashes PIE) test page I've created - no text is rendered on it either, only the first image (give them a try!). Some users have reported the BBC World Service to be working on their devices flawlessly (see the linked threads), with text too. Strange. What are YOUR experiences? Please let us know. The reason for this - as opposed to running PIE without any PIE plug-in - may be the fact that PIE plug-ins load PIE from themselves. That is, when you start PIE with an active plug-in, it's the plug-in that is executed first and it loads PIE. (The same stands for ftxPBrowser ; it, however, must be manually started, instead of PIE.) Maybe this fact (the different "spawner" process) is the reason for PIE's not crashing when a PIE plug-in is active. All in all, this means some PIE crashing can be avoided if you use a PIE plug-in. MultiIE, Spb Pocket Plus and ftxPBrowser will all make PIE not crash (and, probably, PIEPlus too – I haven't checked it). Still, the browser may not render anything at all. Please see this blog entry on these extenders (the blog entry discusses ftxPBrowser, but also links the Bible of Pocket PC Web Browsers. It's the latter that contains everything you need to know about Pocket PC web browsing.)
Syndicate content