-nan(ind) automatically generated for float user variable | Compiler Errors & Warnings | Forum


Please consider registering

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —

— Match —

— Forum Options —

Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
-nan(ind) automatically generated for float user variable
December 23, 2017 - 12:52 pm
Member Since: July 21, 2016
Forum Posts: 33
sp_UserOfflineSmall Offline

(EDIT: I fixed it, so I'll leave the solution here in case anybody else runs into this issue) - See bottom


Hi Will,


I recently had a bit of trouble with my versioning setup and managed to get my project almost ready to compile.


The problem I'm having is that I set up a float user variable so I could link a switch to control the views while controlling a parameter. It has worked perfectly (with the addition of a hidden switch control I had added to ensure the view switch when I need them to), however not the .cpp file defaults the initial value to -nan(ind).

The line should be:

ui103->dPresetData[0] = 0.000000;   ... ui103->dPresetData[1] = 0.000000;ui103->dPresetData[2] = 0.000000;


however it becomes


ui103->dPresetData[0] = -nan(ind); 


Do you know off hand why it would do that? 



First thing - It was actually supposed to be a VSTGUI variable, not a generic float, so I changed that.

It still kept re-initializing it to -nan(ind), so in VS I selected 'clean', and 'build' (not 'rebuild'), and it was error-free.

It then recompiled and worked as expected.


Wooohoo, I'm relieved.


Anyhow, Happy Holidays!


December 24, 2017 - 4:48 pm
Member Since: January 29, 2017
Forum Posts: 690
sp_UserOfflineSmall Offline

Hi Jimmy

I'm glad you got it fixed, though I'm not sure exactly how it happened. I will definitely take a look before the next release of v6.9 in a few weeks. 

Thank again for your report as well as your fix!

- Will

December 25, 2017 - 10:19 am
Member Since: July 21, 2016
Forum Posts: 33
sp_UserOfflineSmall Offline

Hi Will


No problem, I'm glad I could help!

I'm pretty sure it had to do with how I interacted with my versioning software. I mistakenly deleted some files, and as a result, had to do a ton of folder and file diffs/edits with previous versions to get everything back in order.


Also, since I hadn't actually 'cleaned' the solution, the rebuild was possibly sticking garbage into where the value was supposed to be (just a guess).

Anyhow, I look forward to the newest release, and if I run into any issues I'll definitely report them.

Have a good one,



Forum Timezone: America/New_York

Most Users Ever Online: 152

Currently Online:
4 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Chaes: 56

Skyler: 48

StevieD: 46

Derek: 46

Frodson: 45

Peter: 43

TheSmile: 43

Nickolai: 43

clau_ste: 39

jeanlecode: 37

Member Stats:

Guest Posters: 1

Members: 775

Moderators: 1

Admins: 6

Forum Stats:

Groups: 13

Forums: 42

Topics: 846

Posts: 3353

Moderators: W Pirkle: 690