MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003613ardourbugspublic2010-12-16 13:412013-01-07 10:29
Reporternowhiskey 
Assigned Topaul 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Version3.XFixed in Version 
Summary0003613: wiimote control does not compile in A3
Descriptionin rev8287 enabling wiimote control in ./waf configure is causing the build process to fall. this is the output:

   1.
      [410/697] cxx: libs/surfaces/wiimote/wiimote.cc -> build/default/libs/surfaces/wiimote/wiimote_1.o
   2.
      In file included from ../libs/surfaces/wiimote/wiimote.cc:1:
   3.
      ../libs/pbd/pbd/stateful.h:50:14: warning: 'virtual int PBD::Stateful::set_state(const XMLNode&, int)' was hidden
   4.
      ../libs/surfaces/wiimote/wiimote.h:37:7: warning: by 'int WiimoteControlProtocol::set_state(const XMLNode&)'
   5.
      ../libs/surfaces/wiimote/wiimote.cc: In constructor 'WiimoteControlProtocol::WiimoteControlProtocol(ARDOUR::Session&)':
   6.
      ../libs/surfaces/wiimote/wiimote.cc:24:21: error: no matching function for call to 'ARDOUR::ControlProtocol::ControlProtocol(ARDOUR::Session&, const char [8])'
   7.
      ../libs/surfaces/control_protocol/control_protocol/control_protocol.h:121:2: note: candidates are: ARDOUR::ControlProtocol::ControlProtocol(const ARDOUR::ControlProtocol&)
   8.
      ../libs/surfaces/control_protocol/control_protocol/control_protocol.h:40:2: note: ARDOUR::ControlProtocol::ControlProtocol(ARDOUR::Session&, std::string, PBD::EventLoop*)
   9.
      ../libs/surfaces/wiimote/wiimote.cc: At global scope:
  10.
      ../libs/surfaces/wiimote/wiimote.cc:169:40: error: no 'void WiimoteControlProtocol::_wiimote_main()' member function declared in class 'WiimoteControlProtocol'
  11.
      Waf: Leaving directory `/home/nowhiskey/Desktop/src/3.0/build'
  12.
      Build failed: -> task failed (err #1):
  13.
              {task: cxx wiimote.cc -> wiimote_1.o}
  14.
      nowhiskey@murija5:~/Desktop/src/3.0$


perhaps easyer to read here:

http://pastebin.com/VJ0hxVZ9 [^]


cheers,
doc
TagsNo tags attached.
Attached Filespatch file icon 0001-wiimote-link-against-cwiid-library.patch [^] (1,759 bytes) 2012-10-02 16:01 [Show Content]
patch file icon 0002-wiimote-add-new-PBD-DEBUG-WiimoteControl-debug-bit.patch [^] (1,190 bytes) 2012-10-02 16:01 [Show Content]
patch file icon 0003-wiimote-port-to-AbstractUI-use-IdleSource-for-receiv.patch [^] (20,617 bytes) 2012-10-02 16:01 [Show Content]
patch file icon 0004-wiimote-update-LEDs-on-transport-recording-state-cha.patch [^] (3,109 bytes) 2012-10-02 16:01 [Show Content]
patch file icon 0005-wiimote-add-wiimote-surface-to-ardev_common.sh-for-d.patch [^] (1,186 bytes) 2012-10-02 16:01 [Show Content]
patch file icon 0006-wiimote-rework-discovery-use-callback-for-receiving-.patch [^] (11,723 bytes) 2012-10-02 16:02 [Show Content]
? file icon ardbg-wii100 [^] (4,631 bytes) 2012-10-03 07:01 [Show Content]
patch file icon 0007-wiimote-properly-register-the-cwiid-callback-thread-.patch [^] (4,792 bytes) 2012-10-21 07:50 [Show Content]
patch file icon 0001-wiimote-port-the-wiimote-control-surface-to-Ardour-3.patch [^] (27,415 bytes) 2013-01-04 16:12 [Show Content]

- Relationships

-  Notes
(0009981)
paul (administrator)
2011-01-28 16:56

i've notified sampo (the author of wiimote support) of this. until someone is motivated to port it over, this is going to remain a problem.
(0014034)
jannis (reporter)
2012-10-02 16:05

Hi,

I've attached a set of patches to fix compilation of the Wiimote in Ardour 3. The patches should apply fine against the 3.0 branch if processed in the given order. There is more information about the nature of the patches in the patch file headers.

They essential port the Wiimote control surface to BaseUI/AbstractUI and get rid of the thread hackery. The only potential problem I can see is that the member variables of WiimoteControlProtocol are not protected against access from different threads. AFAIK, cwiid uses it's own thread for receiving but I'm not sure in which thread context the message callback is executed. But perhaps I'm complicating things here; I haven't had any problems or crashes with these patches while testing.

Let me know if you spot anything bad or something doesn't work as expected.
(0014035)
nowhiskey (reporter)
2012-10-03 07:01

hallo,

first of all - very much thanks that somebody is trying to reimplement this one!

i patched my sources and A3 is building happily with wiimote enabled again.

i see that using the cross, we cannot scroll through the session, but i also found another bug, which is much more worse and makes ardour crash.

steps to reproduce:

1. start jackd in non-rt with a lot of timeout
2. start ardbg
3. create new session
4. connect wiimote by pressing 1+2
5. now press the 'B' button.
6. now press the up-arrow on the cross
7. a window appears, with the following content:


------------
Ardour - : Fatal Error

programming error: no per - thread pool " " for thread 2724035440

Press to exit
--------

the last one is a button, so if i press to exit, ardour will exit.

i ll attach the output of the console, but unfortunately the bt is not created the way i am trying to do it.

cheers,

doc
(0014037)
nowhiskey (reporter)
2012-10-04 01:43

hallo,

i realized that my last report is sort of not precisely.

it should be:

5. now press the 'B' button AND KEEP IT PRESSED
6. now press the up-arrow on the cross (while the 'B' button is still pressed too).

cheers,

doc
(0014117)
jannis (reporter)
2012-10-21 06:37

@nowhiskey: Sorry it took me so long to respond. I just tried and I can replicate the issue. I'm pretty sure it is independent of how jack is started as it also happens when using realtime etc.

I'll investigate and try to fix it.
(0014118)
nowhiskey (reporter)
2012-10-21 07:05

hallo,
very much thanks for looking at this!

i found another 'regression' while running a3 with your patches applied.

-create new session
-->menu->edit->preferences->user interaction
-anable wiimote

if now no bluetooth interface is connected to the machine, the terminal i started ardour from is showing this:

....
No Bluetooth interface found
Wiimote: Not discovered yet, press 1+2 to connect
No Bluetooth interface found
Wiimote: Not discovered yet, press 1+2 to connect
No Bluetooth interface found
.....

while this output is running, a3 becomes somewhat less responsible. it looks, as it would slow down ardours user interface.
once i disable wiimote, the console output stops and UI works faster again.

cheers,

doc
(0014119)
jannis (reporter)
2012-10-21 07:51

I found the problem: in my port to Ardour 3, I forgot to register the cwiid callback thread with Ardour. I've uploaded another patch to be applied after the others that fixes this problem. Please test it.
(0014120)
jannis (reporter)
2012-10-21 07:57

@nowhiskey:

> while this output is running, a3 becomes somewhat less responsible.
> it looks, as it would slow down ardours user interface.
> once i disable wiimote, the console output stops and UI works faster again.

I know what you mean. I'm not sure this is a regression but I don't have Ardour 2 here to test with. It seems that cwiid_open() blocks the UI even though, from my understanding, the Wiimote code should run in its own thread. I couldn't find a way to avoid this.

BTW, I think the UI is only frozen for a few seconds when you activate the Wiimote plugin. It's not frozen forever, at least not here.
(0014125)
nowhiskey (reporter)
2012-10-22 06:44

hallo,
with the last patch applied the crash is gone! thanks for this.

about the regression, when wiimote is not connected, you are right. the ui is freezing just for some seconds. after it, it will work, and if i disable wiimote everything is smooth anyway.

but let's speak about other functions:

pressing left/right on the cross, should scroll through the session.

in the moment, pressing 'B' and any of the crossbuttons (left/right/up/down) as well the '-' or '+' button will set the playhead to the start marker. perhaps it would be possible to make the 'home' button putting the PH at the start and 'B + home' perhaps put the PH at the endmarker.

but that is another story. personally i am missing the function to scroll through the session, since i am using that one very much.

cheers,

doc
(0014132)
jannis (reporter)
2012-10-22 08:50

@nowhiskey: The button functions should be the same as before. Left/right should move the playhead back/forward in the session, for instance. +/- should zoom in and out. If you press B plus one of these buttons the behavior is different though.
(0014133)
nowhiskey (reporter)
2012-10-22 09:08

ok, i had a better look into it:

left/right does not scrolls the session here. nothing happens when pressing it.

+/- works here too.

the B button:

-when recording, pressing B+A will 'stop recording and delete the captured material'

-B+up/down sets the PH to the next/previous marker

-B+left/right sets the PH to the next/previous region begin/end

-B+ +/- sets the PH to the start/end of the session

-B+home creates a marker at the PH position

-B+1/2 does not do nothing.

so it is all ok here except the scrolling... no idea why, but when pressing left/right nothing is happening here and no information from the console too.

cheers,

doc
(0014134)
jannis (reporter)
2012-10-22 09:14

@nowhiskey: Ok, thanks for the information. I'll have a look at left/right when I get home today.
(0014137)
jannis (reporter)
2012-10-22 12:30

@nowhiskey: It works fine here. One thing worth noting is that keeping a button pressed does not generate multiple events (so it's not like the keyboard for instance, where keeping 'a' pressed will type 'aaaaaaaa'). It didn't do that in Ardour 2 either. Do left/right work if you press them repeatedly?
(0014140)
nowhiskey (reporter)
2012-10-23 02:43

no scrolling here...

there is a test program called 'wmgui' and if i use it on my wiimote, everything seems to be all right here.
i also just tried on a fresh 2.0-ongoing and there the scrolling works smoothly.

cheers,

doc
(0014428)
jannis (reporter)
2013-01-04 16:14

@paul: I've attached a consolidated single patch now: http://tracker.ardour.org/file_download.php?file_id=2010&type=bug [^]
(0014430)
nowhiskey (reporter)
2013-01-05 07:17

hallo,

i did a clean svn co applied the patch and rebuild ardour.
still everything is working here except for left/right scrolling through the session.

cheers,

doc
(0014431)
nowhiskey (reporter)
2013-01-05 09:11

one more thing...

i still think it is a regression. it does not happen in A2:

-create session
-enable wiimote
-close the session
-open it again w/out bluetooth being pluged in
-now the terminal shows:

....
No Bluetooth interface found
Wiimote: Not discovered yet, press 1+2 to connect
No Bluetooth interface found
Wiimote: Not discovered yet, press 1+2 to connect
No Bluetooth interface found
.....

and it slows down the opening of the session.

this can be rather confusing esp. to some new users.

sorry for hijacking this one, but for me it looks like nobody else than jannis and me has a wiimote and can try how it works.

cheers,
doc
(0014432)
jannis (reporter)
2013-01-05 10:32

@nowhiskey: I can do some debugging again when I'm in the rehearsal room tomorrow. I've not experienced the issues you're seeing. The "no Bluetooth interface found" error sounds odd, almost like that is something outside the surface implementation.
(0014440)
paul (administrator)
2013-01-07 10:29

applied as rev 13796

- Issue History
Date Modified Username Field Change
2010-12-16 13:41 nowhiskey New Issue
2010-12-16 14:04 cth103 cost => 0.00
2010-12-16 14:04 cth103 Target Version => 3.0-beta1
2011-01-28 16:56 paul Note Added: 0009981
2011-02-01 06:20 paul Status new => confirmed
2011-04-22 17:36 cth103 Target Version 3.0-beta1 => 3.X
2012-10-02 16:01 jannis File Added: 0001-wiimote-link-against-cwiid-library.patch
2012-10-02 16:01 jannis File Added: 0002-wiimote-add-new-PBD-DEBUG-WiimoteControl-debug-bit.patch
2012-10-02 16:01 jannis File Added: 0003-wiimote-port-to-AbstractUI-use-IdleSource-for-receiv.patch
2012-10-02 16:01 jannis File Added: 0004-wiimote-update-LEDs-on-transport-recording-state-cha.patch
2012-10-02 16:01 jannis File Added: 0005-wiimote-add-wiimote-surface-to-ardev_common.sh-for-d.patch
2012-10-02 16:02 jannis File Added: 0006-wiimote-rework-discovery-use-callback-for-receiving-.patch
2012-10-02 16:05 jannis Note Added: 0014034
2012-10-03 07:01 nowhiskey Note Added: 0014035
2012-10-03 07:01 nowhiskey File Added: ardbg-wii100
2012-10-04 01:43 nowhiskey Note Added: 0014037
2012-10-21 06:37 jannis Note Added: 0014117
2012-10-21 07:05 nowhiskey Note Added: 0014118
2012-10-21 07:50 jannis File Added: 0007-wiimote-properly-register-the-cwiid-callback-thread-.patch
2012-10-21 07:51 jannis Note Added: 0014119
2012-10-21 07:57 jannis Note Added: 0014120
2012-10-22 06:44 nowhiskey Note Added: 0014125
2012-10-22 08:50 jannis Note Added: 0014132
2012-10-22 09:08 nowhiskey Note Added: 0014133
2012-10-22 09:14 jannis Note Added: 0014134
2012-10-22 12:30 jannis Note Added: 0014137
2012-10-23 02:43 nowhiskey Note Added: 0014140
2013-01-04 16:12 jannis File Added: 0001-wiimote-port-the-wiimote-control-surface-to-Ardour-3.patch
2013-01-04 16:14 jannis Note Added: 0014428
2013-01-05 07:17 nowhiskey Note Added: 0014430
2013-01-05 09:11 nowhiskey Note Added: 0014431
2013-01-05 10:32 jannis Note Added: 0014432
2013-01-07 10:29 paul Note Added: 0014440
2013-01-07 10:29 paul Status confirmed => resolved
2013-01-07 10:29 paul Resolution open => fixed
2013-01-07 10:29 paul Assigned To => paul


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker