SpellChecker.pvp - infinite loop in some cases  SOLVED

PDF-XChange Editor SDK for Developers

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.

When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
Post Reply
zarkogajic
User
Posts: 1372
Joined: Thu Sep 05, 2019 12:35 pm

SpellChecker.pvp - infinite loop in some cases

Post by zarkogajic »

Hi Support,

This is an extension to this topic: viewtopic.php?f=66&t=34346

I have a strange issue with the SpellChecker plugin. Unfortunately I cannot reproduce in the FullDemo. As per the above mentioned post the FullDemo cannot load new dictionaries while my application can (and I do not know why). Once dictionaries are downloaded - they are also available in the FullDemo. I'm quite sure the problem is not within my code, as explained here:

Here's what happens in my app (I've tried reproducing in FullDemo but no luck so far, or I'm not using correct steps to reproduce):

1. AddPluginFromFile to include SpellChecker.pvp
2. Have some dictionaries
3. Load a document
4. Click "Start" in the Spell Check pane.

Now, strange things start to happen:

1. if *none* of languages are selected

image.png

Some words will be marked in some text box and of course, no action to "ignore" or anything like that. This is not the problem.


2. If some of the languages/dictionaries *are* selected (this is preserved between app startups I guess in the configuration), clicking the Start button will disable it and the Control goes into infinite loop (does not appear as not responding but no other UI elements can be clicked, so must be some other thread is not responsive):

image1.png
image1.png (9.81 KiB) Viewed 1570 times

With a lot of try/fail/test I've figured out the next: if before clicking the Start button I would first display the "Spell Checker Setting" - and simply click Cancel on that dialog - clicking the Start button will now not go into infinite loop.

This proves the problem is not somewhere in my code. I'm not custom handling anything spell checker related.

The *worst* thing (and believe it or not, this is how I've fond this issue): even if the SpellChecker pane is hidden - so, I simply load a document (but having dictionaries and some selected as explained above), just trying to edit some text content will put the control into infinite loop - the same problem as if I'm trying to spell check.





-žarko
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: SpellChecker.pvp - infinite loop in some cases

Post by Sasha - Tracker Dev Team »

Hello zarkogajic,

I've contacted a developer who is responsible for the SpellChecker plugin - he said that he will need a small sample project to recreate this one.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
zarkogajic
User
Posts: 1372
Joined: Thu Sep 05, 2019 12:35 pm

Re: SpellChecker.pvp - infinite loop in some cases

Post by zarkogajic »

Hi Alex,

As said, I cannot reproduce it in the FullDemo :(

A small project - I guess you mean C# coding?

p.s.
Something happens when the "Spell Checker Settings" dialog is called - as after it has been displayed (no action on it) - no more infinitive loop.


Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: SpellChecker.pvp - infinite loop in some cases

Post by Sasha - Tracker Dev Team »

Hello zarkogajic,

Even delphi coding should suffice. As long as it's small and debugable.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
zarkogajic
User
Posts: 1372
Joined: Thu Sep 05, 2019 12:35 pm

Re: SpellChecker.pvp - infinite loop in some cases

Post by zarkogajic »

Hi Alex,

I've found what's causing this!

If e.spellCheckerChanged is enabled for listening the behavior I explained happens.

The event is never fired though (or at least the OnEvent does not get called for it even though enabled for listening).

But as soon as I click "Start" for the SpellCheck pane - infinite loop...

You can test this in FullDemo, just add e_spellCheckerChanged to IDS (and of course, have some dictionaries and load the plugin).


-žarko
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: SpellChecker.pvp - infinite loop in some cases

Post by Sasha - Tracker Dev Team »

Hello zarkogajic,

Great. Forwarded that one for further investigation.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
zarkogajic
User
Posts: 1372
Joined: Thu Sep 05, 2019 12:35 pm

Re: SpellChecker.pvp - infinite loop in some cases

Post by zarkogajic »

Alex,

Happy to help.

p.s.
Btw, :) please: viewtopic.php?f=66&t=34337
User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 2353
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: SpellChecker.pvp - infinite loop in some cases  SOLVED

Post by Vasyl-Tracker Dev Team »

Hi žarko.

The problem with the infinite loop will be fixed in the new upcoming 339 build.

Cheers.
Vasyl Yaremyn
Tracker Software Products
Project Developer

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Post Reply