![]() |
#151 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,525
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
@KevinH: if I'm reading things right, there is no current html resource being passed to the select_text dialog (SelectTarget() in Dalogs/EditTOC.cpp), thus m_CurrentHTMLResource is null in Dialogs/SetHyperlinks.cpp. This causes the crash in SetHyperlinks::SetList() somewhere in the foreach loop.. I can test for a null m_CurrentHTMLResource and prevent the crash, but then no targets from the epub are added to the resulting select dialog.
In other words: I think Dialogs/SetHyperlinks.cpp doesn't know what the current html resource IS, but it's still trying to use it. Last edited by DiapDealer; 11-16-2019 at 09:30 AM. |
![]() |
![]() |
![]() |
#152 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,704
Karma: 5703586
Join Date: Nov 2009
Device: many
|
probably some I broke somehow. I will try to recreate this and get a backtrace? Does this happen on linux as well?
|
![]() |
![]() |
Advert | |
|
![]() |
#153 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,704
Karma: 5703586
Join Date: Nov 2009
Device: many
|
Actually passing NULL is not from me! I checked the history on that file and it has been like that from before 2015.
How on earth has this bug not existed since the beginning of Sigil? |
![]() |
![]() |
![]() |
#154 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,723
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
|
|
![]() |
![]() |
![]() |
#155 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,525
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Wow! That is odd. I guess I don't know for a fact that the bug HASN'T been around that long. Most people don't manually edit the toc. And if they do, they're probably more likely to do so by editing the NCX (and now NAV) directly. The few times I've used the EditToC dialog, I manually entered the targets (double-click the treeview entry) instead of looking them up via Select Target.
|
![]() |
![]() |
Advert | |
|
![]() |
#156 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,723
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
|
|
![]() |
![]() |
![]() |
#157 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,525
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
That's about when we left Qt5.11 behind (0.9.15 was the prelease for QtWebEngine/Qt5.12). I'm guessing it was a change in behavior in Qt5.12.
Either way: m_CurrentHTMLResource in Dialogs/SelectHyperlink.cpp has been NULL since time began and the feature still worked. So it (m_CurrentHTMLResource) seemed to have no bearing on the conditionals it was being used in back when it WAS still working. That's crazy. Basically, the list of resources being passed to Dialogs/SelectHyperlink.cpp was used (which included the current resource as well), while the null resource seemed to be ignored altogether. The gist of the logic to my eyes, was to add the targets from the currently selected item first, and then the rest of targets from the book. So all the targets were still present, there was simply no prioritizing of the list going on. Last edited by DiapDealer; 11-16-2019 at 11:20 AM. |
![]() |
![]() |
![]() |
#158 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,704
Karma: 5703586
Join Date: Nov 2009
Device: many
|
EditTOC and InsertHyperLinks code are really at odds with each other. In MainWindow, The Hyperlinks code is used to create a link from one htmlresource to another resource and it works just fine. It is designed to return links relative to the starting location.
The TOC entries no longer uses relative hrefs and instead use bookpaths that are independent of starting location to indicate a target. I am going to have to make some changes to both pieces to get this to work. This is going to be a bit of a pain! Kevin |
![]() |
![]() |
![]() |
#159 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,525
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
If that's the case, we should be able to skip attempting to add the currently selected resource's targets first, and then ditch the tests designed to make sure the currently selected resource's targets haven't been already processed. That should leave us with the functionality we've always had--minus the new crashing behavior.
EDIT: Never mind. I didn't realize SelectHyperlinks was being used elsewhere. Last edited by DiapDealer; 11-16-2019 at 11:28 AM. |
![]() |
![]() |
![]() |
#160 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,704
Karma: 5703586
Join Date: Nov 2009
Device: many
|
This should now be fixed in master. I had to synchronize the usage of SelectHyperLinks from two places and post convert to bookpaths for EditToc.
Hopefully we are now good to go. |
![]() |
![]() |
![]() |
#161 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,723
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
D. |
|
![]() |
![]() |
![]() |
#162 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,525
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
The default value in SelectHyperlinks seems to includes some extra prefixing (OEBPS on an epub with the Sigil standard structure) that can show an incorrect href in EditTOC if the OK button is hit. Look likes it's entirely cosmetic though. The correct link/href seems to be added to the ncx regardless.
Last edited by DiapDealer; 11-16-2019 at 01:24 PM. |
![]() |
![]() |
![]() |
#163 | ||
Wannabe Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 426
Karma: 2516674
Join Date: Apr 2011
Location: Geelong, Australia
Device: Kobo Libra 2, Kobo Aura 2, Sony PRS-T1, Sony PRS-350, Palm TX
|
Quote:
Quote:
I think I've added a TOC entry recently, since the Qt5.12 switch, but I can't be totally sure. |
||
![]() |
![]() |
![]() |
#164 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,704
Karma: 5703586
Join Date: Nov 2009
Device: many
|
Yes, EditToc now uses full bookpaths. I will have to modify the href on the way into SelectHyperlinks just like I had to convert to bookpaths on the way in.
|
![]() |
![]() |
![]() |
#165 | |
Wannabe Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 426
Karma: 2516674
Join Date: Apr 2011
Location: Geelong, Australia
Device: Kobo Libra 2, Kobo Aura 2, Sony PRS-T1, Sony PRS-350, Palm TX
|
Quote:
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
5.8.11 Pre=release | knc1 | Kindle Developer's Corner | 21 | 04-17-2018 08:42 PM |
Overdrive - Search for Pre-Release | nynaevelan | General Discussions | 11 | 11-24-2013 02:27 PM |
Where are the pre-release purchase buttons? | Sydney's Mom | General Discussions | 8 | 09-06-2012 10:57 PM |
KF Android 4.0 Pre-Release Version | robertc88 | Kindle Fire | 22 | 01-22-2012 07:24 PM |
PDF Viewer 0.3.0 pre-release | pruss | Android Devices | 62 | 11-22-2011 11:18 AM |