Hi,

 I am using the XVFB Jenkins to run automated GUI tests for both Mac and 
Linux on Jenkins agents that connect via ssh.

The tests run a cross-platform GTK-sharp application that executes on Mac 
and Linux via mono.

I used the pipeline syntax to deploy the xvfb plugin, and everything is 
working fine on Linux, however for Mac as soon as the gtk_init function is 
called, I get a crash with the following error, seemingly indicating that 
it is not able to connect to the display created by xvfb (I get exact same 
behavior if I just don't run the XVFB plugin in the first place):

"_RegisterApplication(), FAILED TO establish the default connection to the 
WindowServer, _CGSDefaultConnection() is NULL."

Any ideas as to what could be wrong with my setup?  Or does anyone know if 
this use case is supported by the xvfb plugin on mac?



Below is the full callstack if that helps:

_RegisterApplication(), FAILED TO establish the default connection to the 
WindowServer, _CGSDefaultConnection() is NULL.
2021-05-26 11:46:42.082 mono-sgen64[79071:5603830] *** Terminating app due 
to uncaught exception 'NSRangeException', reason: '*** -[__NSArray0 
objectAtIndex:]: index 0 beyond bounds for empty NSArray'
*** First throw call stack:
(
0   CoreFoundation                      0x00007fff415f666b 
__exceptionPreprocess + 171
1   libobjc.A.dylib                     0x00007fff68834942 
objc_exception_throw + 48
2   CoreFoundation                      0x00007fff4161019d -[__NSArray0 
objectAtIndex:] + 93
3   libgdk-quartz-2.0.0.dylib           0x00000001088a77bd 
_gdk_screen_quartz_init + 93
4   libgobject-2.0.0.dylib              0x00000001091aa6d0 
g_type_create_instance + 1379
5   libgobject-2.0.0.dylib              0x000000010919ac82 
g_object_constructor + 22
6   libgobject-2.0.0.dylib              0x000000010919a62b g_object_newv + 
601
7   libgobject-2.0.0.dylib              0x000000010919a393 g_object_new + 
187
8   libgdk-quartz-2.0.0.dylib           0x00000001088a78b7 
_gdk_screen_quartz_new + 23
9   libgdk-quartz-2.0.0.dylib           0x0000000108896e2b gdk_display_open 
+ 107
10  libgdk-quartz-2.0.0.dylib           0x00000001088495f4 
gdk_display_open_default_libgtk_only + 116
11  libgtk-quartz-2.0.0.dylib           0x00000001083db9e7 gtk_init_check + 
55
12  libgtk-quartz-2.0.0.dylib           0x00000001083dba1d gtk_init + 29
13  ???                                 0x00000001057b6cd6 0x0 + 4386942166
14  ???                                 0x0000000102bd60b1 0x0 + 4340932785
15  mono-sgen64                         0x000000010259e962 
mono_jit_runtime_invoke + 2354
16  mono-sgen64                         0x00000001027adf97 
mono_runtime_invoke_checked + 135
17  mono-sgen64                         0x00000001027b645e 
do_exec_main_checked + 94
18  mono-sgen64                         0x00000001025fee1e mono_jit_exec + 
414
19  mono-sgen64                         0x0000000102602085 mono_main + 9397
20  mono-sgen64                         0x000000010258e178 main + 2056
21  libdyld.dylib                       0x00007fff6944b015 start + 1
)


-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/78520f48-cc39-4583-ad95-91a3f0a59ad3n%40googlegroups.com.

Reply via email to