Defective Formula Category

Started by Darius1968, December 01, 2018, 08:25:16 AM

Previous topic - Next topic

Darius1968

I have a formula category for which bad syntax has caused IMatch to hang indefinitely, but otherwise, the database is fine.  If I know what category this is, is there a way to edit one of the files, so as to have effectively deleted this category before I reopen the database again? 

Mario

Categories are stored as a binary object inside the database. There are no individual files to edit.

IMatch checks for infinite recursion and other potential issues and aborts formula categories when this is detected. And then flags the category as bad and does not calculate it again until the next session. The category is marked in the Category View with a special icon.

If you have somehow produced a formula which runs for a very long time but is OK otherwise, IMatch may be unable to detect this as an error. There is no "this is how long a formula-based category may run" timeout...

Have you tried to switch to the Category View and then pause the file window? If you can reach the Gear menu in the View (toolbar above the tree), disable the "Show Counts" option? This may prevent the category from being calculated.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Darius1968

Being in Category View, having Pause activated & Category Counts disabled are all a yes.  I can even at this point, click on other categories, but if I click on the offending category, the hang starts.  I was hoping for a way to be able to export and re-import my categories (and their file assignments). 

Mario

The only idea I have would be to use the "Categories" sample app (in the App Manager).
The app has a button which deletes the category named "IM-TEST". You can easily change this to delete the category with the problem.

1. In the App Manager, right click on the sample App named "Categories".
2. Choose "Open in Windows Explorer".

3. Open the file named "index.html" in your favorite text editor (Windows Notepad).

4. Starting on line 296 you see the code that deletes the IM-TEST category:
The code to change is:

IMWS.delete('v1/categories',{
path: 'IM-TEST',


Change the categroy name for the path parameter from IM-TEST to the path (!) of your formula category. IM-TEST is on the root level. If your category is something like

@All
|- WHO
   |- Bad Formula

you would set path to
IMWS.delete('v1/categories',{
path: 'WHO|Bad Formula',


5. Save the file and then run the sample app by clicking on it in the App Manager.

6. In the App, scroll down until you see the red button labeled Delete IM-TEST. Click it. It will delete your bad formula category.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Darius1968