Opened 13 years ago

Closed 13 years ago

Last modified 13 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:
Has a Patch: no 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@… 13 years ago.
BPrivateScreen patch

Download all attachments as: .zip

Change History (4)

comment:1 Changed 13 years ago by axeld

Status: newclosed

comment:2 Changed 13 years ago by axeld

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

comment:3 Changed 13 years ago by axeld

Resolution: fixed

Changed 13 years ago by genki@…

Attachment: screen.patch added

BPrivateScreen patch

Note: See TracTickets for help on using tickets.