ModPlug Central

OpenMPT => Help and Questions => Topic started by: FWL on April 24, 2015, 09:34:41

Title: Parameter editor: Encountered an improper argument.
Post by: FWL on April 24, 2015, 09:34:41
Hello everyone,

Recently I discovered that the parameter editor wont always open on my computer. A lot of times i'll get the message "encountered an improper argument". I was wondering if i am the only one and it has to do with my computer-setup or that there were changes in the parameter editor. I have Windows 7 64 bit and use Openmpt 32 bit.

Thanks in advance!

FWL
Title: Re: Parameter editor: Encountered an improper argument.
Post by: Saga Musix on April 24, 2015, 09:49:59
That issue was supposed to be fixed several months ago, so please upgrade to the latest version.
Title: Re: Parameter editor: Encountered an improper argument.
Post by: FWL on April 24, 2015, 10:27:04
I have the latest version installed. version 1.24.04.00 32 bit
Title: Re: Parameter editor: Encountered an improper argument.
Post by: Saga Musix on April 24, 2015, 11:31:03
Can you give a step-by-step description how you can reproduce the issue?
Title: Re: Parameter editor: Encountered an improper argument.
Post by: FWL on April 24, 2015, 11:47:10
Hello Saga,

Of course:

1. input some note and effect data
2. Ctrl-l to select column
3. Alt-b to open parameter editor
4. Parameter editor pops up
5. close parameter editor.
6. repeat steps 2 and 3.
7. error: improper argument
Title: Re: Parameter editor: Encountered an improper argument.
Post by: Saga Musix on April 24, 2015, 13:16:49
I tried that and it worked as expected here. Just to go sure, does it happen for you if you just start OpenMPT, then create a new module, go to the pattern editor, press Ctrl+L, Alt+B, close editor and press Alt+B again?
Title: Re: Parameter editor: Encountered an improper argument.
Post by: FWL on April 24, 2015, 13:47:14
Yes, I've created a new module, entered some data and followed the previous mentioned steps. But it's somewhat erratic. Sometimes after a lot of tries, switching between Alt+B and the right click menu "visualize effect"  the parameter editor pops up again.

I've also tried with previous saved modules and it's the same.

Maybe i should try to reinstall Openmpt

FWL
Title: Re: Parameter editor: Encountered an improper argument.
Post by: Saga Musix on April 24, 2015, 13:58:42
That's not going to change anything.
By any chance, do you use a non-standard DPI setting (i.e. not 96 DPI) in Windows?
Title: Re: Parameter editor: Encountered an improper argument.
Post by: FWL on April 24, 2015, 14:05:33
I don't think so. The setting in the screen configuration of windows 7 is 100% (standard). That would be 96 dpi isn't?
Title: Re: Parameter editor: Encountered an improper argument.
Post by: FWL on April 24, 2015, 14:13:16
I did find out that there's a difference in the error occurence when i switch between power options High Perfomance and Automatic. When Automatic is chosen and the Aero theme is on, the error only seems to occur when i reopen the paramater on the same channel. 
Title: Re: Parameter editor: Encountered an improper argument.
Post by: Saga Musix on April 24, 2015, 14:17:57
Sounds like there's a race condition somewhere then, but I still couldn't reproduce it. I might have to try it with Aero, I guess.
Title: Re: Parameter editor: Encountered an improper argument.
Post by: FWL on April 24, 2015, 14:39:13
So to be clear:

Aero: only when reopening on same channel
Classic theme: almost every time

Title: Re: Parameter editor: Encountered an improper argument.
Post by: Saga Musix on April 24, 2015, 15:13:43
Can you check if this version works better for you? If not, I guess I'll require a memory dump to work with, as otherwise it would be pretty much guesswork what is going wrong here.
http://sagagames.de/stuff/mptrack.exe
Title: Re: Parameter editor: Encountered an improper argument.
Post by: FWL on April 24, 2015, 15:33:10
Hee Saga!

That did the trick! The downloaded version opens and reopens the parameter editor without a glitch in classic mode as wel as Aero.

Thank you very much for your speedy solution. What eventually was the cause of the problem?

Title: Re: Parameter editor: Encountered an improper argument.
Post by: Saga Musix on April 24, 2015, 16:11:34
There were a couple of uninitialized variables used as divisors, and due to their nature of being uninitialized, they were sometimes 0, so that division went bang. I'm not quite sure how that ever worked.
Title: Re: Parameter editor: Encountered an improper argument.
Post by: FWL on April 24, 2015, 16:39:51
Well thanks a lot again!  Also for the new sample cue feature, it's really nice.

Greetings,

FWL