Author Topic: IMatch crashes when app posts request to add keyword with thesauruslookup option  (Read 195 times)

paulmaguire

  • New Members
  • *
  • Posts: 16
Hi,

I've written an app that has a feature to add keywords from within the app, using IMWS.post. It works just fine, but if I add the option thesauruslookup=true, it causes imatch to crash. This seems to be regardless of the file selected or the keyword entered.

Here's the snippet of code:
Code: [Select]
var task = {
id:fileActive,
op:'add',
tag:'hierarchicalkeywords',
value:addkeys,
thesauruslookup:true,
applysynonyms:true,
unique:true
}


var tasks = [];
tasks.push(task);
console.log(console.log(JSON.stringify(task,null,2)));


IMWS.post('v1/metadata',{
tasks: JSON.stringify(tasks)
}).then(function(response) {

console.log(JSON.stringify(response,null,2));
initialise();

},function(error) {
console.log('Oops. Something went wrong: ' + error.status);
});

Here is the task that works ok:

Code: [Select]
{
  "id": "48951",
  "op": "add",
  "tag": "hierarchicalkeywords",
  "value": [
    "justtesting"
  ],
  "unique": true
}

And here is the task that causes a crash. (It crashes regardless of whether "applysynonyms" is specified.)

Code: [Select]
{
  "id": "48951",
  "op": "add",
  "tag": "hierarchicalkeywords",
  "value": [
    "justtesting"
  ],
  "thesauruslookup":"true",
  "applysynonyms":"true",
  "unique": true
}


This is what the end of the log file looks like:
Code: [Select]
04.10 09:09:02+ 8203 [6010] 10  M>  >  1 CIMatchWebServices::HandlerPOST_Metadata  'v:\develop\imatch5\src\imws\imatchwebservices.cpp(16460)'
04.10 09:09:02+    0 [6010] 10  M>   >  2 CIMatchWebServices::UpdateMetadata  'v:\develop\imatch5\src\imws\imatchwebservices.cpp(16914)'
04.10 09:09:02+    0 [6010] 50  M>    >  3 PTThesaurus::UpdateVKWPathMap  'v:\develop\imatch5\src\imengine\ptthesaurus.cpp(4274)'
04.10 09:09:02+    0 [6010] 50  M>    <  3 PTThesaurus::UpdateVKWPathMap

Log file attached. Please let me know if you need the dump file and I can email you a link to Google Drive.

Kind regards
Paul

Mario

  • IMatch Developer
  • Administrator
  • *****
  • Posts: 22281
Please also attach your thesaurus (zipped).

paulmaguire

  • New Members
  • *
  • Posts: 16
Thesaurus attached.

Mario

  • IMatch Developer
  • Administrator
  • *****
  • Posts: 22281
Fixed for the next release. Thanks.

"Another bug bites the dust."