SDK 6.1.4 - examples crash

do.while's icon

Hi !
im using Visual Studio 2013 for external compilation . compiling for 64x platform as "release"
going through examples im having no problems to compile them (did not checked all of then just yet), but some of them are crashing with no mercy .

it starts at "dummy" object . when i try to set float through "flonum" to the right inlet , it crash . When i look at the code i see

atom_setfloat(&x->val, f) ;

which commented out doesnt crash Max .
when i look at the pluszsz2 ,i can see that it uses the same method of reasigning atoms value type between long and double . pluszsz doesnt crash . but it uses proxy outlets instead of separated one . but im not sure if it has something to do . anyway those are SDK examples , should work (no errors) .

another example is "simplewave~" crashes at opening .

any clues ? ideas ? what to do ?

do.while's icon

files attached

edit : there is even more crashes .
to be sure i just refreshed everything i could , reinstaled etc . doesnt help

dummy.zip
zip
simlpewave.zip
zip
do.while's icon

ive been compiling "examples" for win32 platform . seems like they are working without a crash . Haven't checked all of them but previous one are not crashing (win32).

for the 64x platform ,actually most of the examples are crashing .
ive reinstaled Windows with fresh copy of VS2013
compiled with VS2013 , even with VS2012 . still result of compiling for 64x persist as before .

diablodale's icon

I didn't experience your issue.

I used VS 2012 Express and compiled the 6.1.4 SDK "dummy" sample as x64 both release and debug.
All worked with no crashes on Max 6.1.6 x64

I used VS 2013 Express and compiled the 6.1.4 SDK "dummy" sample as x64 both release and debug.
All worked with no crashes on Max 6.1.6 x64

What Max versions are you experiencing these crashes?

do.while's icon

Hi !

this is even more weird that no one experienced it .

ive checked all of them with Max 6.1.5 (x64/x86) and Max 6.1.6 (x64/x86) .
I dit not changed any settings inside provided projects . but as said x86 is working :/

also my own externals crashes after compiling for x64 platform not x86 .

really frustrated

EDIT : does my dummy & simplewave (attached) not causing any crash ?

diablodale's icon

Just tried your two attachments. They both work fine for me. No crashes.

do.while's icon

Thank you very much D !

This is so weird . im not experiencing any crashes with max objects within x64 version , just with compiled externals .

head scratching

do.while's icon

my new observation : "debug" versions for x64 doent crash Max on Win7 x64 .

any ideas ? Cycling ? How can i help myself ?

do.while's icon

ive been curious about few settings that came to my mind when i faced another problem refered to SSE2 instructions .
My CPU doesnt support AVX , so ive changed some settings for the x64 release :

Configuration Properties_
     C/C++_
          Enable Enhanced Instructions Set : Advanced Vector Extentions 
          ...to...
          Enable Enhanced Instructions Set : Streaming SIMD Extensions 2

...

this has been causing crash .

now im wondering how native Max objects can work on my machine then .
how they know that my CPU doesnt support certain instructions ?
is there a way to automate it within own code ?

diablodale's icon

That could explain the crash behavior.
I looked at the SDK 6.1.4 files and I see two things:
1) the shared "common" Visual Studio settings don't have the AVX (AdvancedVectorExtensions) setting
2) many individual *.vcxproj files *do* have that settings (e.g. dbviewer, filebyte, collect, etc.)

I think it is risky for examples project files to have that setting. Only in 2011 did x64 processors start having the AVX instructions.

do.while's icon

hmm . but VS projects itself has those settings in my SDK (not props files itself).
I dont think many people would face that problem but would be great to know about such thing in advance . i discovered it while trying to solve another issue . it was just a luck .

chthonic's icon

We also had this problem trying to compile the "collect" example using the x64 Release configuration in Visual Studio 2012. Indeed, changing the Enable Enhanced Instructions Set to Streaming SIMD Extensions 2 as described above fixed the problem.

But then on another machine that does support AVX instructions, the compilation with these enabled still produced a working external. This machine also ran the external with SIMD Instructions. So I guess in conclusion: compile with SIMD instructions for increased compatibility with machines new and old, unless you really need those instructions.

Timothy Place's icon

FYI, the AVX flag being set true has been fixed for our next iteration of the SDK.