mpogue2 / SquareDesk

Fully-featured music player and sequence designer, designed for square dance callers
10 stars 4 forks source link

SD Integration #211

Closed danlyke closed 6 years ago

danlyke commented 7 years ago

Related #31

This is all in the sd_integration branch. Issues left to be resolved:

danlyke commented 7 years ago

Just pushed a rough version that has pictures along with the text formations in the text output.

mpogue2 commented 7 years ago

Very cool! I just committed a change (9c74f5eed73d64ec4f3aff6012ce7b9e974aa079) to the sdintegration branch to allow it to compile and link on Mac OS X. It should now also compile and link on Windows, but I didn't test it on Windows. The Page tab comes up and displays the initial text, and an initial picture of a squared set. But, the SDthread crashes upon trying to do any input (when Enter is pressed), and unfortunately I don't have time to debug it this weekend.... Posting the stack trace here, in case it rings a bell while you're in there: Thread 9 Crashed:: SDThread 0 org.qt-project.QtCore 0x000000010765b37e QBasicMutex::unlockInternal() + 14 1 org.qt-project.QtCore 0x0000000107664007 QWaitCondition::wait(QMutex*, unsigned long) + 151 2 Zenstar.SquareDeskPlayer 0x000000010618e604 SquareDesk_iofull::EnterMessageLoop() + 100 (sdinterface.cpp:145) 3 Zenstar.SquareDeskPlayer 0x0000000106190320 SquareDesk_iofull::get_call_command() + 256 (sdinterface.cpp:505) 4 Zenstar.SquareDeskPlayer 0x000000010629f96b query_for_call() + 1595 (sdmain.cpp:815) 5 Zenstar.SquareDeskPlayer 0x00000001062a9ca4 ui_utils::run_program(iobase&) + 5668 (sdutil.cpp:3497) 6 Zenstar.SquareDeskPlayer 0x00000001062a0709 sdmain(int, char*, iobase&) + 1561 (sdmain.cpp:1108) 7 Zenstar.SquareDeskPlayer 0x0000000106192153 SDThread::run() + 163 (sdinterface.cpp:707) 8 org.qt-project.QtCore 0x0000000107662b3a QThreadPrivate::start(void) + 362 9 libsystem_pthread.dylib 0x00007fffcf8e793b _pthread_body + 180 10 libsystem_pthread.dylib 0x00007fffcf8e7887 _pthread_start + 286 11 libsystem_pthread.dylib 0x00007fffcf8e708d thread_start + 13

mpogue2 commented 7 years ago

Oh! I bet I know why you commented those variable names out. Lemme try to get rid of the warning message, while still allowing compilation on Mac OS X. This commit should do it: 263504f88c881c4dd14715e93896489e95f6e55f .

mpogue2 commented 7 years ago

