<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><font size="3" face="Times New Roman">Hi All, </font><BR><font size="3" face="Times New Roman"></font> <BR><font size="3" face="Times New Roman">Freeing of an object having inheritance depth >=2 throws an error such as:</font><BR><font size="3" face="Times New Roman">" internal error Call to esxVI_<grand_parent>_Free for unexpected type 'Child'. "</font><BR><font size="3" face="Times New Roman"></font> <BR><font size="3" face="Times New Roman">For instance: </font><BR><font size="3" face="Times New Roman">Below code snippet is from esx_vi_generator.input (modified)</font><BR><font size="3" face="Times New Roman"></font> <BR><font size="3" face="Times New Roman">object VirtualDevice<br> Int key r <br> Description deviceInfo o <br> VirtualDeviceBackingInfo backing o <br> VirtualDeviceConnectInfo connectable o <br> Int controllerKey o <br> Int unitNumber o <br>end<br></font><BR><font size="3" face="Times New Roman">object VirtualController extends VirtualDevice<br> Int busNumber r<br> Int device ol<br>end</font><BR><font size="3" face="Times New Roman"><br>object VirtualIDEController extends VirtualController<br>end<BR> <BR>object VirtualDeviceConfigSpec<br> VirtualDeviceConfigSpecOperation operation o<br> VirtualDeviceConfigSpecFileOperation fileOperation o<br> VirtualDevice device r<br>end<BR> <BR><br>object VirtualMachineConfigSpec<BR>.<BR>.<BR>.<br> VirtualDeviceConfigSpec deviceChange ol<BR>.<BR>.<BR>end<BR> <BR>On free of "VirtualMachineConfigSpec", I hit below error:<BR>"<BR>libvir: ESX Driver error : internal error Call to esxVI_VirtualDevice_Free for unexpected type 'VirtualIDEController'<BR>"<BR> <BR>But if I remove VirtualController and include its fields directly to VirtualIDEController, error is resolved. Please let me know if I'm missing anything, else, it seems like a bug with generated code. <BR> <BR>While debugging the error seems to come from:<BR> <BR>esx_vi_types.c:<BR> <BR>/*<br> * Macros to implement dynamic dispatched functions<br> */<BR>#define ESX_VI__TEMPLATE__DISPATCH(_actual_type, _actual_type_name, __type, \<br> _dispatch, _error_return) \<br> switch (_actual_type) { \<br> _dispatch \<br> \<br> case esxVI_Type_##__type: \<br> break; \<br> \<br> default: \<br> virReportError(VIR_ERR_INTERNAL_ERROR, \<br> _("Call to %s for unexpected type '%s'"), \<br> __FUNCTION__, _actual_type_name); \<br> return _error_return; \<br> }<BR><br> <BR></font>Thanks!<BR>Ata<BR> </div></body>
</html>