Steve,
By any chance are you using the new version of iui.js that was posted about
here within the past couple of weeks?

I ask because I was trying it out, and a page in my application that was
working now crashes the browser.  The only difference is that mine still
crashed in landscape mode.  I pointed the page back to the old iui.js and it
works.

Chris.

On Feb 8, 2008 12:25 PM, Steve Finkelstein <[EMAIL PROTECTED]> wrote:

>
> Chris,
>
> As soon as you mentioned that it crashes in Portrait mode only -- not
> landscape, that sparked my curiosity. There were certainly CSS
> overflow issues with my list items in the previous version of the code
> I posted. Last names that were too long were overlapping into other
> users cells. I went ahead and modified the font size and set overflow
> properties. I also reduced the size of my select element. I can no
> longer reproduce the crash afterwards.
>
> It's very apparent that the cookies weren't the culprit here. It would
> be nice to see a stack trace or something to be able to pin point the
> exact problem, but it's very possible the CSS was also causing
> distress on the browser.
>
> It seems resolved for now, but I'll be re-creating this bug at a later
> date to figure it out as it's on my nerves at this point that I
> couldn't pin point a line of code and go a-ha, this is the problem!
>
> /sf
>
> On 2/8/08, Steve Finkelstein <[EMAIL PROTECTED]> wrote:
> > Wow. That's an interesting find.
> >
> > I really need to drill down on what the problem is -- I've never been
> > more stumped as the page isn't producing any errors.
> >
> > At least you were able to replicate the crash -- so I'm not insane
> > (and neither are the other 5 iPhones + 1 iTouch I've tried)
> >
> > On 2/8/08, cvd <[EMAIL PROTECTED]> wrote:
> > > Steve,
> > >
> > > I tried it again (sequentially) and did crash.  One thing I noticed is
> that
> > > it does not crash when in landscape mode.  That tells me that it may
> not be
> > > cookie related.
> > >
> > > Chris.
> > >
> > >
> > >  On Feb 7, 2008 9:43 PM, Chris Van Dusen <[EMAIL PROTECTED]>
> wrote:
> > > > Steve,
> > > >
> > > > Ah.  That may be the difference.  I didn't click sequential down the
> > > > list (which is telling).
> > > > I'll give it a try when I get to work tomorrow (where the iPhone
> is),
> > > > and let you know.
> > > >
> > > > Chris.
> > > >
> > > >
> > > >
> > > >
> > > > On Feb 7, 2008, at 8:34 PM, Steve Finkelstein wrote:
> > > >
> > > > >
> > > > > Hi Chris,
> > > > >
> > > > > Thanks for the reply.
> > > > >
> > > > > Unfortunately rebooting the darn thing was my first instinct upon
> > > > > bumping into this annoying bug. I took the initiative to find 5
> > > > > colleagues with an iPhone and one colleague with an iTouch -- I
> was
> > > > > able to replicate the crashing of Safari on all 6 devices.
> > > > >
> > > > > I certainly wish I had the technical details worked out, and could
> > > > > blame it on my cookie code, but I really can't. It might be
> > > > > coincidence that after I added cookie code, that I was able to
> > > > > reproduce this crash.
> > > > >
> > > > > I setup a test page here to further debug, and my browser doesn't
> > > > > crash here: http://catalyst.httpd.org/iphone.html
> > > > >
> > > > > However the URL I provided below is still indeed very consistent
> for
> > > > > crashing. You just need to sequentially click the names starting
> from
> > > > > the first name down to about the 6th or 7th and it'll pop an alert
> > > > > with document.cookie, then crash.
> > > > >
> > > > > Tomorrow I will rewrite the cookie handlers and see if that fixes
> it.
> > > > > I just really hate abandoning the problem because it would be nice
> to
> > > > > know what is consistently crashing mobile safari and if it's
> possible
> > > > > to avoid it in future production.
> > > > >
> > > > > /sf
> > > > >
> > > > > On 2/7/08, Chris Van Dusen <[EMAIL PROTECTED]> wrote:
> > > > >>
> > > > >> This may sound crazy, but have you tried resetting the iPhone(s)?
> > > > >>
> > > > >> I had just deployed some code for the iPhone when 1.1.3 came out.
>  I
> > > > >> updated the phone, but when I went to test the app in production,
> > > > >> images were not displaying, and a search was not working.  The QA
> > > > >> guys updated the iPhone and iPod Touch that they use and didn't
> have
> > > > >> a problem.  After resetting, mine worked fine.
> > > > >>
> > > > >> Regarding your post about clearing cookies:  I've gotten to the
> point
> > > > >> where I would click 'Clear' twice before retesting.  I was
> talking to
> > > > >> one of the aforementioned QA guys and he said that he clears
> cookies,
> > > > >> goes back to Safari opens a new window and removes the one he was
> > > > >> testing with before.   Now, I do that too...
> > > > >>
> > > > >> hth,
> > > > >> Chris.
> > > > >>
> > > > >>
> > > > >> On Feb 7, 2008, at 4:12 PM, Steve Finkelstein wrote:
> > > > >>
> > > > >>>
> > > > >>> Chris,
> > > > >>>
> > > > >>> that's so darn odd. I'm able to replicate it all the time as
> soon
> > > > >>> as I
> > > > >>> hit the 'Leslie' patient. If I go straight down the list
> > > > >>> sequentially
> > > > >>> it consistently crashes on my iPhone. It does on a co-workers as
> > > > >>> well.
> > > > >>> I don't even know where to begin to start debugging.
> > > > >>>
> > > > >>> /sf
> > > > >>>
> > > > >>> On 2/7/08, cvd <[EMAIL PROTECTED]> wrote:
> > > > >>>> I was able to click all patients with no crash on the iPhone.
>  I'm
> > > > >>>> running
> > > > >>>> 1.1.3.
> > > > >>>>
> > > > >>>> Chris.
> > > > >>>>
> > > > >>>>
> > > > >>>> On Feb 7, 2008 1:47 PM, Steve Finkelstein <[EMAIL PROTECTED]>
> wrote:
> > > > >>>>
> > > > >>>>>
> > > > >>>>>
> > > > >>>>> If anyone wishes to try to replicate the crash, you can visit
> a
> > > > >>>>> demo
> > > > >>>>> of the site on http://iphone2.limemedical.com.
> > > > >>>>>
> > > > >>>>> If you click on Patient List via the landing page, click on
> the
> > > > >>>>> first
> > > > >>>>> 7+ patients (obviously they aren't real people)
> > > > >>>>>
> > > > >>>>> Your browser should and will crash (on the iPhone, won't on
> the
> > > > >>>>> desktop)
> > > > >>>>>
> > > > >>>>> There's nothing odd about my code that I can find. I'm having
> an
> > > > >>>>> extremely difficult time finding what's the cause of it
> because of
> > > > >>>>> lack of debugging tools on the iPhone.
> > > > >>>>>
> > > > >>>>>
> > > > >>>>>
> > > > >>>>>
> > > > >>>>>
> > > > >>>>> On 2/6/08, Steve Finkelstein <[EMAIL PROTECTED]> wrote:
> > > > >>>>>> Hey folks,
> > > > >>>>>>
> > > > >>>>>> I've been able to replicate a consistent crash with Mobile
> Safari
> > > > >>>>>> using 1.1.3 firmware. I'm using the cookie class written by
> David
> > > > >>>>>> Flanagan in his highly accredited JavaScript: The Definitive
> > > > >>>>>> Guide,
> > > > >>>>>> code can be found here:
> > > > >>>>>>
> > > > >>>>>>
> > > > >>>>
> > > http://www.davidflanagan.com/javascript5/display.php?n=19-2&f=19/
> > > > >>>> Cookie.js
> > > > >>>>>>
> > > > >>>>>> I believe the code I've appended at the bottom of this email
> > > > >>>>>> is the
> > > > >>>>>> culprit. I basically keep track of visited IDs of an <li>
> > > > >>>>>> element in a
> > > > >>>>>> cookie.  In a nutshell for those who don't feel like reading
> the
> > > > >>>>>> code,
> > > > >>>>>> I create a cookie and set its expiration to 24 hours. In it,
> I
> > > > >>>>>> have a
> > > > >>>>>> cookie named visited_data with a value of something like
> > > > >>>>>>
> > > > >>>>>> visited_data=visited:1|2|3|4
> > > > >>>>>>
> > > > >>>>>> where 1,2,3,4 are the visited IDs.  I have code which can
> > > > >>>>>> arbitrarily
> > > > >>>>>> remove ids and add ids. However, on the iPhone .. and iPhone
> only
> > > > >>>>>> (cannot replicate on Safari3/Webkit).. if I click enough <li>
> > > > >>>>>> elements, about 6+, it crashes the browser.
> > > > >>>>>>
> > > > >>>>>> Does anyone have any idea what could be causing it? Is the
> > > > >>>>>> value of
> > > > >>>>>> the cookie data limited in an iPhone? Is there a more elegant
> > > > >>>>>> approach
> > > > >>>>>> to my solution for storing visited status on multiple
> > > > >>>>>> elements, say
> > > > >>>>>> 100+ ?
> > > > >>>>>>
> > > > >>>>>> Using binary bitmasks has crossed my mind.. but I'm quite
> > > > >>>>>> reluctant at
> > > > >>>>>> the moment in that approach because of readability by other
> > > > >>>>>> developers.
> > > > >>>>>>
> > > > >>>>>> Thanks all.
> > > > >>>>>>
> > > > >>>>>> /sf
> > > > >>>>>>
> > > > >>>>>> code:
> > > > >>>>>>
> > > > >>>>>> function _check_status(obj) {
> > > > >>>>>>
> > > > >>>>>>         var evt = window.event;
> > > > >>>>>>         var el  = evt.srcElement;
> > > > >>>>>>
> > > > >>>>>>         if (el.tagName == "SELECT") return;
> > > > >>>>>>
> > > > >>>>>>         var pid = el.lastChild.id ||
> el.parentNode.lastChild.id;
> > > > >>>>>>
> > > > >>>>>>         // Check if patient has been visited
> > > > >>>>>>         var cookie = new Cookie("visited_data");
> > > > >>>>>>
> > > > >>>>>>         // Check if patient has been visited.
> > > > >>>>>>         if(cookie.visited) {
> > > > >>>>>>                 // check if particular id has been visited.
> > > > >>>>>>
> > > > >>>>>>                         if(!cookie.check(pid)) {
> > > > >>>>>>                                 cookie.visited += "|" + pid;
> > > > >>>>>>                                 cookie.store(1);
> > > > >>>>>>                                 obj.className += " visited";
> > > > >>>>>>
> > > > >>>>>>                         } else {
> > > > >>>>>>                                 var values =
> cookie.visited.split
> > > > >>>>>> ("|");
> > > > >>>>>>                 delete cookie.visited;
> > > > >>>>>>                                 cookie.visited = '';
> > > > >>>>>>
> > > > >>>>>>                                 for(var i=0; i <
> values.length; i
> > > > >>>>>> ++) {
> > > > >>>>>>                         if (values[i] == pid)
> > > > >>>>>>                         continue;
> > > > >>>>>>                     else cookie.visited += "|" + values[i] ;
> > > > >>>>>>                 }
> > > > >>>>>>                                 cookie.visited =
> > > > >>>> cookie.visited.substring(1);
> > > > >>>>>>
> > > > >>>>>>                                 cookie.store(1);
> > > > >>>>>>                                 obj.className = "patients";
> > > > >>>>>>                         }
> > > > >>>>>>
> > > > >>>>>>          } else {
> > > > >>>>>>                         cookie.visited = pid;
> > > > >>>>>>                         cookie.store(1);
> > > > >>>>>>                         // User has NOT been visited, enable
> > > > >>>>>> their
> > > > >>>> visited status.
> > > > >>>>>>                         obj.className += " visited";
> > > > >>>>>>          }
> > > > >>>>>>
> > > > >>>>>> }
> > > > >>>>>>
> > > > >>>>>>>
> > > > >>>>>
> > > > >>>>
> > > > >>>
> > > > >>>>
> > > > >>
> > > > >>
> > > > >>>
> > > > >>
> > > > >
> > > > >
> > > > > > >
> > > >
> > >
> >
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"iPhoneWebDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/iphonewebdev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to