Closed Bug 566169 Opened 14 years ago Closed 14 years ago

Pasting certain URLs into the location bar creates ignored runloop exceptions, which can break autocomplete

Categories

(Camino Graveyard :: Location Bar & Autocomplete, defect)

All
macOS
defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED
Camino2.1

People

(Reporter: alqahira, Assigned: stuart.morgan+bugzilla)

References

()

Details

Attachments

(1 file)

I've seen these "ignored exceptions" before (e.g., bug 548476 comment 3), but tonight I actually hit 1) a reproducible case and 2) at least in my daily-use build, it killed autocomplete.

STR:

1) Paste file:///var/folders/1H/1HobDALdF4ywYA9pUrIKP++++TI/-Tmp-/namebench_2010-05-15_2203.html into the location bar

AR: Console logs

Camino[21121]: *** NSRunLoop ignoring exception 'Can't do regex matching, reason: (Can't open pattern U_REGEX_RULE_SYNTAX (string http://tinderbox.mozilla.org/showbuilds.cgi?tree=Camino, pattern .*file:///var/folders/1H/1HobDALdF4ywYA9pUrIKP++++TI/-Tmp-/namebench_2010-05-15_2203.html.*, case 1, canon 2))' that raised during posting of delayed perform with target 0x24d97e80 and selector 'processNextSearchChunk'

and autocomplete no longer functions.

ER: No ignored exception, autocomplete continues to work.

Note that "string" there is the last URL loaded before pasting.

I haven't yet been able to reproduce killing autocomplete (just the exception), but exceptions are bad ;)
Flags: camino2.1?
This falls into the category of "things I should have caught in review". I think I even suggested some of the regex syntax :( It'll be an easy fix unless the regex syntax isn't what it sounds like it is.
Assignee: nobody → stuart.morgan+bugzilla
Sadly, NSPredicate doesn't appear to honor \Q \E as it should, so I had to do it manually. This is the list of special characters from the ICU docs, so it should be complete.
Attachment #445622 - Flags: superreview?(mikepinkerton)
Comment on attachment 445622 [details] [diff] [review]
Escape search strings for regex use

+  for (unsigned int i = 0; i < [specialCharacters count]; ++i) {
+    NSString* specialCharacter = [specialCharacters objectAtIndex:i];

can you use fast enumeration here?

sr=pink
Attachment #445622 - Flags: superreview?(mikepinkerton) → superreview+
(In reply to comment #4)
> can you use fast enumeration here?

Just as soon as we drop 10.4 support (so, Gecko 1.9.3), yes ;)
Landed: 3101:131c1bd3e42b
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Landed on CVS trunk.
Flags: camino2.1? → camino2.1+
Target Milestone: --- → Camino2.1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: