Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

[BUG] .toLowerCase() causes uncatchable exception with unicode string on iPhone

var txt = "???";

(your Q/A software has corrupted the text, but dropping any Japanese string in that variable should trigger it)

When executed from the top level in the iPhone simulator, the app crashes with this traceback:

When executed from within a xhr callback, I can't seem to catch the exception. This code in KrollContext.mm is triggered:

                @catch (NSException * e) 
                    // this should never happen as we raise a JS exception inside the 
                    // method above but this is a guard anyway
                    NSLog(@"[ERROR] application raised an exception. %@",e);

May I humbly suggest that if this never happen code can happen, it log in an alert or something else that is visible to the user? It took a lot of back-and-forthing with a beta tester to narrow down this bug, as the code was just suddenly freezing with no catchable exception.

— asked May 9th 2010 by Damien Elmes
  • bug
  • crash
  • exception
  • iphone

0 Answers

The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.