Opened 15 years ago

Closed 14 years ago

#5938 closed bug (fixed)

Screensavers don't work in 'live cd'-mode

Reported by: idefix Owned by: korli
Priority: normal Milestone: R1
Component: Add-Ons/Screen Savers Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

Using the hrev36674 nightly cd (haiku-r1a2-rc-r36674-x86gcc2hybrid-cd.zip) in live-mode (VESA video).

Steps to reproduce:

  1. go to the Modules tab in ScreenSaver
  2. click on the Test button

The preview will turn black, but the selected screensaver won't run.

  1. click on the list in the ScreenSaver window

ScreenSaver will now crash:

GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i586-pc-haiku"...(no debugging symbols found)

[tcsetpgrp failed in terminal_inferior: Invalid Argument]
Thread 514 caused an exception: Segment violation
Reading symbols from /boot/system/runtime_loader...done.
Loaded symbols for /boot/system/runtime_loader
Reading symbols from /boot/system/lib/libtracker.so...done.
Loaded symbols for /boot/system/lib/libtracker.so
Reading symbols from /boot/system/lib/libscreensaver.so...done.
Loaded symbols for /boot/system/lib/libscreensaver.so
Reading symbols from /boot/system/lib/libbe.so...done.
Loaded symbols for /boot/system/lib/libbe.so
Reading symbols from /boot/system/lib/libstdc++.r4.so...done.
Loaded symbols for /boot/system/lib/libstdc++.r4.so
Reading symbols from /boot/system/lib/libroot.so...done.
Loaded symbols for /boot/system/lib/libroot.so
Reading symbols from /boot/system/lib/libtranslation.so...done.
Loaded symbols for /boot/system/lib/libtranslation.so
Reading symbols from /boot/system/lib/libgame.so...done.
Loaded symbols for /boot/system/lib/libgame.so
Reading symbols from /boot/system/lib/libtextencoding.so...done.
Loaded symbols for /boot/system/lib/libtextencoding.so
Reading symbols from /boot/system/lib/libmedia.so...done.
Loaded symbols for /boot/system/lib/libmedia.so
[tcsetpgrp failed in terminal_inferior: Invalid Argument]
[Switching to team /boot/system/preferences/ScreenSaver (505) thread w>ScreenSaver (514)]
0xbf800000 in ?? ()
(gdb) bt
#0  0xbf800000 in ?? ()
#1  0x0020c6c0 in ModulesView::_CloseSaver ()
#2  0x0020bd55 in ModulesView::MessageReceived ()
#3  0x004c673f in BLooper::DispatchMessage () from /boot/system/lib/libbe.so
#4  0x0058a32d in BWindow::DispatchMessage () from /boot/system/lib/libbe.so
#5  0x0058e4e4 in BWindow::task_looper () from /boot/system/lib/libbe.so
#6  0x004c7c9b in BLooper::_task0_ () from /boot/system/lib/libbe.so
#7  0x006f50b2 in thread_entry () from /boot/system/lib/libroot.so
#8  0x700c1fec in ?? ()
(gdb) 

Change History (13)

comment:1 by idefix, 15 years ago

Further testing reveals that the screensavers don't work at all (as in not after the set timeout and not when you put the mouse in the set hotspot-corner).

comment:2 by idefix, 15 years ago

Component: Preferences/ScreenSaverAdd-Ons/Screen Savers
Owner: changed from axeld to korli
Summary: Test screensaver module does nothing and crashes ScreenSaver afterwardsScreensavers don't work in 'live cd'-mode

They do work when Haiku has been installed to a harddisk. Only when running in 'live cd'-mode, the screensavers don't work (but the previews do work).

Updated summary and component accordingly.

comment:3 by idefix, 15 years ago

It looks like this has been fixed, as they do work with a hrev37017 nightly cd (haiku-nightly-r37017-x86gcc2hybrid-cd.zip).

This ticket can be closed.

comment:4 by korli, 15 years ago

Resolution: fixed
Status: newclosed

Please reopen if needed.

comment:5 by idefix, 15 years ago

Resolution: fixed
Status: closedreopened

Sorry, I was too quick with my conclusion. The screensavers still don't work when running in 'live cd'-mode.

