Re: Qt assertion when trying to view "Hangul Syllables" in special character insertion
On Sat, Dec 03, 2016 at 10:51:56PM -0700, Joel Kulesza wrote: > In general, I've had some difficulty getting Korean to work well. There > seem to have been several issues lately with Arabic, Hebrew, and Korean. > Would there be value in providing an additional Help menu addressing some > of the various language issues and ways to overcome them (recommended > encodings, tips-and-tricks, etc.)? That might be better in a Wiki page. Indeed we have some Wiki pages for simliar purposes. But perhaps you're suggesting that's not as accessible to the user as the Help menu. > One problem I see in this is rendering: > the user would need the various language packages installed. Agreed. I think there are so many different situations (#OS * #TeX distributions * #languages) that I think the Wiki pages are best. We often try to link to the Wiki pages from the .lyx files. Scott signature.asc Description: PGP signature
Re: Qt assertion when trying to view "Hangul Syllables" in special character insertion
On Sat, Dec 3, 2016 at 8:53 PM, Scott Kostyshak wrote: > > Indeed. I've seen that mentioned a few places but never tested it. > I wonder if we should mention this in the GuiSymbols dialog? In general, I've had some difficulty getting Korean to work well. There seem to have been several issues lately with Arabic, Hebrew, and Korean. Would there be value in providing an additional Help menu addressing some of the various language issues and ways to overcome them (recommended encodings, tips-and-tricks, etc.)? One problem I see in this is rendering: the user would need the various language packages installed.
Re: Qt assertion when trying to view "Hangul Syllables" in special character insertion
On Sun, Dec 04, 2016 at 03:27:42AM +0100, Kornel Benko wrote: > I can see them. You probably have to use different input encoding (here utf8). Indeed. I've seen that mentioned a few places but never tested it. I wonder if we should mention this in the GuiSymbols dialog? Scott signature.asc Description: PGP signature
Re: Qt assertion when trying to view "Hangul Syllables" in special character insertion
Am Samstag, 3. Dezember 2016 um 21:10:54, schrieb Scott Kostyshak > On Sat, Dec 03, 2016 at 11:40:49PM +0100, Guillaume Munch wrote: > > Le 02/12/2016 à 08:03, Scott Kostyshak a écrit : > > > On Sat, Nov 19, 2016 at 12:41:13AM +0100, Guillaume Munch wrote: > > > > > > > I cannot reproduce with the provided info (2.3dev & Qt5). > > > > > > A bisect led to b3bed292. The attached patch fixes it for me, although I > > > don't understand my patch. > > > > Hello Scott, > > > > Nothing too complicated really. An update to lib/unicodesymbols had > > introduced characters outside LyX's known blocks (specifically ꜜ and ꜛ > > in "Modifier Tone Letters"). Then another bug in the char->block > > assignment placed these characters in the next known block, "Hangul > > Syllables", so GuiSymbols thought the encoding had Hangul Syllables. But > > when you asked for Hangul Syllables, the block->chars assignment did its > > job correctly and said there were actually none. So GuiSymbols tried to > > initialize a 0-size model for Hangul Syllables. At this point, the > > assumption 0 <= symbols.size()-1 is indeed wrong (though it does not > > cause the bad access by itself). Your particular bug was fixed by > > correcting the char->block assignment. However there were other means to > > trigger symbols.size()==0, e.g. when the encoding changes by moving the > > cursor, a third issue. There was also an unrelated bad access when > > trying to show the tooltip after the end of the list. These bugs are now > > fixed, except for the missing names and ranges of the new blocks. > > > > > What was the point of subtracting 1 from > > > symbols.size()? > > > > > > > This is according to the documentation: > > https://doc.qt.io/qt-5/qabstractitemmodel.html#beginInsertRows > > Inserting from 0 to n informs the view that n+1 lines are inserted. But, > > its place is after endResetModel. > > Thanks a lot for your explanation! That helps me understand things much > better. > > I tested master and the problem is fixed (Hangul Syllables no longer > shows up, which I think is expected since it is empty). I scrolled > through all the symbols and everything is smooth. Thank you for your > fixes. I can see them. You probably have to use different input encoding (here utf8). > Scott Kornel signature.asc Description: This is a digitally signed message part.
Re: Qt assertion when trying to view "Hangul Syllables" in special character insertion
On Sat, Dec 03, 2016 at 11:40:49PM +0100, Guillaume Munch wrote: > Le 02/12/2016 à 08:03, Scott Kostyshak a écrit : > > On Sat, Nov 19, 2016 at 12:41:13AM +0100, Guillaume Munch wrote: > > > > > I cannot reproduce with the provided info (2.3dev & Qt5). > > > > A bisect led to b3bed292. The attached patch fixes it for me, although I > > don't understand my patch. > > Hello Scott, > > Nothing too complicated really. An update to lib/unicodesymbols had > introduced characters outside LyX's known blocks (specifically ꜜ and ꜛ > in "Modifier Tone Letters"). Then another bug in the char->block > assignment placed these characters in the next known block, "Hangul > Syllables", so GuiSymbols thought the encoding had Hangul Syllables. But > when you asked for Hangul Syllables, the block->chars assignment did its > job correctly and said there were actually none. So GuiSymbols tried to > initialize a 0-size model for Hangul Syllables. At this point, the > assumption 0 <= symbols.size()-1 is indeed wrong (though it does not > cause the bad access by itself). Your particular bug was fixed by > correcting the char->block assignment. However there were other means to > trigger symbols.size()==0, e.g. when the encoding changes by moving the > cursor, a third issue. There was also an unrelated bad access when > trying to show the tooltip after the end of the list. These bugs are now > fixed, except for the missing names and ranges of the new blocks. > > > What was the point of subtracting 1 from > > symbols.size()? > > > > This is according to the documentation: > https://doc.qt.io/qt-5/qabstractitemmodel.html#beginInsertRows > Inserting from 0 to n informs the view that n+1 lines are inserted. But, > its place is after endResetModel. Thanks a lot for your explanation! That helps me understand things much better. I tested master and the problem is fixed (Hangul Syllables no longer shows up, which I think is expected since it is empty). I scrolled through all the symbols and everything is smooth. Thank you for your fixes. Scott signature.asc Description: PGP signature
Re: Qt assertion when trying to view "Hangul Syllables" in special character insertion
Le 02/12/2016 à 08:03, Scott Kostyshak a écrit : On Sat, Nov 19, 2016 at 12:41:13AM +0100, Guillaume Munch wrote: I cannot reproduce with the provided info (2.3dev & Qt5). A bisect led to b3bed292. The attached patch fixes it for me, although I don't understand my patch. Hello Scott, Nothing too complicated really. An update to lib/unicodesymbols had introduced characters outside LyX's known blocks (specifically ꜜ and ꜛ in "Modifier Tone Letters"). Then another bug in the char->block assignment placed these characters in the next known block, "Hangul Syllables", so GuiSymbols thought the encoding had Hangul Syllables. But when you asked for Hangul Syllables, the block->chars assignment did its job correctly and said there were actually none. So GuiSymbols tried to initialize a 0-size model for Hangul Syllables. At this point, the assumption 0 <= symbols.size()-1 is indeed wrong (though it does not cause the bad access by itself). Your particular bug was fixed by correcting the char->block assignment. However there were other means to trigger symbols.size()==0, e.g. when the encoding changes by moving the cursor, a third issue. There was also an unrelated bad access when trying to show the tooltip after the end of the list. These bugs are now fixed, except for the missing names and ranges of the new blocks. What was the point of subtracting 1 from symbols.size()? This is according to the documentation: https://doc.qt.io/qt-5/qabstractitemmodel.html#beginInsertRows Inserting from 0 to n informs the view that n+1 lines are inserted. But, its place is after endResetModel. Guillaume
Re: Qt assertion when trying to view "Hangul Syllables" in special character insertion
On Sat, Nov 19, 2016 at 12:41:13AM +0100, Guillaume Munch wrote: > I cannot reproduce with the provided info (2.3dev & Qt5). A bisect led to b3bed292. The attached patch fixes it for me, although I don't understand my patch. What was the point of subtracting 1 from symbols.size()? Scott diff --git a/src/frontends/qt4/GuiSymbols.cpp b/src/frontends/qt4/GuiSymbols.cpp index a08d7e5..287dc12 100644 --- a/src/frontends/qt4/GuiSymbols.cpp +++ b/src/frontends/qt4/GuiSymbols.cpp @@ -246,7 +246,7 @@ public: void setSymbols(QList const & symbols) { beginResetModel(); - beginInsertRows(QModelIndex(), 0, symbols.size() - 1); + beginInsertRows(QModelIndex(), 0, symbols.size()); symbols_ = symbols; endInsertRows(); endResetModel(); signature.asc Description: PGP signature
Re: Qt assertion when trying to view "Hangul Syllables" in special character insertion
Le 19/11/2016 à 00:16, Richard Heck a écrit : On 11/18/2016 04:01 PM, Scott Kostyshak wrote: If I go to Insert > Special Character > Symbols... and then go to "Hangul Syllables", I get an assertion. On Qt 5 with custom-compiled Qt: ASSERT: "last >= first" in file /usr/src/qt/qt5/qtbase/src/corelib/itemmodels/qabstractitemmodel.cpp, line 2604 With Qt 4: ASSERT failure in QList::at: "index out of range", file /usr/include/qt4/QtCore/qlist.h, line 469 Can anyone else reproduce? No, not with Qt 4, anyway, though I have no symbols that appear in this case. The symbols that appear there depend on the output encoding. I see all symbols when setting Unicode (XeTeX). Strangely, they do not appear when checking Use non-TeX fonts. I cannot reproduce with the provided info (2.3dev & Qt5).
Re: Qt assertion when trying to view "Hangul Syllables" in special character insertion
Am Freitag, 18. November 2016 um 18:16:06, schrieb Richard Heck > On 11/18/2016 04:01 PM, Scott Kostyshak wrote: > > If I go to Insert > Special Character > Symbols... > > and then go to "Hangul Syllables", I get an assertion. > > > > On Qt 5 with custom-compiled Qt: > > ASSERT: "last >= first" in file > > /usr/src/qt/qt5/qtbase/src/corelib/itemmodels/qabstractitemmodel.cpp, > > line 2604 > > > > With Qt 4: > > ASSERT failure in QList::at: "index out of range", file > > /usr/include/qt4/QtCore/qlist.h, line 469 > > > > Can anyone else reproduce? > > No, not with Qt 4, anyway, though I have no symbols that appear in this > case. > > rh I get ASSERT failure in QList::at: "index out of range", file /usr/BUILD/BuildQt5/5.7/gcc_64/include/QtCore/qlist.h, line 537 Kornel signature.asc Description: This is a digitally signed message part.
Re: Qt assertion when trying to view "Hangul Syllables" in special character insertion
On 11/18/2016 04:01 PM, Scott Kostyshak wrote: > If I go to Insert > Special Character > Symbols... > and then go to "Hangul Syllables", I get an assertion. > > On Qt 5 with custom-compiled Qt: > ASSERT: "last >= first" in file > /usr/src/qt/qt5/qtbase/src/corelib/itemmodels/qabstractitemmodel.cpp, > line 2604 > > With Qt 4: > ASSERT failure in QList::at: "index out of range", file > /usr/include/qt4/QtCore/qlist.h, line 469 > > Can anyone else reproduce? No, not with Qt 4, anyway, though I have no symbols that appear in this case. rh
Qt assertion when trying to view "Hangul Syllables" in special character insertion
If I go to Insert > Special Character > Symbols... and then go to "Hangul Syllables", I get an assertion. On Qt 5 with custom-compiled Qt: ASSERT: "last >= first" in file /usr/src/qt/qt5/qtbase/src/corelib/itemmodels/qabstractitemmodel.cpp, line 2604 With Qt 4: ASSERT failure in QList::at: "index out of range", file /usr/include/qt4/QtCore/qlist.h, line 469 Can anyone else reproduce? Scott signature.asc Description: PGP signature