def Val gives seg fault
Bug #1248217 reported by
Jon Hill
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Fluidity |
Fix Committed
|
Medium
|
Jon Hill |
Bug Description
Calling your python function Val rather than val causes a seg fault.
We should at least have a nice error!
Changed in fluidity: | |
importance: | Undecided → Medium |
status: | New → Confirmed |
assignee: | nobody → Jon Hill (jon-hill) |
milestone: | none → 4.1.12 |
Changed in fluidity: | |
status: | Confirmed → Fix Committed |
To post a comment you must log in.
This is the offending line of code (line 79 embed_python.c) PyDict_ GetItemString( pLocals, "val");
// Extract the function from the code.
pFunc=
If there is no val item, then pFunc is NULL, so when you call it, you get a seg fault...
Edit to: PyDict_ GetItemString( pLocals, "val"); "Couldn' t find a 'val' function in your Python code.\n");
// Extract the function from the code.
pFunc=
if (pFunc == NULL) {
printf(
*stat=1;
return;
}
?