Hi all,

> 1) I seem to have trouble with modal dialogs with the current GNUstep 
> (haven't had this problem with the ancient tree I was using since recently). 
> My app simply shows a window with a button. If I click on this button I do
> 
>    int result = NSRunAlertPanel(@"Test", @"Some Test", @"OK", nil, nil);
> 
> This works exactly one time (panel closes when hitting the OK button). If I 
> do this again the modal dialog is not closed anymore when hitting the OK 
> button and the app hangs (in the modal loop). :-(
> 
> Here ist the stack:
> 
> #0  0x00007f4ac607c74d in poll () at ../sysdeps/unix/syscall-template.S:84
> #1  0x00007f4ac6b64cc1 in -[GSRunLoopCtxt pollUntil:within:] (self=0xe43950, 
> _cmd=0x7f4ac6f51b40 <_OBJC_SELECTOR_TABLE+1184>, 
>     milliseconds=2147483647, contexts=0xe071e0) at GSRunLoopCtxt.m:391
> #2  0x00007f4ac6a7e5be in -[NSRunLoop acceptInputForMode:beforeDate:] 
> (self=0xe047c0, _cmd=0x7f4ac6f51b70 <_OBJC_SELECTOR_TABLE+1232>, 
>     mode=0x7f4ac8ad3bc0 <_OBJC_INSTANCE_0>, limit_date=0xe40330) at 
> NSRunLoop.m:1224
> #3  0x00007f4ac6a7ea96 in -[NSRunLoop runMode:beforeDate:] (self=0xe047c0, 
> _cmd=0x7f4ac8ac9fa0 <_OBJC_SELECTOR_TABLE+768>, 
>     mode=0x7f4ac8ad3bc0 <_OBJC_INSTANCE_0>, date=0xe40330) at NSRunLoop.m:1304
> #4  0x00007f4ac865c888 in -[GSDisplayServer(EventOps) 
> getEventMatchingMask:beforeDate:inMode:dequeue:] (self=0xd7db20, 
>     _cmd=0x7f4abeb1ec10 <_OBJC_SELECTOR_TABLE+48>, mask=4294967295, 
> limit=0xe40330, mode=0x7f4ac8ad3bc0 <_OBJC_INSTANCE_0>, 
>     flag=0 '\000') at GSDisplayServer.m:1034
> #5  0x00007f4abe8d2bbd in -[XGServer(X11Ops) 
> getEventMatchingMask:beforeDate:inMode:dequeue:] (self=0xd7db20, 
>     _cmd=0x7f4ac8998970 <_OBJC_SELECTOR_TABLE+1648>, mask=4294967295, 
> limit=0xe40330, mode=0x7f4ac8ad3bc0 <_OBJC_INSTANCE_0>, 
>     flag=0 '\000') at XGServerEvent.m:2567
> #6  0x00007f4ac844e391 in DPSPeekEvent (ctxt=0xd7db20, mask=4294967295, 
> limit=0xe40330, mode=0x7f4ac8ad3bc0 <_OBJC_INSTANCE_0>)
>     at ../Headers/Additions/GNUstepGUI/GSDisplayServer.h:207
> #7  0x00007f4ac8453af5 in -[NSApplication runModalForWindow:] (self=0xd3b210, 
> _cmd=0x7f4ac898dfa0 <_OBJC_SELECTOR_TABLE+1632>, 
>     theWindow=0x12a02a0) at NSApplication.m:1769
> #8  0x00007f4ac843b243 in -[GSAlertPanel runModal] (self=0x12a02a0, 
> _cmd=0x7f4ac898e1f0 <_OBJC_SELECTOR_TABLE+2224>) at NSAlert.m:812
> #9  0x00007f4ac843d92f in NSRunAlertPanel (title=0x61d320 
> <_OBJC_INSTANCE_53>, msg=0x61d340 <_OBJC_INSTANCE_54>, 
>     defaultButton=0x61d360 <_OBJC_INSTANCE_55>, alternateButton=0x0, 
> otherButton=0x0) at NSAlert.m:1490
> #10 0x00000000004084d9 in -[Controller commonWeighting] (self=0xe761e0, 
> _cmd=0xb4ad60) at Controller.m:189
> #11 0x00007f4ac39b5e40 in ffi_call_unix64 () from 
> /usr/lib/x86_64-linux-gnu/libffi.so.6
> #12 0x00007f4ac39b58ab in ffi_call () from 
> /usr/lib/x86_64-linux-gnu/libffi.so.6
> #13 0x00007f4ac6b195e7 in GSFFIInvokeWithTargetAndImp (inv=0x1976fa0, 
> anObject=0xe761e0, imp=0x40849f <-[Controller commonWeighting]>)
>     at GSFFIInvocation.m:370
> #14 0x00007f4ac6b19a24 in -[GSFFIInvocation invokeWithTarget:] 
> (self=0x1976fa0, _cmd=0x7f4ac6f14d10 <_OBJC_SELECTOR_TABLE+240>, 
>     anObject=0xe761e0) at GSFFIInvocation.m:452
> #15 0x00007f4ac69fd124 in -[NSInvocation invoke] (self=0x1976fa0, 
> _cmd=0x7f4ac477c1b0 <_OBJC_SELECTOR_TABLE+2480>) at NSInvocation.m:673
> #16 0x00007f4ac4536a52 in -[GSMarkupActionConnector performAction] 
> (self=0x1d02160, _cmd=0x7f4ac4788c20 <_OBJC_SELECTOR_TABLE+1984>)
>     at GSMarkupConnector.m:360
> #17 0x00007f4ac6a3b2e5 in -[NSObject performSelector:] (self=0x1d02160, 
> _cmd=0x7f4ac6eb2710 <_OBJC_SELECTOR_TABLE+432>, 
>     aSelector=0x7f4ac4788c20 <_OBJC_SELECTOR_TABLE+1984>) at NSObject.m:1986
> 
> Any idea? I am on Ubuntu 16.04 with relatively recent GNUstep sources (2-3 
> months old) and the default Ubuntu desktop environment.
> 
> 2) I also discovered the following other phenomena. When running an app under 
> WindowMaker, clicking on the "..." of an NSComboBox does nothing. This works 
> when using the Ubuntu window server though. This is no show stopper for me - 
> like the above mentioned problem - but I would prefer to use WindowMaker if 
> possible. Is anybody actually using WindowMaker with GNUstep and possibly has 
> encountered the same problem?

This looks like a problem in NSRunAlertPanel(). If I do

   if ([NSApp runModalForWindow:mainWin] == NSRunStoppedResponse)
     {
      // ...
     }  

everything works as expected. So I can work around this by not using 
NSRunAlertPanel at all but if anyone knows how to quickly fix this ...

Best wishes,

 Andreas

Reply via email to