Avatar

Please consider registering
guest

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
Avatar
JimmyM
Member
Members
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!

JM

Avatar
W Pirkle
Admin
December 24, 2017 - 4:48 pm
Member Since: January 29, 2017
Forum Posts: 573
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

Avatar
JimmyM
Member
Members
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,

 

JM

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: 51

Skyler: 48

Derek: 46

Frodson: 45

Peter: 43

TheSmile: 43

clau_ste: 39

jim: 34

JimmyM: 33

Gwen: 32

Member Stats:

Guest Posters: 1

Members: 696

Moderators: 1

Admins: 5

Forum Stats:

Groups: 13

Forums: 41

Topics: 757

Posts: 2894

Newest Members:

Jas, Rowan, sojourn, fabhenr, rg1, Niklas, Wutru, Tim Campbell, Danny Jonel, Valentin

Moderators: W Pirkle: 573

Administrators: Tom: 74, JD Young: 80, Will Pirkle: 0, W Pirkle: 573, VariableCook: 3