Here's the debug output for the thread crash, in case it helps: SquareDesk_iofull::set_utils_ptr(ui_utils utils_ptr); SquareDesk_iofull::process_command_line(int argcp, char ***argvp); get_session_info: 0 0 SquareDesk_iofull::init_step(init_callback_state s, int n); final_level_query: 1 0 SquareDesk_iofull::init_step(init_callback_state s, int n); init_database1: 2 0 SquareDesk_iofull::init_step(init_callback_state s, int n); SquareDesk_iofull::fatal_error_exit(int code, Cstring s1=0, Cstring s2=0); SquareDesk_iofull::terminate(int code); init_database2: 3 0 SquareDesk_iofull::init_step(init_callback_state s, int n); calibrate_tick: 4 32 SquareDesk_iofull::init_step(init_callback_state s, int n); do_tick: 5 2 SquareDesk_iofull::init_step(init_callback_state s, int n); do_tick: 5 1 SquareDesk_iofull::init_step(init_callback_state s, int n); do_tick: 5 1 SquareDesk_iofull::init_step(init_callback_state s, int n); do_tick: 5 2 SquareDesk_iofull::init_step(init_callback_state s, int n); do_tick: 5 2 SquareDesk_iofull::init_step(init_callback_state s, int n); do_tick: 5 2 SquareDesk_iofull::init_step(init_callback_state s, int n); do_tick: 5 2 SquareDesk_iofull::init_step(init_callback_state s, int n); do_tick: 5 2 SquareDesk_iofull::init_step(init_callback_state s, int n); do_tick: 5 2 SquareDesk_iofull::init_step(init_callback_state s, int n); do_tick: 5 2 SquareDesk_iofull::init_step(init_callback_state s, int n); do_tick: 5 2 SquareDesk_iofull::init_step(init_callback_state s, int n); do_tick: 5 2 SquareDesk_iofull::init_step(init_callback_state s, int n); do_tick: 5 2 SquareDesk_iofull::init_step(init_callback_state s, int n); do_tick: 5 2 SquareDesk_iofull::init_step(init_callback_state s, int n); do_tick: 5 2 SquareDesk_iofull::init_step(init_callback_state s, int n); do_tick: 5 2 SquareDesk_iofull::init_step(init_callback_state s, int n); do_tick: 5 2 SquareDesk_iofull::init_step(init_callback_state s, int n); tick_end: 6 0 SquareDesk_iofull::init_step(init_callback_state s, int n); do_accelerator: 7 0 SquareDesk_iofull::init_step(init_callback_state s, int n); SquareDesk_iofull::final_initialize(); SquareDesk_iofull::set_window_title(char s[]); ShowListBox( -1 ) In new line QThread(0x7fbf54c311a0) / QThread(0x7fbf54c311a0) In new line QThread(0x7fbf54c311a0) / QThread(0x7fbf54c311a0) In new line QThread(0x7fbf54c311a0) / QThread(0x7fbf54c311a0) In new line QThread(0x7fbf54c311a0) / QThread(0x7fbf54c311a0) In new line QThread(0x7fbf54c311a0) / QThread(0x7fbf54c311a0) In new line QThread(0x7fbf54c311a0) / QThread(0x7fbf54c311a0) In new line QThread(0x7fbf54c311a0) / QThread(0x7fbf54c311a0) In new line QThread(0x7fbf54c311a0) / QThread(0x7fbf54c311a0) In new line QThread(0x7fbf54c311a0) / QThread(0x7fbf54c311a0) In new line QThread(0x7fbf54c311a0) / QThread(0x7fbf54c311a0) In new line QThread(0x7fbf54c311a0) / QThread(0x7fbf54c311a0) In new line QThread(0x7fbf54c311a0) / QThread(0x7fbf54c311a0) In new line QThread(0x7fbf54c311a0) / QThread(0x7fbf54c311a0) In new line QThread(0x7fbf54c311a0) / QThread(0x7fbf54c311a0) In new line QThread(0x7fbf54c311a0) / QThread(0x7fbf54c311a0) In new line QThread(0x7fbf54c311a0) / QThread(0x7fbf54c311a0) In new line QThread(0x7fbf54c311a0) / QThread(0x7fbf54c311a0) In new line QThread(0x7fbf54c311a0) / QThread(0x7fbf54c311a0) In new line QThread(0x7fbf54c311a0) / QThread(0x7fbf54c311a0) In new line QThread(0x7fbf54c311a0) / QThread(0x7fbf54c311a0) In new line QThread(0x7fbf54c311a0) / QThread(0x7fbf54c311a0) In new line QThread(0x7fbf54c311a0) / QThread(0x7fbf54c311a0) In new line QThread(0x7fbf54c311a0) / QThread(0x7fbf54c311a0) In new line QThread(0x7fbf54c311a0) / QThread(0x7fbf54c311a0) In new line QThread(0x7fbf54c311a0) / QThread(0x7fbf54c311a0) In new line QThread(0x7fbf54c311a0) / QThread(0x7fbf54c311a0) In new line QThread(0x7fbf54c311a0) / QThread(0x7fbf54c311a0) In new line QThread(0x7fbf54c311a0) / QThread(0x7fbf54c311a0) on_sd_set_window_title: "all" on_sd_update_status_bar: "" Double click: "heads 1p2p" Return pressed, command is: "heads 1p2p" SquareDesk_iofull::terminate(int code); SquareDesk_iofull::get_call_command(); ShowListBox( 11 ) The program has unexpectedly finished.

danlyke commented 7 years ago

Stack trace is totally weird, because that suggests some memory issue related to the mutex? That should be owned by the thread object, and that's not getting deallocated.

Counting up the enum call_list_kind in sdbase.h, the ShowListBox(11) is indeed call_list_lin, so from that debug trace it looks like the 'heads 1p2p' command got far enough that SD should have populated the list box with lines, and then something triggered the command input condition variable again, and the crash happened there...

danlyke commented 7 years ago

Oh, and sorry about commenting out those unused variable names, I had an Emacs macro running to help me with sdinterface.cpp, and must have run it elsewhere too...

danlyke commented 7 years ago

Hmmmm... Maybe check my signal handling? Possibly I've goofed something up in the cross-thread signals and that check box population hit a race condition? Specifically, I'm wondering why the ::terminate call in the debug trace.