They will however start to work after invoking screen_blanker once in Terminal:

  1. boot a nightly cd
  2. wait 15 minutes, or start ScreenSaver and click on the Test button
  • the currently selected screensaver (Blackness) will not start (the screen doesn't turn black)
  1. crash screenSaver by clicking on the list (if you didn't wait 15 minutes at step 2)
  2. open Terminal and start screen_blanker
  • the currently selected screensaver (Blackness) starts (the screen turns black)
  1. start ScreenSaver and click on the Test button
  • the currently selected screensaver (Blackness) does now start normally (the screen turns black)

comment:6 by jackburton, 15 years ago

screen_blanker is launched by signature, by the screensaver input server addon (line 181), and that won't work until the registrar has examined the screen_blanked binary and written the needed attributes. That's why waiting 15 minutes or executing screen_blanker manually once does the trick. I noticed a similar problem with Terminal, but only on real hardware, for some reason: opt-alt-T launches the terminal only if I launch it manually at least once.

A workaround to this problem would be to check for an error, and then try to launch the screen_blanker by path, like we do for the media_server_addon.

comment:7 by korli, 15 years ago

Please check again with hrev37120 or upper. Thanks.

comment:8 by idefix, 15 years ago

With hrev37125 (haiku-nightly-r37125-x86gcc2hybrid-cd.zip), the screen saver will start after 15 minutes. It won't however start when clicking the Test button in ScreenSaver (on the plus side: it won't crash anymore either). It looks like the code in hrev37120 also needs to be added to ScreenSaver preferences.

in reply to:  8 comment:9 by korli, 14 years ago

Replying to idefix:

With hrev37125 (haiku-nightly-r37125-x86gcc2hybrid-cd.zip), the screen saver will start after 15 minutes. It won't however start when clicking the Test button in ScreenSaver (on the plus side: it won't crash anymore either). It looks like the code in hrev37120 also needs to be added to ScreenSaver preferences.

I checked and the 'Test' button doesn't launch anything, so the fix must be fairly different.

comment:10 by idefix, 14 years ago

I don't know if I understand you correctly, but in comment:8 I had something in mind like:

  • src/preferences/screensaver/ScreenSaverWindow.cpp

     
    365365        }
    366366
    367367        case kMsgTestSaver:
     368        {
    368369            SaveState();
    369370            fSettings.Save();
    370371
     
    372373
    373374            be_roster->StartWatching(BMessenger(this, this->Looper()),
    374375                B_REQUEST_QUIT);
    375             be_roster->Launch(SCREEN_BLANKER_SIG, &fSettings.Message(),
    376                 &fScreenSaverTestTeamId);
     376
     377            if (be_roster->Launch(SCREEN_BLANKER_SIG, &fSettings.Message(),
     378                &fScreenSaverTestTeamId) == B_OK)
     379                break;
     380
     381            // Try really hard to launch it. It's very likely that this fails,
     382            // when we run from the CD and there is only an incomplete mime
     383            // database for example...
     384            BPath path;
     385            if (find_directory(B_SYSTEM_BIN_DIRECTORY, &path) != B_OK
     386                || path.Append("screen_blanker") != B_OK) {
     387                path.SetTo("/boot/system/bin/screen_blanker");
     388            }
     389            BEntry entry(path.Path());
     390            entry_ref ref;
     391            if (entry.GetRef(&ref) == B_OK) {
     392                be_roster->Launch(&ref, &fSettings.Message(),
     393                    &fScreenSaverTestTeamId);
     394            }
     395
    377396            break;
     397        }
    378398
    379399        case kMsgAddSaver:
    380400            fFilePanel->Show();

Which should fix the problem with the Test button in ScreenSaver (although I haven't test it).

comment:11 by korli, 14 years ago

OK I understood and meant the preview, not the test button. Sorry about that. I applied your hint in hrev37305. Please check. Thanks a lot!

comment:12 by idefix, 14 years ago

The Test button now also works (tested with hrev37307 (haiku-nightly-r37307-x86gcc2hybrid-cd.zip)). Thanks!

comment:13 by korli, 14 years ago

Resolution: fixed
Status: reopenedclosed

Thanks for the feedback!

Note: See TracTickets for help on using tickets.