Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 10-10-2012, 07:39 PM   #1
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Exclamation Tell if your SDL application is hung for "mysterious" VT reasons

Is your SDL app just stopped producing video? no obvious reason?

check your strace log

Quote:
ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
2686 write(1, "V_InitMode: using 8 bit video mo"..., 35) = 35
2686 ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
2686 write(1, "I_SetRes: Using resolution 592x8"..., 35) = 35
2686 ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
2686 ioctl(4, VT_GETSTATE, 0xbe9f9a5c) = 0

2686 ioctl(4, VT_ACTIVATE, 0x1) = 0
2686 ioctl(4, VT_WAITACTIVE, 0x1) = ?
if you have it hanging like this? it appears to be something to do with not handling signals gracefully on exit. It's an artefact of no proper event handling within the parent application, leaving SDL in an interim state.

Best bet is to simply shutdown -r now. SDL will now work again.

To actually fix the issue more permanently:
Quote:
If signal handler for eg. SIGTERM signal is installed that looks like this:

void sigproc (int sig);

void sigproc (int sig)
{
SDL_Quit();
exit(1);
}

int main ()
{
..
signal(SIGTERM, sigproc);
..
}

Then killing a SDL app with "kill -15 AppPid" gracefully terminates the app, and subsequent invocations of the SDL app succeed.

Spoiler:
Whilst researching this (thinly documented) issue I happened across a LOVELY wordwar between two devs.

the critic doesn't like if( and if ( being in the same code stanza
the coder is deep-diving age old VT and tty code and couldnt give a monkeys about the critics opinion.

The old wars are the best. Style V Content. Ding Ding round 1.
http://old.nabble.com/-PATCH--vt:-ad...d24304586.html

Last edited by twobob; 10-10-2012 at 07:40 PM. Reason: http://old.nabble.com/-PATCH--vt:-add-an-event-interface-td24304586.html
twobob is offline   Reply With Quote
Old 10-11-2012, 05:45 AM   #2
hawhill
Wizard
hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.
 
hawhill's Avatar
 
Posts: 1,379
Karma: 2155307
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
Errm, it rather looks like it is waiting for a Virtual Terminal. That's a quite common patch for SDL, disabling interaction with a controlling terminal (because there might be none). There seem to be more involved, look at this: http://stackoverflow.com/questions/3...minal-on-linux

Using "kill -9" (SIGKILL) should also get rid of the process, I think, without installing any other signal handlers within the application.
hawhill is offline   Reply With Quote
Advert
Reply

Tags
best practices, framebuffer, howto, sdl, video

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
"The add books process seems to have hung" joleta Calibre 6 06-16-2012 02:26 AM
Two Free "Books" (Kindle) - The Girl on the Beach & Mysterious Profile #24 koland Deals and Resources (No Self-Promotion or Affiliate Links) 17 10-13-2010 06:17 PM
Article: "More reasons to worry about ebooks than I thought" Elfwreck News 13 07-23-2009 02:07 PM
PRS-505 hung on "Starting Up" screen shady Sony Reader 3 04-09-2009 05:18 PM
"10 Reasons Why eBooks Suck" rant TadW Lounge 38 09-17-2007 11:02 AM


All times are GMT -4. The time now is 01:13 AM.


MobileRead.com is a privately owned, operated and funded community.