When calling XtVaGetValues() to retrieve the XmNuserData field, the returned value is of whatever size an XtPointer is.
Passing the address of an int variable into this routine caused segfault, as the compiler treats an int as 32 bits, not the 64 bits XtVaGetValues is expecting.
Fixed by passing in a generic pointer type and casting to an int after the call.
On Ubuntu 16.04, 64 bit:
When calling XtVaGetValues() to retrieve the XmNuserData field, the returned value is of whatever size an XtPointer is.
Passing the address of an int variable into this routine caused segfault, as the compiler treats an int as 32 bits, not the 64 bits XtVaGetValues is expecting.
Fixed by passing in a generic pointer type and casting to an int after the call.