danlyke commented 7 years ago

Huh, and looking at the code right now this may be that the Mach kernel is smarter about who owns locks. Trying to refactor that now...

danlyke commented 7 years ago

Try 0f849256a559571fee9230b9182bf50ed35b2a23, that manages the lock a little differently.

mpogue2 commented 7 years ago

Nope, still crashes at the same place. Here's a bit more information:

When I start the app, it looks like something is already terminating:

SquareDesk_iofull::set_utils_ptr(ui_utils *utils_ptr);
SquareDesk_iofull::process_command_line(int *argcp, char ***argvp);
get_session_info:  0   0
SquareDesk_iofull::init_step(init_callback_state s, int n);
final_level_query:  1   0
SquareDesk_iofull::init_step(init_callback_state s, int n);
init_database1:  2   0
SquareDesk_iofull::init_step(init_callback_state s, int n);
SquareDesk_iofull::fatal_error_exit(int code, Cstring s1=0, Cstring s2=0);
SquareDesk_iofull::terminate(int code);
init_database2:  3   0
SquareDesk_iofull::init_step(init_callback_state s, int n);
calibrate_tick:  4   32
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_tick:  5   2
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_tick:  5   1
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_tick:  5   1
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_tick:  5   2
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_tick:  5   2
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_tick:  5   2
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_tick:  5   2
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_tick:  5   2
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_tick:  5   2
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_tick:  5   2
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_tick:  5   2
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_tick:  5   2
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_tick:  5   2
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_tick:  5   2
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_tick:  5   2
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_tick:  5   2
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_tick:  5   2
SquareDesk_iofull::init_step(init_callback_state s, int n);
tick_end:  6   0
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_accelerator:  7   0
SquareDesk_iofull::init_step(init_callback_state s, int n);
SquareDesk_iofull::final_initialize();
SquareDesk_iofull::set_window_title(char s[]);
In new line  QThread(0x7fb77743e750) / QThread(0x7fb77743e750)
In new line  QThread(0x7fb77743e750) / QThread(0x7fb77743e750)
In new line  QThread(0x7fb77743e750) / QThread(0x7fb77743e750)
In new line  QThread(0x7fb77743e750) / QThread(0x7fb77743e750)
In new line  QThread(0x7fb77743e750) / QThread(0x7fb77743e750)
In new line  QThread(0x7fb77743e750) / QThread(0x7fb77743e750)
In new line  QThread(0x7fb77743e750) / QThread(0x7fb77743e750)
In new line  QThread(0x7fb77743e750) / QThread(0x7fb77743e750)
In new line  QThread(0x7fb77743e750) / QThread(0x7fb77743e750)
In new line  QThread(0x7fb77743e750) / QThread(0x7fb77743e750)
In new line  QThread(0x7fb77743e750) / QThread(0x7fb77743e750)
In new line  QThread(0x7fb77743e750) / QThread(0x7fb77743e750)
In new line  QThread(0x7fb77743e750) / QThread(0x7fb77743e750)
In new line  QThread(0x7fb77743e750) / QThread(0x7fb77743e750)
In new line  QThread(0x7fb77743e750) / QThread(0x7fb77743e750)
In new line  QThread(0x7fb77743e750) / QThread(0x7fb77743e750)
In new line  QThread(0x7fb77743e750) / QThread(0x7fb77743e750)
In new line  QThread(0x7fb77743e750) / QThread(0x7fb77743e750)
In new line  QThread(0x7fb77743e750) / QThread(0x7fb77743e750)
In new line  QThread(0x7fb77743e750) / QThread(0x7fb77743e750)
In new line  QThread(0x7fb77743e750) / QThread(0x7fb77743e750)
In new line  QThread(0x7fb77743e750) / QThread(0x7fb77743e750)
In new line  QThread(0x7fb77743e750) / QThread(0x7fb77743e750)
In new line  QThread(0x7fb77743e750) / QThread(0x7fb77743e750)
In new line  QThread(0x7fb77743e750) / QThread(0x7fb77743e750)
In new line  QThread(0x7fb77743e750) / QThread(0x7fb77743e750)
In new line  QThread(0x7fb77743e750) / QThread(0x7fb77743e750)
In new line  QThread(0x7fb77743e750) / QThread(0x7fb77743e750)
on_sd_set_window_title:  "all"
on_sd_update_status_bar:  "<startup>"

// I haven't typed anything so far.  Now I type "heads start", and when I 
//   hit Enter, this comes out.  But, notice that I already got a terminate()
//   earlier, too...

Return pressed, command is:  "heads start"
SquareDesk_iofull::terminate(int code);
SquareDesk_iofull::get_call_command();
The program has unexpectedly finished.

Here is the stack trace, which I only get AFTER I type "heads start ENTER":

Thread 10 Crashed:: SDThread
0   org.qt-project.QtCore           0x000000010af5337e QBasicMutex::unlockInternal() + 14
1   org.qt-project.QtCore           0x000000010af5c007 QWaitCondition::wait(QMutex*, unsigned long) + 151
2   Zenstar.SquareDeskPlayer        0x0000000109b2884e SquareDesk_iofull::EnterMessageLoop() + 94 (sdinterface.cpp:145)
3   Zenstar.SquareDeskPlayer        0x0000000109b2a470 SquareDesk_iofull::get_call_command() + 256 (sdinterface.cpp:505)
4   Zenstar.SquareDeskPlayer        0x0000000109c39a4b query_for_call() + 1595 (sdmain.cpp:815)
5   Zenstar.SquareDeskPlayer        0x0000000109c43d84 ui_utils::run_program(iobase&) + 5668 (sdutil.cpp:3497)
6   Zenstar.SquareDeskPlayer        0x0000000109c3a7e9 sdmain(int, char**, iobase&) + 1561 (sdmain.cpp:1108)
7   Zenstar.SquareDeskPlayer        0x0000000109b2c2d3 SDThread::run() + 179 (sdinterface.cpp:709)
8   org.qt-project.QtCore           0x000000010af5ab3a QThreadPrivate::start(void*) + 362
9   libsystem_pthread.dylib         0x00007fffcf8e793b _pthread_body + 180
10  libsystem_pthread.dylib         0x00007fffcf8e7887 _pthread_start + 286
11  libsystem_pthread.dylib         0x00007fffcf8e708d thread_start + 13
danlyke commented 7 years ago

Hmmm... that fatal_error_exit code should probably be printed out, I bet there's useful data there. Chances it can't find the sd_calls.dat file?

Or that that's architecture dependent and the version I checked in doesn't work cross-platform?

danlyke commented 7 years ago

I just pushed 324b81ea53764ee98bfc368cbdb66d89f3e853f2 with some changes to the fatal_error_exit debug logging, I suspect it's not finding sd_calls.dat, but that should tell us more.

mpogue2 commented 7 years ago

I think it's finding it.. :-)

SquareDesk_iofull::fatal_error_exit( 1 , Database format version (331) is not the required one (341) , You must recompile the database. );

OK, how do I recompile the database?

Mike

danlyke commented 7 years ago

Huh. The sd_calls.dat that I checked in should be the one for 341.

Anyway, in ../sdlib run mkcalls and copy the sd_calls.dat from that over into ../test123.

And we should make generation of this part of the build process.

Dan

danlyke commented 7 years ago

oh, except you'll probably have to compile the mkcalls for your platform, because the .pro file doesn't do that. Sigh.

mpogue2 commented 7 years ago

OK, sd_calls.dat was being copied from the SD directory, not from the test123 directory on Mac. I fixed that in the .pro file, as 6c4825fdcf2e6dc66868cc10fc59df0eb674a826 . That error message is gone now. But, I still get the crash at the same place.

