Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

windowExample froze on attempted exit #121

Open
quinkennedy opened this issue Jan 29, 2013 · 12 comments
Open

windowExample froze on attempted exit #121

quinkennedy opened this issue Jan 29, 2013 · 12 comments
Assignees
Labels

Comments

@quinkennedy
Copy link

I was running the windowExample in examples/utils and when I wanted to quit I hit Ctl+c

This caused the application to pause, but it is still displaying on screen and will not return me to the command prompt. If I hit enter, the text in the background moves up, but typing keys does nothing.

I ran the example straight from the CLI, I never started up xwindows.

rPI w/ 512 MB memory & 32 Gig SD card. USB mouse and keyboard.

@ghost ghost assigned bakercp Jan 29, 2013
@bakercp
Copy link
Member

bakercp commented Jan 29, 2013

Hey @quinkennedy thanks for the report. Does this happen consistently with the latest develop-raspberrypi branch or is it happening sporadically? Has it happened with any of the other examples for you?

So just a little background info -- when the ofAppEGLWindow starts up on the RPI, it caches the current terminal settings and then disables normal terminal input (i.e. echoing etc) so that the app gets the keystrokes and the terminal doesn't.

Normally, during shutdown, those cached terminal settings are restored, allowing you to see your terminal input, etc.

If for some reason the app didn't shut down completely, it is possible that those terminal settings didn't get applied, resulting in an invisible cursor and residual app on screen.

So, next step is to figure out how to reproduce the bug -- any other info you can provide is helpful!

@quinkennedy
Copy link
Author

I am using a dvorak keyboard, and noticed that hitting the key that maps to 'f' in dvorak didn't fullscreen the app, but hitting the key that corresponds to 'f' on the querty keyboard did toggle fullscreen. Could it be that when I hit Ctl+c in dvorak, the system killed the app, but the app itself interpreted the key combination as Ctl+i?

@bakercp
Copy link
Member

bakercp commented Jan 29, 2013

Yeah, it certainly could interpret it incorrectly as the window currently is not aware of any special keyboard mappings (although it seems like it should be picking up the same keyboard config as you set up in linux ... not sure about that). If you quit with the "real" Ctrl+c, does it quit correctly?

@bakercp
Copy link
Member

bakercp commented Jan 29, 2013

Just to clarify, the app won't directly interpret the Ctrl+i per se -- it will respond to the kill and other signals via sighandlers (i.e. signal(SIGINT, xxx) which I believe I added to ofAppRunner (I can't recall and can't look deeper right now). So, it may be possible that the signal handlers I installed are missing a signal and preventing the normal app shutdown sequence ...

Can you tell if the exit function in ofAppEGLWindow is being called?

@quinkennedy
Copy link
Author

sorry for pulling the trigger so soon, I can't reproduce.

@quinkennedy
Copy link
Author

though I can reproduce its not interpreting the 'f' key in dvorak.

@bakercp
Copy link
Member

bakercp commented Jan 29, 2013

If you are still having the issue, I'd like to get a little more clarification on the situation. Can you confirm that this is related to the keyboard hardware / linux interaction? Or do you think it is in the code? Basically, if there is a code bug, I want to figure out how to fix it. If it is just a RPi + unusual hardware config (i.e. w/ the dvorak keyboard), then I want to add a note to the FAQ / documentation in case people don't search the issues, etc.

If you think it is just a matter of the dvorak keys being interpreted incorrectly, I'd also like to add a note on that to the documentation.

Thanks for your help on this!

@bakercp bakercp reopened this Jan 29, 2013
@quinkennedy
Copy link
Author

well I tried running the application about ten more times, and did not encounter the freeze again. But the key mapping thing (used just for simple keyboard interaction, in this case, pressing 'f' to toggle fullscreen) is a consistent issue. I have encountered it in the past on various games and such in windows and osx, I don't remember testing the issue with Open Frameworks in specific before on other platforms.

@quinkennedy
Copy link
Author

I ran the windowExample under OSX 10.7.5 and it handled the dvorak mapping correctly.

@bakercp
Copy link
Member

bakercp commented Jan 29, 2013

Hey there, I'm still suspicious about the original hang, but perhaps at least we can figure out the dvorak issue.

Have you seen this post:

http://raspberrypi.org/phpBB3//viewtopic.php?f=27&t=12860

@danzeeeman
Copy link
Member

any updates? @quinkennedy @bakercp

@quinkennedy
Copy link
Author

no updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants