Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#43302 closed defect (fixed)

qemu uncaught exception

Reported by: frozencemetery (Robbie Harwood) Owned by: raimue (Rainer Müller)
Priority: Normal Milestone:
Component: ports Version: 2.2.1
Keywords: Cc: cooljeanius (Eric Gallager)
Port: qemu

Description

It appears as though qemu is unwilling to function without opening a window (i.e., while running headless). Trace follows:

(gdb) robbie@osxserver:~/Downloads$ gdb qemu-system-i386
GNU gdb 6.3.50-20050815 (Apple version gdb-1515) (Sat Jan 15 08:33:48 UTC 2011)
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 "x86_64-apple-darwin"...Reading symbols for shared libraries .................
....... done

(gdb) set args -cdrom ./debian-live-7.4-i386-standard.iso -boot order=d -display curses
(gdb) r
Starting program: /Volumes/ServerDrive/NetUsers/robbie/bin/qemu-system-i386 -cdrom ./debian-live-7.4-i386
-standard.iso -boot order=d -display curses

[snip gdb complaining for several pages about no debug information being available for various files]


.... done
Wed Apr  9 12:41:35 osxserver.b-aassoc.edu qemu-system-i386[21197] <Error>: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
_RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.
Reading symbols for shared libraries . done
2014-04-09 12:41:35.549 qemu-system-i386[21197:a0f] An uncaught exception was raised
2014-04-09 12:41:35.551 qemu-system-i386[21197:a0f] Error (1002) creating CGSWindow
2014-04-09 12:41:35.552 qemu-system-i386[21197:a0f] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Error (1002) creating CGSWindow'
*** Call stack at first throw:
(
        0   CoreFoundation                      0x00007fff8274a784 __exceptionPreprocess + 180
        1   libobjc.A.dylib                     0x00007fff8129ff03 objc_exception_throw + 45
        2   CoreFoundation                      0x00007fff8274a5a7 +[NSException raise:format:arguments:] + 103
        3   CoreFoundation                      0x00007fff8274a534 +[NSException raise:format:] + 148
        4   AppKit                              0x00007fff873f5f52 _NSCreateWindowWithOpaqueShape2 + 473
        5   AppKit                              0x00007fff8738a691 -[NSWindow _commonAwake] + 1214
        6   AppKit                              0x00007fff87387376 -[NSWindow _commonInitFrame:styleMask:backing:defer:] + 1501
        7   AppKit                              0x00007fff87386002 -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1396
        8   AppKit                              0x00007fff87385a8b -[NSWindow initWithContentRect:styleMask:backing:defer:] + 42
        9   qemu-system-i386                    0x00000001001679d0 0x0 + 4296440272
        10  qemu-system-i386                    0x00000001001672ec 0x0 + 4296438508
        11  qemu-system-i386                    0x000000010000aa88 0x0 + 4295010952
        12  ???                                 0x0000000000000007 0x0 + 7
)
terminate called after throwing an instance of 'NSException'

Program received signal SIGABRT, Aborted.
0x00007fff852320b6 in __kill ()
(gdb) bt
#0  0x00007fff852320b6 in __kill ()
#1  0x00007fff852d29f6 in abort ()
#2  0x00007fff8a6f85d2 in __gnu_cxx::__verbose_terminate_handler ()
#3  0x00007fff812a3b39 in _objc_terminate ()
#4  0x00007fff8a6f6ae1 in __cxxabiv1::__terminate ()
#5  0x00007fff8a6f6b16 in std::terminate ()
#6  0x00007fff8a6f6bfc in __cxa_throw ()
#7  0x00007fff8129ffa2 in objc_exception_throw ()
#8  0x00007fff827a2969 in -[NSException raise] ()
#9  0x00007fff8738a6bd in -[NSWindow _commonAwake] ()
#10 0x00007fff87387376 in -[NSWindow _commonInitFrame:styleMask:backing:defer:] ()
#11 0x00007fff87386002 in -[NSWindow _initContent:styleMask:backing:defer:contentView:] ()
#12 0x00007fff87385a8b in -[NSWindow initWithContentRect:styleMask:backing:defer:] ()
#13 0x00000001001679d0 in ?? ()
#14 0x00000001001672ec in ?? ()
#15 0x000000010000aa88 in ?? ()
(gdb) 

Change History (4)

comment:1 Changed 7 years ago by mf2k (Frank Schima)

Cc: raimue@… openmaintainer@… removed
Owner: changed from macports-tickets@… to raimue@…

Please do not Cc openmaintainer@… because it is not a valid email address.

comment:2 in reply to:  1 Changed 7 years ago by frozencemetery (Robbie Harwood)

Replying to macsforever2000@…:

Please do not Cc openmaintainer@… because it is not a valid email address.

Noted, thanks for letting me know!

comment:3 Changed 7 years ago by raimue (Rainer Müller)

Resolution: fixed
Status: newclosed

Unfortunately, this due to the way the Mac OS X support has to be implemented in qemu. To make it run as an app, the main function is replaced with a wrapper that acts as an event loop.

In r118754 I split the cocoa and curses interfaces into conflicting variants. To get the curses interface now, please run the following commands. Note that this version will not support the graphical user interface at all.

sudo port selfupdate
sudo port upgrade --enforce-variants qemu +curses

Another note: Although the curses interface builds and works for a simple test case for me, I could not get the monitor console (open with <Esc>2) to work properly. It always displayed black text on black background for me, so that the text could only be revealed with a selection in Terminal.

comment:4 Changed 7 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

Note: See TracTickets for help on using tickets.