SquareDesk_iofull::set_utils_ptr(ui_utils *utils_ptr);
SquareDesk_iofull::process_command_line(int *argcp, char ***argvp);
get_session_info:  0   0
SquareDesk_iofull::init_step(init_callback_state s, int n);
final_level_query:  1   0
SquareDesk_iofull::init_step(init_callback_state s, int n);
init_database1:  2   0
SquareDesk_iofull::init_step(init_callback_state s, int n);
init_database2:  3   0
SquareDesk_iofull::init_step(init_callback_state s, int n);
calibrate_tick:  4   32
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_tick:  5   2
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_tick:  5   1
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_tick:  5   1
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_tick:  5   2
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_tick:  5   2
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_tick:  5   2
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_tick:  5   2
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_tick:  5   2
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_tick:  5   2
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_tick:  5   2
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_tick:  5   2
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_tick:  5   2
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_tick:  5   2
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_tick:  5   2
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_tick:  5   2
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_tick:  5   2
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_tick:  5   2
SquareDesk_iofull::init_step(init_callback_state s, int n);
tick_end:  6   0
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_accelerator:  7   0
SquareDesk_iofull::init_step(init_callback_state s, int n);
SquareDesk_iofull::final_initialize();
In new line  QThread(0x7fad08e11c00) / QThread(0x7fad08e11c00)
In new line  QThread(0x7fad08e11c00) / QThread(0x7fad08e11c00)
SquareDesk_iofull::set_window_title(char s[]);
In new line  QThread(0x7fad08e11c00) / QThread(0x7fad08e11c00)
In new line  QThread(0x7fad08e11c00) / QThread(0x7fad08e11c00)
In new line  QThread(0x7fad08e11c00) / QThread(0x7fad08e11c00)
In new line  QThread(0x7fad08e11c00) / QThread(0x7fad08e11c00)
In new line  QThread(0x7fad08e11c00) / QThread(0x7fad08e11c00)
In new line  QThread(0x7fad08e11c00) / QThread(0x7fad08e11c00)
In new line  QThread(0x7fad08e11c00) / QThread(0x7fad08e11c00)
In new line  QThread(0x7fad08e11c00) / QThread(0x7fad08e11c00)
In new line  QThread(0x7fad08e11c00) / QThread(0x7fad08e11c00)
In new line  QThread(0x7fad08e11c00) / QThread(0x7fad08e11c00)
In new line  QThread(0x7fad08e11c00) / QThread(0x7fad08e11c00)
In new line  QThread(0x7fad08e11c00) / QThread(0x7fad08e11c00)
In new line  QThread(0x7fad08e11c00) / QThread(0x7fad08e11c00)
In new line  QThread(0x7fad08e11c00) / QThread(0x7fad08e11c00)
In new line  QThread(0x7fad08e11c00) / QThread(0x7fad08e11c00)
In new line  QThread(0x7fad08e11c00) / QThread(0x7fad08e11c00)
In new line  QThread(0x7fad08e11c00) / QThread(0x7fad08e11c00)
In new line  QThread(0x7fad08e11c00) / QThread(0x7fad08e11c00)
In new line  QThread(0x7fad08e11c00) / QThread(0x7fad08e11c00)
In new line  QThread(0x7fad08e11c00) / QThread(0x7fad08e11c00)
In new line  QThread(0x7fad08e11c00) / QThread(0x7fad08e11c00)
In new line  QThread(0x7fad08e11c00) / QThread(0x7fad08e11c00)
In new line  QThread(0x7fad08e11c00) / QThread(0x7fad08e11c00)
In new line  QThread(0x7fad08e11c00) / QThread(0x7fad08e11c00)
In new line  QThread(0x7fad08e11c00) / QThread(0x7fad08e11c00)
In new line  QThread(0x7fad08e11c00) / QThread(0x7fad08e11c00)
on_sd_set_window_title:  "all"
on_sd_update_status_bar:  "<startup>"
Return pressed, command is:  "heads start"
SquareDesk_iofull::terminate(int code);
SquareDesk_iofull::get_call_command();
The program has unexpectedly finished.
danlyke commented 7 years ago

In the "how did that ever work" department, try 3a2d966c96fb4de2036aa3c9603ec4402f4bd8ab for the Mac crash.

mpogue2 commented 7 years ago

Nope, same symptom:

Thread 8 Crashed:: SDThread
0   org.qt-project.QtCore           0x000000010b49637e QBasicMutex::unlockInternal() + 14
1   org.qt-project.QtCore           0x000000010b49f007 QWaitCondition::wait(QMutex*, unsigned long) + 151
2   Zenstar.SquareDeskPlayer        0x000000010a073e6e SquareDesk_iofull::EnterMessageLoop() + 94 (sdinterface.cpp:146)
3   Zenstar.SquareDeskPlayer        0x000000010a075b70 SquareDesk_iofull::get_call_command() + 256 (sdinterface.cpp:506)
4   Zenstar.SquareDeskPlayer        0x000000010a184bdb query_for_call() + 1595 (sdmain.cpp:815)
5   Zenstar.SquareDeskPlayer        0x000000010a18ef14 ui_utils::run_program(iobase&) + 5668 (sdutil.cpp:3497)
6   Zenstar.SquareDeskPlayer        0x000000010a185979 sdmain(int, char**, iobase&) + 1561 (sdmain.cpp:1108)
7   Zenstar.SquareDeskPlayer        0x000000010a077a03 SDThread::run() + 179 (sdinterface.cpp:710)
8   org.qt-project.QtCore           0x000000010b49db3a QThreadPrivate::start(void*) + 362
9   libsystem_pthread.dylib         0x00007fffcf8e793b _pthread_body + 180
10  libsystem_pthread.dylib         0x00007fffcf8e7887 _pthread_start + 286
11  libsystem_pthread.dylib         0x00007fffcf8e708d thread_start + 13

