Ticket #999 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

Crash on adding new word to dictionary

Reported by: Madarb Owned by: Plorkyeran
Priority: high Milestone: 2.1.8
Component: General Version: devel
Severity: block Keywords: dictionary add word
Cc: Platform: Windows
Sub Component:

Description (last modified by verm) (diff)

Aegisub produces a crash when I try to add a specific word to the dictionary. The word is Führer and I suppose the problem is met because of the "ü" character, because Aegisub never failed adding new words under any other circumstances.

Version is r3177M (development version, TheFluff).

Attachments

crashlog.txt Download (4.5 KB) - added by Madarb 2 years ago.
el-gr dictionaries.zip Download (1.3 MB) - added by Madarb 2 years ago.
Requested greek dictionaries
el_GR_utf-8.zip Download (1.8 MB) - added by Plorkyeran 2 years ago.

Change History

Changed 2 years ago by Madarb

comment:1 Changed 2 years ago by TheFluff

  • Status changed from new to infoneeded_new

Works here with r3542 on Windows XP, US English dictionary. What language are you trying to add it to?

comment:2 Changed 2 years ago by Madarb

Greek.
Just tried it on the stable 2.1.7 [3131] and it does the same.
Reproduce steps:

1.Open subtitle file with the faulty word.
2.Click the spell checker.
3.Find the highlighted word, and select "Add to Dictionary".
4.Kaboom.

comment:3 Changed 2 years ago by verm

  • Status changed from infoneeded_new to new
  • Milestone set to 2.2.0

comment:4 Changed 2 years ago by verm

  • Description modified (diff)
  • Milestone changed from 2.2.0 to 2.1.8

We've got so many languages now it's probably best we have this fixed for 2.1.8.

Changed 2 years ago by Madarb

Requested greek dictionaries

comment:5 Changed 2 years ago by verm

  • Priority changed from normal to high
  • Severity changed from minor to block

I can confirm this is defiantly broken in more ways than one.

  • The 'Add XXX to dictionary' menu item is never highlighted
  • Adding the word via 'SpellCheck this script' -> add word crashes aegisub.

I converted the dictionaries from ISO-8859-7 to UTF-8 and deleted my personal dictionary before testing.

comment:6 Changed 2 years ago by Plorkyeran

Cannot reproduce. Steps followed:

  1. Deleted AppData/Aegisub
  2. Installed fresh copy of 2.1.7
  3. Added Greek dictionary to AppData/Aegisub/dictionaries
  4. Attempted to add Führer; menu item was correctly greyed out
  5. Converted Greek dictionary to UTF-8 with iconv
  6. Successfully added Führer via the context menu

comment:7 Changed 2 years ago by Plorkyeran

Also works correctly for me on XP with the non-unicode locale set to Greek.

comment:8 Changed 2 years ago by Madarb

Um, I wasn't aware of any converting that needed take place. :/
Does this work via SpellChecker too?

Don't know if it matters, I only tried it under Vista here...

comment:9 Changed 2 years ago by Plorkyeran

ü doesn't exist in ISO-8859-7, so it's impossible to store the word Führer without converting the dictionary to a charset that does have both ü and Greek letters. I'll attach the UTF-8 version of the Greek dictionary, which may fix your problem.

There's a two ways I can think of to resolve this:

  1. Instead of simply not allowing invalid words, ask the user if they want to convert their dictionaries to UTF-8 (i.e. ask the user a question they probably won't know the answer to).
  2. Always save Aegisub-generated dictionary files as UTF-8 and modify the spellchecker code to handle different loaded dictionary files having different character sets.

Neither of these seem reasonable for 2.1.8.

I suspect the actual crash is something similar to #1108 and #867.

Changed 2 years ago by Plorkyeran

comment:10 Changed 2 years ago by verm

Interesting it does work for me now I must have made a mistake last night and didn't realise.

Now we're onto the next problem: refusing to load a dictionary if it's not UTF-8.

comment:11 Changed 2 years ago by plorkyeran

(In [3994]) Disable the "Add to dictionary" button in the spell checker dialog when the word cannot be added to the dictionary. Updates #999.

comment:12 Changed 2 years ago by plorkyeran

  • Owner set to Plorkyeran
  • Status changed from new to closed
  • Resolution set to fixed

(In [3995]) Merge r3994 from the 2.1.8 branch. Closes #999.

Note: See TracTickets for help on using tickets.