HDK: OP_Operator inputlabels argument crashing Houdini on start up

   2098   4   0
User Avatar
Member
30 posts
Joined: Oct. 2011
Offline
I have code that compiles on Linux, but on windows I cant seem to compile a sop node with input lables. Is any one else able to compile a SOP node in 15.5 with input lables on windows?

const char *inputLabels[] = { "IN_GEO", "IN_PATH" };
void newSopOperator(OP_OperatorTable *table) {
	table->addOperator(new OP_Operator(
		"customSop",                 
		"my custom sop",                     
		SOP_CustomSop::myConstructor,    
		SOP_CustomSop::myTemplateList,
		2,                          // Min # of sources
		2,                          // Max # of sources
		0,      
		0,
		inputLabels));        
}

Am I missing some thing else here?
Cheers
Edited by AlexLombardi - Sept. 3, 2016 18:18:34
User Avatar
Member
7733 posts
Joined: July 2005
Offline
What's the compiler error?
User Avatar
Member
30 posts
Joined: Oct. 2011
Offline
Hi Edward,
Sorry I worded my post poorly. the code compiles file, but on starting Houdini I am getting a Fatal error. If I remove the inputLabels argument when adding a new OP_Operator, the SOP node works fine. Just wounding what I'm missing/doing wrong to get inputlables working. They work compiling on centos 7, which is strange.

5164: Fatal error: Segmentation fault

Crash report from DZND; Unknown App Version 15.5.565 [windows-x86_64-cl19]
Uptime 0 seconds
Sun Sep 4 11:42:37 2016
Caught signal 11

Traceback from 5164 ThreadId=0x00001350
CURRENT THREAD 4944
+0x6a9d43b4 [UT_StringArray::UT_StringArray]
+0x04c50f23 [OP_Operator::OP_Operator]
sop_pathdeformer.cpp(34) [newSopOperator]
+0x71d6e9e7 [UT_DSO::run]
+0x04c5eabd [OP_OperatorTable::runDSOInstall]
+0x04bcb00e [OP_Network::getOperatorTable]
+0x07c35be7 [OBJ_Node::buildOperatorTable]
+0x6e7920bc [MGR_Node::buildObjTable]
+0x6e79160e [MGR_Node::MGR_Node]
+0x6ea8aa87 [MOT_Director::MOT_Director]
+0x06355328 [OPUI_MainApp::initApplication]
+0x6c858565 [AP_Interface::readPreferenceFile]
+0x6c8596fa [AP_Interface::loadWindowGeoPref]
+0x6c859d75 [myWinMain]
+0x3f14169e
+0x777a59ed [BaseThreadInitThunk]
+0x779dc541 [RtlUserThreadStart]

line 34 is the start of: table->addOperator(new OP_Operator(

cheers
Edited by AlexLombardi - Sept. 4, 2016 14:51:20
User Avatar
Member
7733 posts
Joined: July 2005
Offline
You need to terminate the inputLabels array. From what I can tell, this requirement was added about 13 yrs ago, you've probably just been lucky with the crashes.
const char *inputLabels[] = { "IN_GEO", "IN_PATH", nullptr };
Edited by edward - Sept. 5, 2016 23:32:19
User Avatar
Member
30 posts
Joined: Oct. 2011
Offline

Thanks Edward, working good now, that did the trick
Yeah its strange that it was working on Centos without the nullptr, good to know.
Cheers
  • Quick Links