sleyzerzon / soar

Automatically exported from code.google.com/p/soar
1 stars 0 forks source link

Invalid Heap Exception Inside Semantic Memory #153

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Semantic memory contains:

delete weighted_pq.top();
weighted_pq.pop();

on lines 2312-2314.  On occasion, the memory used by the top of the priority 
queue can be altered before the the pop command is executed, which causes the 
queue to throw an invalid heap exception.  The easy fix is to grab the pointer, 
pop the queue, and then delete the pointer:

smem_prioritized_weighted_cue::value_type top = weighted_pq.top();
weighted_pq.pop();
delete top;

Original issue reported on code.google.com by alex.nic...@soartech.com on 18 Feb 2014 at 7:26