Application output:

SquareDesk_iofull::set_utils_ptr(ui_utils *utils_ptr);
SquareDesk_iofull::process_command_line(int *argcp, char ***argvp);
get_session_info:  0   0
SquareDesk_iofull::init_step(init_callback_state s, int n);
final_level_query:  1   0
SquareDesk_iofull::init_step(init_callback_state s, int n);
init_database1:  2   0
SquareDesk_iofull::init_step(init_callback_state s, int n);
init_database2:  3   0
SquareDesk_iofull::init_step(init_callback_state s, int n);
calibrate_tick:  4   32
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_tick:  5   2
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_tick:  5   1
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_tick:  5   1
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_tick:  5   2
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_tick:  5   2
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_tick:  5   2
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_tick:  5   2
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_tick:  5   2
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_tick:  5   2
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_tick:  5   2
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_tick:  5   2
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_tick:  5   2
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_tick:  5   2
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_tick:  5   2
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_tick:  5   2
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_tick:  5   2
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_tick:  5   2
SquareDesk_iofull::init_step(init_callback_state s, int n);
tick_end:  6   0
SquareDesk_iofull::init_step(init_callback_state s, int n);
do_accelerator:  7   0
SquareDesk_iofull::init_step(init_callback_state s, int n);
SquareDesk_iofull::final_initialize();
SquareDesk_iofull::set_window_title( all );
on_sd_set_window_title:  "all"
on_sd_update_status_bar:  "<startup>"
Double click:  "heads start"
Return pressed, command is:  "heads start"
SquareDesk_iofull::get_call_command();
The program has unexpectedly finished.
danlyke commented 7 years ago

The terminate() call is gone now (that was what the last thing I checked in fixed).

Okay, a crash in the condition variable unlock... The obvious possibilities:

danlyke commented 7 years ago

Maybe 82ede88a30bc658370d3ca7092f033da1b644f6c ?

mpogue2 commented 7 years ago

YES! I get a beep every time I enter something, but no crash anymore! Congrats on finding this! I now return you to your regularly scheduled program, already in progress.

danlyke commented 7 years ago

Huh. I don't know what the beep would be telling you...

But if you do a

heads start square thru 4

or whatever your should see things. I'm trying to figure out the SD internals a little more to better populate and filter the list (and add some level control).

danlyke commented 7 years ago

This may feel more broken than not, but 687026e3d2404404b3701a857d7f15000c580745 limits the available calls to the level in a pulldown list. This is broken, because the list isn't getting repopulated when the pulldown changes. Also, the pull-down should be saved and restored...

mpogue2 commented 7 years ago

I'm not seeing any limiting on Mac OS X. All the Challenge level calls show up all the time, regardless of the pulldown setting, even after restarting the app.

Hmmm...Is it backwards, maybe? I have Plus selected, and I don't see any Plus calls in the list on the lower right. They all seem to work when typed in though...

Not sure whether you want me to report any bugs at this point...it's still a diamond in the rough, and you're making great progress...So I will compile it on Mac OS X from time to time, just to make sure that it continues to run there, but I'll let you focus on what you want to focus on!

danlyke commented 7 years ago

Yeah, call limiting is still weird, and I'm not sure how to solve that. One possibility might be to get better about stopping and restarting the sd engine (I still have to work out the state machine to get that right on shutdown)

I might have it backwards, I'll play with it more.

Bugs are great, but don't go down rabbit holes unless you wanna chase code too (which would be awesome!).

I think the main thing is that it's running on the Mac now. That means I've got that condition variable thing worked out. That's a good start.

danlyke commented 7 years ago

Mike, if you want to take another look at this, I've gotten a bunch further, I think.

Still not totally sure which signals and slots are getting dispatched in which threads, but I've done some state machine crap to work around that.

danlyke commented 7 years ago

In fact, I think it's to the point where, except for saving (which should "just work"), it's easier for me to fire up SquareDesk than sdtty. Something I've been thinking about: Another list view that contains the current sequence (separate from the scrollback buffer), with controls that let us copy from that into the paste buffer, and into an SD tab for organizing choreo. Might do this with a second tab on the scrollback buffer...

danlyke commented 7 years ago

Status: Huh, I thought I'd fixed more than this...

danlyke commented 7 years ago

Pushed some initial code for tab completion, I'm not grabbing the keypress correctly...

mpogue2 commented 7 years ago

