phunkyg / ReaControl24

Control24 digital control surface protocol middleware
GNU General Public License v3.0
7 stars 6 forks source link

DEV_Otherdevices UnboundLocalError: local variable 'osc_msg' referenced before assignment #20

Open lazlooose opened 4 years ago

lazlooose commented 4 years ago

hey I have been using the new DEV_OtherDevices branch but I am getting this error after about 2-5 minutes which completely crashed the program:

from the terminal window:

...
OSC Listener received Message: ('192.168.0.15', 56798) /track/7/procscribstrip/volume [s] ['-2.27dB']
MP recv: c:1 s:15 d:f0 13 00 40 07 00 2d 32 2e 31 33 64 42 20 f7
MP recv: c:1 s:15 d:f0 13 00 40 06 00 2d 32 2e 32 37 64 42 20 f7
{'CmdClass': 'reafader', 'TrackNumber': 6, 'addresses': ['/', 'track', '/', '7', '/', 'reafader'], 'ChildByteMask': 64, 'TrackByteMask': 31, 'cmdbytes': ['\xb0', '\x06', 'U', '&', '\x00', '"', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00'], 'address': '/track/7/reafader', 'ChildByte': 1, 'lkpbytes': [176, 0], 'TrackByte': 1}
OSCClient sending: /track/7/reafader [0.6640625]
multiprocess Client waiting for data: 9
{'CmdClass': 'reafader', 'TrackNumber': 7, 'addresses': ['/', 'track', '/', '8', '/', 'reafader'], 'ChildByteMask': 64, 'TrackByteMask': 31, 'cmdbytes': ['\xb0', '\x07', 'U', "'", '@', 'v', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00'], 'address': '/track/8/reafader', 'ChildByte': 1, 'lkpbytes': [176, 0], 'TrackByte': 1}
OSCClient sending: /track/8/reafader [0.66796875]
multiprocess Client waiting for data: 9
{'CmdClass': 'reafader', 'TrackNumber': 6, 'addresses': ['/', 'track', '/', '7', '/', 'reafader'], 'ChildByteMask': 64, 'TrackByteMask': 31, 'cmdbytes': ['\xb0', '\x06', 'T', '&', '@', '\x1e', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00'], 'address': '/track/7/reafader', 'ChildByte': 1, 'lkpbytes': [176, 0], 'TrackByte': 1}
OSCClient sending: /track/7/reafader [0.66015625]
multiprocess Client waiting for data: 9
{'CmdClass': 'reafader', 'TrackNumber': 7, 'addresses': ['/', 'track', '/', '8', '/', 'reafader'], 'ChildByteMask': 64, 'TrackByteMask': 31, 'cmdbytes': ['\xb0', '\x07', 'U', "'", '\x10', '\xff'], 'address': '/track/8/reafader', 'ChildByte': 1, 'lkpbytes': [176, 0], 'TrackByte': 1}
OSCClient sending: /track/8/reafader [0.6650390625]
{'cmdbytes': ['\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00'], 'addresses': ['/', 'Null'], 'lkpbytes': [0], 'address': '/Null'}
Daemon client Uncaught exception
Traceback (most recent call last):
  File "/home/pi/ReaControl24_git/ReaControl24_DEV/ReaCommon.py", line 1803, in _manage_daemon_client
    self._desk_to_daw(datarecv)
  File "/home/pi/ReaControl24_git/ReaControl24_DEV/ReaCommon.py", line 1704, in _desk_to_daw
    if osc_msg is not None:
UnboundLocalError: local variable 'osc_msg' referenced before assignment
Exception in thread thread_daemon_client:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/pi/ReaControl24_git/ReaControl24_DEV/ReaCommon.py", line 1803, in _manage_daemon_client
    self._desk_to_daw(datarecv)
  File "/home/pi/ReaControl24_git/ReaControl24_DEV/ReaCommon.py", line 1704, in _desk_to_daw
    if osc_msg is not None:
UnboundLocalError: local variable 'osc_msg' referenced before assignment

it is wierd because I never had this issue in the refactor branch and the refactor branch I have from before the merge does not have this issue. @phunkyg let me knoiw if you want the logs.

phunkyg commented 4 years ago

Hey @lazlooose sorry It has been so long. I put a quick fix in for that. Wanna try again?

lazlooose commented 3 years ago

hey @phunkyg I was able to test this the program is no longer crashing but sad to report that it is slow and has erratic fader responses and is unuseable as is.

Weirdly I am getting tonnes of mapping errors in the terminal window when I move the fader which is unusual.

Level 1 byte not found in MAPPING_TREE: a0. New mapping needed for sequence ['\xa0', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00'] Level 1 byte not found in MAPPING_TREE: fd. New mapping needed for sequence ['\xfd', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00'] Level 1 byte not found in MAPPING_TREE: 82. New mapping needed for sequence ['\x82', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00'] Level 1 byte not found in MAPPING_TREE: de. New mapping needed for sequence ['\xde', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00'] Level 1 byte not found in MAPPING_TREE: b7. New mapping needed for sequence ['\xb7', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00'] Level 1 byte not found in MAPPING_TREE: a0. New mapping needed for sequence ['\xa0', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00'] Level 1 byte not found in MAPPING_TREE: fd. New mapping needed for sequence ['\xfd', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00'] Level 1 byte not found in MAPPING_TREE: af. New mapping needed for sequence ['\xaf', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00']

It's been quite a while but hopefully you are still around in the meantime I will see if I can figure something out.

Thanks!