Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error "Message: -1 is not a valid value" #53

Closed
helgoboss opened this issue Dec 4, 2020 · 3 comments
Closed

Error "Message: -1 is not a valid value" #53

helgoboss opened this issue Dec 4, 2020 · 3 comments
Labels
bug Something isn't working realearn Related to ReaLearn
Milestone

Comments

@helgoboss
Copy link
Owner

Message: -1 is not a valid value

   0:        0x124d413c0 - backtrace::capture::Backtrace::create::h433f2017b514975c
   1:        0x124d412f1 - backtrace::capture::Backtrace::new::hef917fdb1d781165
   2:        0x124c62f55 - reaper_high::log_util::create_reaper_panic_hook::{{closure}}::h87471ae040b9fc4f
   3:        0x124d6a766 - std::panicking::rust_panic_with_hook::hf8b9378dd2e7986a
   4:        0x124d9fdfd - std::panicking::begin_panic::h98a7de04a1dc5e05
   5:        0x124d03f57 - <reaper_medium::control_surface::DelegatingControlSurface as reaper_low::control_surface::IReaperControlSurface>::Extended::h8bea4eb454c479d1
   6:        0x124d2189a - _Extended
   7:        0x10cea1a7a - __Z14CSurf_ExtendediPvS_S_P21IReaperControlSurface
   8:        0x10cf4f1d2 - __ZN7FxChain19OnParmChangeMessageEiPvbb
   9:        0x10d2b07f3 - __ZN10ReaProject13ProcessFxMsgQEb
  10:        0x10cc1e449 - __Z13runMiscTimersv
  11:        0x10cc1d8fb - __Z12Main_OnTimerP6HWND__m
  12:        0x10d217d4d - __Z8MainProcP6HWND__jml
  13:        0x10d0af3c6 - __ZL28SwellDialogDefaultWindowProcP6HWND__jml
  14:     0x7fff2a6ffde9 - ___NSFireTimer
  15:     0x7fff28591d34 - ___CFStringScanInteger
  16:     0x7fff285919a7 - -[NSURL isFileReferenceURL]
  17:     0x7fff285914aa - __CFPreferencesSetValueWithContainer
  18:     0x7fff28588a7b - -[_CFXNotificationRegistrar match:object:observer:enumerator:]
  19:     0x7fff28587e73 - -[NSTaggedPointerString uppercaseStringWithLocale:]
  20:     0x7fff27872d96 - _RunCurrentEventLoopInMode
  21:     0x7fff27872b06 - _ReceiveNextEventCommon
  22:     0x7fff27872884 - __BlockUntilNextEventMatchingListInModeWithFilter
  23:     0x7fff25b1fa3b - __DPSNextEvent
  24:     0x7fff262b5e34 - -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:]
  25:     0x7fff25b1484d - -[NSApplication run]
  26:     0x7fff25ae3a3a - _NSApplicationMain
--- cut ---
@helgoboss helgoboss added the bug Something isn't working label Dec 4, 2020
@helgoboss
Copy link
Owner Author

This happened because IReaperControlSurface Extended() method was called with CSURF_EXT_SETFXPARAM and parm3 (the parameter value) was -1.0. I was aware already that this value can be > 1.0, but I'm very surprised that it can be a negative value. What does -1.0 as value represent? That a param was set to an invalid value or something? I asked Justin this question. Seems like we have to relax the reaper-rs ReaperNormalizedFxParamValue newtype restrictions a bit or (probably better) use Option - because we don't observe arbitrary negative values, just -1 which usually represents None.

Another backtrace here:

--- cut ---
Message: -1 is not a valid value
0: 0x12189efd0 - backtrace::capture::Backtrace::create::h433f2017b514975c
1: 0x12189ef01 - backtrace::capture::Backtrace::new::hef917fdb1d781165
2: 0x1217b0fb5 - reaper_high::log_util::create_reaper_panic_hook::
{{closure}}::h87471ae040b9fc4f
3: 0x1218c3006 - std::panicking::rust_panic_with_hook::hf8b9378dd2e7986a
4: 0x1218f966d - std::panicking::begin_panic::h98a7de04a1dc5e05
5: 0x12185fcb7 - <reaper_medium::control_surface::DelegatingControlSurface as
reaper_low::control_surface::IReaperControlSurface>::Extended::h8bea4eb454c479d1
6: 0x12187d9ca - _Extended
7: 0x10fa0ba7a - __Z14CSurf_ExtendediPvS_S_P21IReaperControlSurface
8: 0x10faa6307 - __ZN5FxDsp15SetParameterValEidbb
9: 0x10f9f2d33 - __Z30lua_TrackFX_SetParamNormalizedP9lua_State
10: 0x10fa30ca4 - _luaD_precall
11: 0x10fb51c6e - _luaV_execute
12: 0x10fa316a6 - _luaD_callnoyield
13: 0x10fa3349b - _luaD_rawrunprotected
14: 0x10fa331f0 - _luaD_pcall
15: 0x10fe33f68 - _lua_pcallk
16: 0x10fe01cea - __ZN6LuaAPI15RunDeferredTaskEP6HWND__
17: 0x10fe7985a - __Z21ReaScript_RunDeferredv
18: 0x10f788017 - __Z13runMiscTimersv
19: 0x10f7878fb - __Z12Main_OnTimerP6HWND__m
20: 0x10fd81d4d - __Z8MainProcP6HWND__jml
21: 0x10fc193c6 - __ZL28SwellDialogDefaultWindowProcP6HWND__jml
22: 0x7fff918ad9f3 - __qfqp2text
23: 0x7fff9239c204 - __setupDebugConnection.onceToken
24: 0x7fff9239be93 - __setupDebugConnection.onceToken
25: 0x7fff9240f53d - __setupDebugConnection.onceToken
26: 0x7fff92357428 - __setupDebugConnection.onceToken
27: 0x7fff923569f8 - __setupDebugConnection.onceToken
28: 0x7fff9769756f - __ZL15gSlotProxyClass
29: 0x7fff976972ea - __ZL15gSlotProxyClass
30: 0x7fff9769712b - __ZL15gSlotProxyClass
31: 0x7fff983118ab - _numberOfWindowsDoingConstraintVisualization
32: 0x7fff98310e58 - _numberOfWindowsDoingConstraintVisualization
33: 0x7fff98306af3 - _numberOfWindowsDoingConstraintVisualization

34: 0x7fff98283244 - _numberOfWindowsDoingConstraintVisualization
--- cut ---

helgoboss added a commit to helgoboss/reaper-rs that referenced this issue Dec 7, 2020
@helgoboss
Copy link
Owner Author

This error message should at least disappear in ReaLearn v1.12.0-pre5. I'll keep this open because it's only a workaround so far, see the reaper-rs commit.

@helgoboss helgoboss added this to the 1.12.0 milestone Dec 8, 2020
helgoboss added a commit that referenced this issue Dec 10, 2020
- or instead of panicking as done up to 1.11.0
- works because we use latest reaper-rs that allows the newtype to take
  any possible f64 value
@helgoboss
Copy link
Owner Author

The final fix of this is interpreting negative values as zero. In many cases, negative values reported by plug-ins are bugs, e.g. rounding errors. In rare cases they might represent values with special meaning. If yes, ReaLearn doesn't support this kind of values and just converts them to 0.0.

@helgoboss helgoboss added the realearn Related to ReaLearn label Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working realearn Related to ReaLearn
Projects
None yet
Development

No branches or pull requests

1 participant