OK, I took another look...interesting things are happening! Seems to not crash on Mac OS X, which is good. I like the direction that the Current Sequence window is going, although the dolls could be bigger (they are dots right now :-). Call column has text in it still, and there seems to always be an extra blank call at the end of the list. Level dropdown seems to still not be hooked up, although it seems partially hooked up (Plus seems to mean Plus-only plus a lot of C-something (maybe these are the concepts?), whereas I think it should probably mean Plus-and-below-with-no-C-level-calls, or at least that should be the default).

Lots of warnings for the sd code -- I suspect they can be cleaned up later (unless they indicate real bugs now).

Yeah, I like the idea of an internal database, with import/merge/export capability.

You probably already know about these -- I suspect they are not Mac-specific...keep going!

danlyke commented 7 years ago

Level drop-down: Yeah, all concepts are available right now. I need to figure out how to filter concepts, it'll probably mean another dropdown or checkbox. I like having all concepts because often at Plus sometimes I need to force SD to do interesting things, but SD does "toggle concept levels" to turn those on and off. I'll see what I can do.

Larger dolls: Yes, and(/or?) I need add (double-)click to do the blow-up in the main formation window. Also need to figure out where we're gonna put the transport controls for playback... Maybe those can go to the right of the sequence, though I do need to widen out the call name (and change the headers).

Blank at the end of the list: Yes, that's the sd prompt for the latest empty call (ie: If you look at the "SD Output" subtab, it's got the same thing.... I can probably filter that...

Warnings in SD: Part of my goal here has been to not change the SD source code. I'm happy to push SD changes back up to William Ackerman, but I really want us to be able to keep up with his changes to SD without having a complex merge process.

Internal database - I think the first question is: When is this better enough than the current mechanism for dealing with SD that we should switch to it? I suppose we need the voice recognition, and I need the "?" and "!" behavior.

mpogue2 commented 7 years ago

Concept-levels: I'd be in favor of a persistent checkbox option to turn them on/off. I think most people will probably want them off, and if they are like you, it's just one click to persist it the other way.

Dolls: I like the graphical display of the one that's in there now, rather than the default SD one, which I find quite hard to read. There are several options for coloring and numbering, which I'd like to retain, too. I'd be OK with adding a "Sd Colors" option, if you really like the sd colors. I wouldn't hold replacement for OpenGL-ifying it for scaling, unless you really want to do it now....I think it would be fine to scale better later. Same for 3D...it's cute, but I don't think it's key.

Warnings: I'm tempted to make the changes to deal with the warnings, and give them back to Bill A. I think they would probably merge well with future versions. Some of the warnings were scary, but that could just be the compiler being cautious. There were a lot of them, and they were mostly the same problem over and over, as I recall.

