Forum › Forums › Official Releases › antiX-26 “Stephen Kapos” › antiX-26. Bugs, known issues and fixes › Reply To: antiX-26. Bugs, known issues and fixes
antiX control center> maintenance> antiX startup …..
when selecting first button (add startup app) , it opens appselect .
when clicking on anything in appselect menu , appselect hungs .
needs to use appkiller to terminate appselect.sorry I’m on my phone right now , and names of button maybe wrong .
not a huge bug , anyhow antiX stattup control center entry , can’t add apps to startup
This is an extremely strange issue to me… maybe I am missing something that someone else may notice.
The hang seems to be caused by the python print function, but only if the printed output is “caught”.
Examples to try in terminal:
app-select -s (does not hang, prints the app info)
app-select -s | cut -d "|" -f5 (as in the control centre app mentioned) (hangs)
output=*backtick*app-select -s*backtick* (hangs) *backtick* is the same as the forum code quote
output=$(app-select -s) (hangs)
Within app-select line 220 calls a function which in turn calls the python print function. If you comment out this function it will not hang. If you change the function to
Message.Error(str(appfilename)+'|'+str(appname)+'|'+str(appgname)+'|'+str(appexec)+'|'+str(appterm)+'|'+appcategories+'|'+str(iconinfo[1])+'|'+str(appdesc)+'|'+str(appkeywords), 1, True)
it does not hang (but also does not return the information to be caught). If you comment out the Message.Error test and change the line to
print('test')
it will hang. So the python print function seems to cause the hang. The only work around I can think of at the moment is to change the line to
os.system('echo "'+str(appfilename)+'|'+str(appname)+'|'+str(appgname)+'|'+str(appexec)+'|'+str(appterm)+'|'+appcategories+'|'+str(iconinfo[1])+'|'+str(appdesc)+'|'+str(appkeywords)+'"')
However that does not seem like the best way to solve this issue
Edit:
Seems that as the print function in python is buffered. The process to “catch” the output leaves an indefinite loop waiting for the buffer to close or fill. Changing line 65 in app-select from print(message) to print(message, flush=True) resolves the issue.
- This reply was modified 5 months, 2 weeks ago by Dave.
- This reply was modified 5 months, 2 weeks ago by Dave.
- This reply was modified 5 months, 2 weeks ago by Dave.
Computers are like air conditioners. They work fine until you start opening Windows. ~Author Unknown