maxegg2012 in 1.9

There are some problems with the max exporter that ships with the 1.9 sdk.

I had to swap the cg.dll that ships with 3ds max 2012 for the one that’s in the panda/bin directory, else 3ds wouldn’t start with the maxegg2012.dlo (sorry I didn’t write down the error given, something about a missing procedure entry point in libpandaexpress, cg was somewhere in there). Anyway, with the cg from panda it starts.

The main problem is when trying to export, an error message pops up with this text:

Assertion failed!
Program: C:\Program Files\Autodesk\3ds Max 2012\3dsmax.exe
File: c:\thirdparty\win-libs-vc10\.../DenseStorage.h
Line 86

Expression: (reinterpret_cast<size_t>(array) _0xf) == 0 & "this assertion is
explained here: "
"http://eigen.tuxfamily.org/dox-devel/group__TopicUnalignedArrayAssert.html
"****READ THIS WEB PAGE !!! ****"

For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts
(Press Retry to debug the application - JIT must be enabled)

There are Abort Ignore and Retry buttons but all lead to a crash and no file is exported.

It’s a bit weird that the error is Eigen related, I was thinking eigen was disabled for the official 1.9 sdk. I’m also almost sure that the problem didn’t happen in a build from late March (buildbot.panda3d.org/downloads/b … d0380ce17/ )

Thanks for reporting the issue.

Could you share the dtool_config.h file in the include directory of the SDK?

For what it’s worth, I think we may make the buildbot builds without eigen, but the public builds with. Not 100% sure though.

Without a stack trace I can only guess about the location of the error, but I have a suspicion that editing maxEggLoader.cxx and making MaxEggJoint inherit from MemoryBase might be sufficient, ie.:

class MaxEggJoint : public MemoryBase {

dtool_config.h looks like this:

/* dtool_config.h.  Generated automatically by makepanda.py */
#define COMPILE_IN_DEFAULT_FONT 1
#undef DEBUG_THREADS
#define DEFAULT_PATHSEP ";"
#define DO_COLLISION_RECORDING 1
#define DO_DCAST 1
#define DO_MEMORY_USAGE 1
#define DO_PIPELINING 1
#define DO_PSTATS 1
#define EXPORT_TEMPLATES yes
#undef GETTIMEOFDAY_ONE_PARAM
#define GLOBAL_ARGC __argc
#define GLOBAL_ARGV __argv
#undef GLOBAL_OPERATOR_NEW_EXCEPTIONS
#define HAVE_ARTOOLKIT 1
#define HAVE_AUDIO 1
#define HAVE_BMP 1
#undef HAVE_CARBON
#define HAVE_CG 1
#define HAVE_CGDX9 1
#define HAVE_CGGL 1
#undef HAVE_CHROMIUM
#undef HAVE_COCOA
#undef HAVE_DINKUM
#define HAVE_DIRECTCAM 1
#define HAVE_DX9 1
#define HAVE_EGG 1
#undef HAVE_EGL
#define HAVE_EIGEN 1
#define HAVE_FCOLLADA 1
#define HAVE_FFMPEG 1
#undef HAVE_FFTW
#define HAVE_FREETYPE 1
#undef HAVE_GETOPT
#undef HAVE_GETOPT_LONG_ONLY
#define HAVE_GLOBAL_ARGV 1
#undef HAVE_GLX
#define HAVE_IMG 1
#define HAVE_IOS_BINARY 1
#define HAVE_IOS_TYPEDEFS 1
#define HAVE_JPEG 1
#define HAVE_LOCKF 1
#define HAVE_MAYA 1
#define HAVE_NAMESPACE 1
#define HAVE_NET 1
#define HAVE_NVIDIACG 1
#undef HAVE_OPENAL_FRAMEWORK
#undef HAVE_OPENCV
#define HAVE_OPENSSL 1
#undef HAVE_OPEN_MASK
#undef HAVE_P3D_PLUGIN
#define HAVE_PNG 1
#define HAVE_PNM 1
#undef HAVE_POSIX_THREADS
#undef HAVE_PROC_CURPROC_FILE
#undef HAVE_PROC_CURPROC_MAP
#undef HAVE_PROC_SELF_CMDLINE
#undef HAVE_PROC_SELF_ENVIRON
#undef HAVE_PROC_SELF_EXE
#undef HAVE_PROC_SELF_MAPS
#define HAVE_PYTHON 1
#define HAVE_ROCKET_DEBUGGER 1
#define HAVE_ROCKET_PYTHON 1
#define HAVE_RTTI 1
#define HAVE_SGI_RGB 1
#undef HAVE_SOFTIMAGE
#define HAVE_SOFTIMAGE_PIC 1
#define HAVE_SQUISH 1
#undef HAVE_STL_HASH
#define HAVE_STREAMSIZE 1
#define HAVE_SWRESAMPLE 1
#define HAVE_SWSCALE 1
#define HAVE_TGA 1
#define HAVE_THREADS 1
#define HAVE_TIFF 1
#define HAVE_TYPENAME 1
#undef HAVE_VIDEO4LINUX
#define HAVE_VORBIS 1
#define HAVE_WCHAR_T 1
#define HAVE_WGL 1
#undef HAVE_WIN_TOUCHINPUT
#define HAVE_WSTRING 1
#undef HAVE_X11
#undef HAVE_XCURSOR
#undef HAVE_XF86DGA
#undef HAVE_XRANDR
#define HAVE_ZLIB 1
#undef IOCTL_TERMINAL_WIDTH
#undef IS_FREEBSD
#undef IS_LINUX
#undef IS_OSX
#undef LINK_IN_GL
#undef LINK_IN_PHYSICS
#define LINMATH_ALIGN 1
#undef MAYA_PRE_5_0
#define NOTIFY_DEBUG 1
#define OS_SIMPLE_THREADS 1
#undef PHAVE_ALLOCA_H
#undef PHAVE_DIRENT_H
#undef PHAVE_GETOPT_H
#undef PHAVE_GLOB_H
#define PHAVE_IOSTREAM 1
#define PHAVE_IO_H 1
#define PHAVE_JPEGINT_H 1
#undef PHAVE_LIMITS_H
#undef PHAVE_LINUX_INPUT_H
#undef PHAVE_LOCALE_H
#define PHAVE_MALLOC_H 1
#define PHAVE_MINMAX_H 1
#define PHAVE_NEW 1
#define PHAVE_SSTREAM 1
#undef PHAVE_STDINT_H
#undef PHAVE_STDLIB_H
#undef PHAVE_STRING_H
#undef PHAVE_SYS_MALLOC_H
#undef PHAVE_SYS_SOUNDCARD_H
#undef PHAVE_SYS_TIME_H
#define PHAVE_SYS_TYPES_H 1
#undef PHAVE_UCONTEXT_H
#undef PHAVE_UNISTD_H
#undef PHAVE_UTIME_H
#define PRC_SAVE_DESCRIPTIONS 1
#undef PROTOTYPE_GLOBAL_ARGV
#undef PYTHON_FRAMEWORK
#define REPORT_OPENSSL_ERRORS 1
#define SIMPLE_STRUCT_POINTERS 1
#undef SIMPLE_THREADS
#undef SSL_097
#define STATIC_INIT_GETENV 1
#undef STDFLOAT_DOUBLE
#undef SUPPORT_IMMEDIATE_MODE
#undef TRACK_IN_INTERPRETER
#undef USE_DEBUG_PYTHON
#define USE_DELETED_CHAIN 1
#undef USE_GENERIC_DXERR_LIBRARY
#define USE_PANDAFILESTREAM 1
#undef WORDS_BIGENDIAN