rualark / MGenPortal

Web interface to MGen, allowing to analyze, correct and perform music
http://artportal.su/ctools
GNU Affero General Public License v3.0
3 stars 0 forks source link

Wrong MIDI file is processed in MP1 job #34

Closed rualark closed 6 years ago

rualark commented 6 years ago

When running job 135 with file 13, really file 12 is processed:

j_id  s_id  j_added              j_started            j_duration  j_priority  j_type  j_class  j_progress                                   j_state  j_result  f_id  j_folder                j_timeout  j_timeout2  j_engrave  j_render  j_deleted  
135   1     2017-12-12 10:46:14  2017-12-12 17:47:09  30          1           MP1     2        Success                                      3        0         13    jobs/2017/12-12/1-135/  300        340         0          600       0          

In server/midi/.mid file is correct But in job folder resulting .midi file is wrong

This means that wrong file is fed during MGen run. Configuration file is correct in configs/GenMP1/

This can happen due to wrong MGen run command.

Solution: log MGen run command.

Checked run command, it is correct: image

Yet I see that other config was loaded: image

10:39:42 Started MGen version v2.9-85-g8157434-dirty 10:39:42 Started generator: MIDI file viewer/player 10:39:42 LoadConfigFile loaded 11 lines from configs\GenMP1\known-cp1.pl

Server log: 2017-12-12 10:38:16 Taking job #131: MP1, jobs\2017\12-12\1-131\known-cp1.mid (priority 1) 2017-12-12 10:38:18 Starting render... 2017-12-12 10:38:54 Success 2017-12-12 10:39:41 Taking job #132: MP1, jobs\2017\12-12\1-132\known-cp1.mid (priority 1) 2017-12-12 10:39:43 Starting render... 2017-12-12 10:40:11 Success 2017-12-12 10:46:25 Taking job #135: MP1, jobs\2017\12-12\1-135\test-cp3.mid (priority 1) 2017-12-12 10:46:26 Starting render... 2017-12-12 10:46:54 Success 2017-12-12 17:47:12 Taking job #135: MP1, jobs\2017\12-12\1-135\test-cp3.mid (priority 1) 2017-12-12 17:47:13 Starting render... 2017-12-12 17:47:41 Success 2017-12-12 19:59:44 Started MGenServer in current dir: S:\app\MGen\MGen 2017-12-12 19:59:44 LoadConfig loaded 25 lines from server\server.pl 2017-12-12 19:59:56 Taking job #135: MP1, jobs\2017\12-12\1-135\test-cp3.mid (priority 1) 2017-12-12 19:59:56 Starting MGen.exe -job=300 configs\GenMP1\test-cp3.pl 2017-12-12 19:59:57 Starting render... 2017-12-12 20:00:04 Success

rualark commented 6 years ago

Server log confirms that wrong files were copied, probably because autosave.txt was not updated

Autosave.txt shows wrong autosave: image

While real last autosave is different: image

rualark commented 6 years ago

This means that autosave is not updated

Autosave is created on GENFINISH message:

LRESULT CMainFrame::OnGenFinish(WPARAM wParam, LPARAM lParam) { if (wParam == 0) { if (m_state_play == 0) ::KillTimer(m_hWnd, TIMER1); GetActiveView()->Invalidate(); WriteLog(0, "Generation finished"); m_state_gen = 2; GetActiveDocument()->SetTitle(m_fname); // Export last autosave name DeleteFile("log\autosave.txt"); CGLib::AppendLineToFile("log\autosave.txt", m_dir + "\n"); CGLib::AppendLineToFile("log\autosave.txt", m_fname + "\n");

rualark commented 6 years ago

Now I will check that autosave.txt is created with wrong data or not created at all.

rualark commented 6 years ago

I deleted autosave.txt and now file is created correctly

rualark commented 6 years ago

To resolve this issue I added deleting autosave.txt file from MGenServer. Not sure if this fixes problem completely, but it does not occur any more.