Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#114 closed bug (fixed)

BScreen should not crash when there is no BApplication

Reported by: genki@… Owned by: axeld
Priority: normal Milestone: R1
Component: - General Version:
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

Hello,

Using a BScreen object without a BApplication drops me in the debugger with "You first need a valid link to the app_server" or something like that. Instead it should return zero-data like under R5.

Try this under Haiku and R5:

#include <Screen.h> #include <stdio.h> #include <Application.h>

int32 appthread(void*) {

BApplication *app = new BApplication("application/x-vnd.test"); app->Run();

}

int main() {

thread_id appth;

uncomment below to make it work appth = spawn_thread(appthread, "appthread", B_LOW_PRIORITY, 0); resume_thread(appth);

snooze(1000000); BScreen screen;

screen.Frame().PrintToStream(); return 0;

}

Attachments (1)

screen.patch (554 bytes ) - added by genki@… 18 years ago.
BPrivateScreen patch

Download all attachments as: .zip

Change History (4)

comment:1 by axeld, 18 years ago

Status: newclosed

comment:2 by axeld, 18 years ago

If 3dmix wants bad data, here it has them :-) I've applied your patch with revision 16229, thanks!

comment:3 by axeld, 18 years ago

Resolution: fixed

by genki@…, 18 years ago

Attachment: screen.patch added

BPrivateScreen patch

Note: See TracTickets for help on using tickets.