Internal database: Yep, I'd like to see us reach parity with the one we have currently (or better! I know you have already surpasses the current one in some areas), and then I'd be in favor of switching over entirely at that point (rather than trying to maintain both for some period of time). I haven't really looked at how the new one ties in -- the hard part will probably be the stuff you've already called out (dealing with the keyboard and errors), and the voice recognition part (although the latter is just a virtual keyboard -- it doesn't do anything funky like change the grammar on-the-fly)... It would be nice if there were a better way to back out of what the VUI did, when it does it wrong. Noise pickup is a problem with PocketSphinx...I have a workaround (noise gate using SoundFlower), but it's not trivial to setup.

danlyke commented 7 years ago

Okay, added command and concept filtering options and some "!" and "?" handling. Turns out I wasn't toggling all concept levels on, just showing whatever concepts were available at the current level. And you can still type things, they just don't show up in the menu...

I changed to your colors, which means we definitely have to figure out how to get the circles anti-aliased, because they look awful.

When you say "back out of what the VUI did when it goes wrong", do you mean "undo"? Because we can easily undo, and the output of that will be shown in the "SD Output" tab, but the "Sequence" tab will just continue to be what it is...

danlyke commented 7 years ago

Okay, dolls are now anti-aliased in b97e9d262222e849eca62cfd23267dcdf88ee672 , still need to do a background (which I think will help with the centering).

mpogue2 commented 7 years ago

Looking much better! I am looking forward to getting the background grid back, too...the current code implements it nicely, so it might be close to cut-paste.

Comments:

OK, that's a lot of comments...let me know what you think...the new version is coming along nicely! (and it still seems quite stable on Mac OS X!)

danlyke commented 6 years ago

Awesome, thanks for the list!

Random notes:

Lots of "yep, need to fix that"s.

"?" and "!" behavior: yeah, currently you have to hit enter to get the same behavior as that key alone, I need to just detect one of those trailing in the text box and send it to the SD thread if that happens.

Double-clicking commands and auto-enter: Wasn't sure how to handle the "" or "" cases with that. Maybe pop up a subsidiary dialog?

On "the boat" and "press ahead": I'm just working off the bits and flags I've found so far for levels and concepts. I know I use "press ahead" and "press back" all the time at Plus, and I believe those don't need concepts toggled to use. Example "just as they are / all 4 ladies chain 3/4 / heads press ahead / heads pass the ocean".

Re ABC: Maybe using the formation and the Sequence list is a better layout for this, I'll play with some ideas: I'm getting a "window title" and a "status bar" from SD, that may be enough to work from.

(There's also something wonky where the Sequence list isn't getting updated immediately sometimes. And, yes, it needs some double-clicky action, and we're gonna have to figure out where to put transport controls when we start animating stuff...)

Re background grid: I like it, just, A, haven't gotten there yet, and B, haven't done the arithmetic to make sure it's going to show up in the right place given how I'm calculation locations from the drawings.

danlyke commented 6 years ago

Re moving the formation label back into the graphics pane: Is that going to be large enough to be readable in the thumbnails? Or is that just gonna end up visual clutter? trying to decide if it's worth trying...

danlyke commented 6 years ago
danlyke commented 6 years ago

These are... well... not sure how we're gonna solve 'em, 'cause this is SD being SD:

Okay, back to our normal show:

danlyke commented 6 years ago

Oh, maybe way to approach AB&C above is to make the SD pane secondary, rather than primary? Or do some other sort of filtering, perhaps.

mpogue2 commented 6 years ago

Making great progress...all compiles on Mac OS X with no crashes...couple more things I noticed:

danlyke commented 6 years ago

Press Ahead Yeah, I don't call it, I use it in SD to account for lack of square "breathing". Like some of the concepts where things like "boys, in your diamond" can be told to a square, but you've gotta be really explicit in SD. Double click calls fixed in 0d742511d3752e5d69f57c112abb01918232e31b Designators & Searching Hmmm... understanding designators and specifiers is the next level, I guess... Error Handling yeah, time to figure out something new here. SD Pane secondary I guess what I meant was focus on making the "Current Sequence" more usable rather than the "SD Output" pane. Kind of make the "SD Output" pane the superuser "I'd really rather be using SD directly" model of interaction. Background Grid f65d6cf450ca5fc0c57511ddbe0b85e93e9250ff Dancers inside their grid boxes 342b0c26c03e4786be66c7e4bbd5720f31752ce8 but ugh, SD uses variable spacing for dancers depending on formation, so this is broken and needs further fixing. Dancer numbering Hmmm... I'll try to figure out how to pull the dancer number out of the rotation transform but leave it in the translation transform. Or unrotate it... "(any setup)" is an SD term.

mpogue2 commented 6 years ago
danlyke commented 6 years ago

Just did an update to checker spacing. Interesting how tidal waves fell out of that, and I'm not sure I hate it.

danlyke commented 6 years ago

025b79d9305ba5dcf4a01c62d501ea3792e5d38c focus to text input field 38e7b37e86074caf0ece4aefe1e271767f276208 removing selectors ('boys', 'side corners', etc) before tab completion and call list filtering bdffc593dba70350c3e820acf38d48f91e63e408 fixing the formation name from the previous call issue

danlyke commented 6 years ago

Check again on scrollbars, s'il vous plait. I know there's more designer UI magic that needs to occur, but I think the playing field is now smaller than the control minimum size. Should solve that problem.

If the goal is to be able to double-click through a sequence, I'm not sure where to put specifiers. Put them in the side box and some double clicks cause an automated enter and some don't? Make another box for modifiers? And how much trying to build a whole new UI on top of SD is minimum viable product?

And trying to track all of my lists here, I'm almost ready to say it's time to break these things out into separate issues...

danlyke commented 6 years ago

Okay, I think this is the current state of fixability, first the things that may or may not be blockers from making this the primary way to use SD within SquareDesk, or are relatively easy:

For later:

Additions? Other suggestions?

mpogue2 commented 6 years ago

Wow, a lot of good stuff happening here...

If you want to move to individual Issues, instead of making #211 the largest Issue in the universe, I'm cool with that... whenever you're ready... :-)

danlyke commented 6 years ago

Okay, I think I've got your "bunch of random calls" "extra small picture" fixed (not sure what I did, but it seems like there's some bounds scaling that got fixed when I made the dancer numbers upright).

I do have a problem with "heads start; swing thru": That's currently way wide. So, yeah, I think I need to figure out how to auto-scale the scene view.

danlyke commented 6 years ago

A couple of tweaks: