Compiled Block cause Error

   2115   3   1
User Avatar
Member
6 posts
Joined: March 2015
Offline
I try to convert some not-Compilable SOP to Compilable SOP.
It's really fast than not using “Multithread When Compiled”.

For example, “connect adjacent pieces node” is not-Compileable.
In the adjacent piece node, “compute_point_normals” cause not-Compileable.
So I exchange this to “attribute_expression” like same function which do “compute_point_normals”.
It looks fine when I check “Single Pass” in ForEach Sop block one by one.
But it cause error when I disable “Single Pass” in Foreach Sop block.

So, I debug “connect adjacent pieces node”.
In “connect adjacent pieces node”, “connect_nearby_points” has some code like below.
I debug “connect_nearby_points”'s code. So, I find pcimport function causes error.

Is there anyway to fix this? or replace to attribute vop sop?

I think it's houdini 16.0's program error. It cause segmentation fault.
I test this Houdini 16.0.671 in Ubuntu 14.04, and Houdini 16.504.20 in Windows10.
Both of them cause Error and shut down Houdini program.

I attach file, too.

/// Creates a new line between the given point numbers.
void createline(int pt_a; int pt_b)
{
int prim = addprim(0, "polyline");
addvertex(0, prim, pt_a);
addvertex(0, prim, pt_b);
}

/// Returns true if the item is contained in the list.
int contains(string list[]; string item)
{
foreach(string str; list)
{
if (item == str)
return 1;
}

return 0;
}

int handle = pcopen(0, "P", @P, ch("../searchradius"),
chi("../maxsearchpoints"));
int max_connections = chi("../maxconnections");
string other_name;
string known_pieces[];
int num_connections = 0;
string my_name = s@name;

while (pciterate(handle) && num_connections < max_connections)
{
pcimport(handle, "name", other_name); // this line cause error

// Don't create connections to multiple points on the same piece, or
// to other points on our piece.
if ((my_name != other_name) &&
(num_connections == 0 || !contains(known_pieces, other_name)))
{
vector other_P;
pcimport(handle, "P", other_P); // this line cause error

// Only search in the direction of the point normal.
if (dot(other_P - @P, @N) >= 0)
{
int other_ptnum;
pcimport(handle, "point:number", other_ptnum);

createline(@ptnum, other_ptnum);
++num_connections;
if (num_connections < max_connections)
push(known_pieces, other_name);
}
}
}

pcclose(handle);
Edited by Hyunjun Cheong - July 24, 2017 13:03:06

Attachments:
compiled_error.hipnc (269.7 KB)

User Avatar
Staff
6220 posts
Joined: July 2005
Offline
Thank you for the report. This does appear to be a bug with pcimport() running in a compiled system.

Bug: 84031.
User Avatar
Staff
6220 posts
Joined: July 2005
Offline
This should be fixed in 16.0.681. Thank you for isolating it!
User Avatar
Member
6 posts
Joined: March 2015
Offline
jlait
This should be fixed in 16.0.681. Thank you for isolating it!
Thank you, Jlait.
I look forward Houdini 16.0.681.
I think only pcimport don't cause this problem.


1. Many Pieces in for loop sop
2. pciterate function as while iteration bool
3. pcimport function

like my file I attached before
  • Quick Links