Issue 144 in soar: crash in GDS when returning a result

4 views
Skip to first unread message

so...@googlecode.com

unread,
Jul 2, 2013, 10:33:03 AM7/2/13
to soar-...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 144 by bob.mari...@soartech.com: crash in GDS when returning a
result
http://code.google.com/p/soar/issues/detail?id=144

The attached program crashes Soar in add_wme_to_gds. Specifically, the gds
object it is trying to add to is null. The wme it is trying to add is (I1
^output-link I3). This crashes in both jsoar and csoar (latest trunk as of
this writing).

Note that this is actually disrupting work on a project, so if it can be
fixed quickly, that would be great. In the meantime, I'll try to find a
workaround.

Looking into a little (in jsoar), it looks like the inst that is being
processed is justification-1, whose match goal is S1. S1 has a null gds
(which I think is correct). So the problem seems to be that this is being
added to a GDS at all?

The stack trace from csoar looks like this:

> Soar.dll!add_wme_to_gds(agent_struct * agentPtr, gds_struct * gds,
> wme_struct * wme_to_add) Line 3083 C++
Soar.dll!elaborate_gds(agent_struct * thisAgent) Line 3242 C++
Soar.dll!elaborate_gds(agent_struct * thisAgent) Line 3546 C++
Soar.dll!elaborate_gds(agent_struct * thisAgent) Line 3546 C++
Soar.dll!decide_non_context_slot(agent_struct * thisAgent, slot_struct *
s) Line 2199 C++
Soar.dll!decide_non_context_slots(agent_struct * thisAgent) Line 2265 C++
Soar.dll!do_working_memory_phase(agent_struct * thisAgent) Line 2937 C++
Soar.dll!do_one_top_level_phase(agent_struct * thisAgent) Line 867 C++
Soar.dll!run_for_n_decision_cycles(agent_struct * thisAgent, __int64 n)
Line 1377 C++
Soar.dll!sml::AgentSML::Step(sml::smlRunStepSize stepSize) Line 481 C++
Soar.dll!sml::AgentSML::StepInClientThread(sml::smlRunStepSize stepSize)
Line 435 C++
Soar.dll!sml::RunScheduler::RunScheduledAgents(bool forever,
sml::smlRunStepSize runStepSize, unsigned __int64 count, sml::smlRunFlags
runFlags, sml::smlRunStepSize interleaveStepSize, bool synchronize) Line
799 C++
Soar.dll!cli::CommandLineInterface::DoRun(const std::bitset<10> &
options, int count, cli::Cli::eRunInterleaveMode interleaveIn) Line 124 C++

Soar.dll!cli::RunCommand::Parse(std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>
>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>
> > > & argv) Line 2866 C++

Soar.dll!cli::Parser::handle_command(std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>
>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>
> > > & argv) Line 53 C++
Soar.dll!soar::tokenizer::parse_command() Line 415 C++
Soar.dll!soar::tokenizer::evaluate(const char * const input) Line 343 C++
Soar.dll!cli::CommandLineInterface::Source(const char * buffer, bool
printFileStack) Line 213 C++
Soar.dll!cli::CommandLineInterface::DoCommand(sml::Connection *
pConnection, sml::AgentSML * pAgent, const char * pCommandLine, bool
echoResults, bool rawOutput, soarxml::ElementXML * pResponse) Line 156 C++
Soar.dll!sml::KernelSML::HandleCommandLine(sml::AgentSML * pAgentSML,
const char * pCommandName, sml::Connection * pConnection, sml::AnalyzeXML *
pIncoming, soarxml::ElementXML * pResponse) Line 915 C++
Soar.dll!sml::KernelSML::ProcessCommand(const char * pCommandName,
sml::Connection * pConnection, sml::AnalyzeXML * pIncoming,
soarxml::ElementXML * pResponse) Line 582 C++
Soar.dll!sml::KernelSML::ProcessIncomingSML(sml::Connection *
pConnection, soarxml::ElementXML * pIncomingMsg) Line 636 C++
Soar.dll!ReceivedCall(sml::Connection * pConnection, soarxml::ElementXML
* pIncoming, void * __formal) Line 39 C++
Soar.dll!sml::Callback::Invoke(soarxml::ElementXML * pIncomingMessage)
Line 111 C++
Soar.dll!sml::Connection::InvokeCallbacks(soarxml::ElementXML *
pIncomingMsg) Line 432 C++
Soar.dll!sml::EmbeddedConnectionAsynch::ReceiveMessages(bool allMessages)
Line 310 C++
Soar.dll!sml::ConnectionManager::ReceiveAllMessages() Line 231 C++
Soar.dll!sml::ReceiverThread::Run() Line 66 C++
Soar.dll!ThreadStartFunction(void * pThreadObject) Line 31 C++
msvcr110d.dll!_callthreadstart() Line 257 C
msvcr110d.dll!_threadstart(void * ptd) Line 239 C
kernel32.dll!0000000076ec652d() Unknown
ntdll.dll!0000000076ffc521() Unknown

Attachments:
test.soar 1.5 KB

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

so...@googlecode.com

unread,
Jul 2, 2013, 11:49:30 AM7/2/13
to soar-...@googlegroups.com

Comment #1 on issue 144 by maz...@gmail.com: crash in GDS when returning a
result
http://code.google.com/p/soar/issues/detail?id=144

Archiving John's comment for use when debugging later...

Final rule not only returns a result but it also creates a structure that
is local to the substate. If rule is split into two independent rules that
fire in parallel, crash does not occur.

so...@googlecode.com

unread,
Jul 2, 2013, 12:03:53 PM7/2/13
to soar-...@googlegroups.com

Comment #2 on issue 144 by bob.mari...@soartech.com: crash in GDS when
Thanks John, that very easily works around the problem.
Reply all
Reply to author
Forward
0 new messages