After running my program, it fails and gives my terminal strange characters that I ca
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
After running my program, it fails and gives my terminal strange characters that I ca
The problem in detail: I am making a game, the loads a bunch of images except for some reason, one image fails even though it is the same as the others. Well that is the not problem, (or it could be) the problem is after it fails, it kicks me back to my command line, except it wierd characters. Here is what it looks like:
I'm pretty confident you guys can see the last characters. I cannot change it, because I dont' know how, except by restarting the terminal. Anyways, what should I do? Is this something that is programming related? or terminal related?
Looks like your spacecarnage program sent some binary garbage out to the terminal, which just coincidently happened to throw your terminal into an alternate graphics mode. You get this type of behavior frequently when you do something like "cat <binary_file>". Terminals don't like displaying binary data.
You can sometimes, very rarely, recover by typing "stty sane" at the command line. You won't see these words appear as you type them - you'll see weird characters displayed instead. Just type blindly and accurately.
This probably won't work. So you kill the terminal and start a new one, just like you're doing now.
The real fix is to debug your spacecarnage program and stop it from sending binary data out to the terminal.
Thank for you the responses, and I have fixed my game. I don't know exactly where the problemed stemed, but it was just a declaring of a new struct object but without initializing any variable with information. So SDL_GetError() might have had something to do with outputting gibberish, but don't take a newbxorx word for it. Again thanks for the help guys, those commands can help me.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.