SDL init failure, reason is: No available video device

1,264 views
Skip to first unread message

Kirshan Luhana

unread,
Sep 4, 2015, 10:39:42 PM9/4/15
to Jenkins Users
Please solve this bug 
I installed fresh copy of linux mint , jenkins and Android  emulator plugin and when trying to run emulator , I am getting error 
 
SDL init failure, reason is: No available video device

I alrady googled a lot , and installed sudo apt-get install ia32-libs-sdl

but no good solution.
I have HP envy Laptop and in bios visualization on. 


Kirshan Luhana

unread,
Sep 5, 2015, 7:06:17 PM9/5/15
to Jenkins Users
But when I run this on command line it working fine.
Started by user anonymous
Building in workspace /home/jenkins/workspace/emulatorTest
$ /home/jenkins/tools/android-sdk/tools/android list target
[android] Using Android SDK: /home/jenkins/tools/android-sdk
[android] Creating Android AVD: /home/jenkins/workspace/emulatorTest/.android/avd/hudson_en-US_640_WXGA720_android-23_tdsltest1.avd
[android] /home/jenkins/tools/android-sdk/tools/android create avd -f -a -s WXGA720 -n hudson_en-US_640_WXGA720_android-23_tdsltest1 -t android-23
$ /home/jenkins/tools/android-sdk/platform-tools/adb start-server
* daemon not running. starting it now on port 8297 *
* daemon started successfully *
$ /home/jenkins/tools/android-sdk/platform-tools/adb start-server
$ /home/jenkins/tools/android-sdk/tools/emulator -snapshot-list -no-window -avd hudson_en-US_640_WXGA720_android-23_tdsltest1
[android] Starting Android emulator and creating initial snapshot
$ /home/jenkins/tools/android-sdk/tools/emulator -ports 8295,8296 -prop persist.sys.language=en -prop persist.sys.country=US -avd hudson_en-US_640_WXGA720_android-23_tdsltest1 -no-snapshot-load -no-snapshot-save -wipe-data
SDL init failure, reason is: No available video device
[android] Emulator did not appear to start; giving up
$ /home/jenkins/tools/android-sdk/platform-tools/adb disconnect localhost:8296
[android] Stopping Android emulator
$ /home/jenkins/tools/android-sdk/platform-tools/adb kill-server
Finished: NOT_BUILT

Victor Martinez

unread,
Sep 6, 2015, 7:20:25 AM9/6/15
to Jenkins Users
Hi,

 There is already a closed jira ticket about that issue:
 

 It might be related, otherwise can you please raise a ticket and explain your current setup (jenkins version, java version, plugin list and their versions and your job setup?)

Thanks

Kirshan Luhana

unread,
Sep 6, 2015, 7:29:51 AM9/6/15
to Jenkins Users
Thanks, I already checked. 
Actually I am new to Jenkins, did not understand VNC server stuff and I have very fresh linux OS with only jenkins installed (Latest) and then I tried to run emulator and it fails.

Kirshan Luhana

unread,
Sep 7, 2015, 9:32:53 AM9/7/15
to Jenkins Users
I got solution 
 
First I designed on job and run shell commands 
whoami
printenv

Result: 
anonymous 
printenv result did now show Display =:0 

Then I export DISPAY =:0 from terminal (master user) 
and then restart Jenkins with (master user) 

it worked :)

Mark Waite

unread,
Sep 7, 2015, 9:50:07 AM9/7/15
to Jenkins Users
I don't think you'll like the long term results of setting DISPLAY=:0 for the entire Jenkins process.  I think that technique assumes the Jenkins user will always have access to the ":0" X windows display.  The next time you logout, Jenkins won't have access to that display.

You probably want to install and configure the xvnc plugin and configure the job so that it starts an Xvnc session when the job starts, and closes that Xvnc session when the job ends.  I've used the Xvnc plugin on many different jobs with good results.

Alternately, you could install and configure the xvfb plugin and configure the job to use it.  I haven't used the xvfb plugin, but there are many others who have used it with good results.

Mark Waite

--
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-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/b8d23f8a-7527-4377-9e45-2a76be30e1a9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Kirshan Luhana

unread,
Sep 7, 2015, 10:58:56 AM9/7/15
to Jenkins Users
Yes you are right, after restart I lost access to Display :=0.
Is this anyway to get access after every boot?
Can you share some more on XVNC ? I just started exploring Jenkins :)

Thank you very ,much.

Mark Waite

unread,
Sep 7, 2015, 11:07:28 AM9/7/15
to Jenkins Users
Refer to https://wiki.jenkins-ci.org/display/JENKINS/Xvnc+Plugin for plenty of details on Xvnc.

The simple steps:
  1. Install vncserver package for your operating systems (sudo apt-get install tightvncserver on Debian)
  2. Install the Xvnc Jenkins plugin (from Jenkins Update Center)
  3. Configure the Xvnc Jenkins plugin globally (part of "Configure System" under the "Manage Jenkins" link)
  4. Configure each job that needs Xvnc to start a VNC server when the job starts (check box in the job definition)
Thanks,
Mark Waite

Kirshan Luhana

unread,
Sep 8, 2015, 10:52:10 AM9/8/15
to Jenkins Users
Thank you very very much for this guide, my emulator finally started but now I am getting this error , is this due vnc ? as before when I was tested with different user, it was working fine.

*** Error in `/home/jenkins/tools/android-sdk-linux/tools/emulator64-x86': double free or corruption (fasttop): 0x00007f1ecf2a8000 ***
$ /home/jenkins/tools/android-sdk-linux/platform-tools/adb kill-server
Terminating xvnc.
$ vncserver -kill :93
Killing Xvnc4 process ID 5807


here is my complete log

started by user anonymous
[EnvInject] - Loading node environment variables.
Building in workspace /home/jenkins/workspace/emulatorTest
$ pkill Xvnc
pkill: killing pid 10536 failed: Operation not permitted
pkill: killing pid 10614 failed: Operation not permitted
pkill: killing pid 10674 failed: Operation not permitted
$ pkill Xrealvnc
$ sh -c "rm -f /tmp/.X*-lock /tmp/.X11-unix/X*"
rm: cannot remove ‘/tmp/.X11-lock’: Operation not permitted
rm: cannot remove ‘/tmp/.X12-lock’: Operation not permitted
rm: cannot remove ‘/tmp/.X13-lock’: Operation not permitted
rm: cannot remove ‘/tmp/.X11-unix/X0’: Operation not permitted
rm: cannot remove ‘/tmp/.X11-unix/X11’: Operation not permitted
rm: cannot remove ‘/tmp/.X11-unix/X12’: Operation not permitted
rm: cannot remove ‘/tmp/.X11-unix/X13’: Operation not permitted
Starting xvnc
[emulatorTest] $ vncserver :93 -localhost -nolisten tcp

New 'luhana:93 (catroid)' desktop is luhana:93

Starting applications specified in /home/catroid/.vnc/xstartup
Log file is /home/catroid/.vnc/luhana:93.log

$ /home/jenkins/tools/android-sdk-linux/tools/android list target
[android] Using Android SDK: /home/jenkins/tools/android-sdk-linux
$ /home/jenkins/tools/android-sdk-linux/platform-tools/adb start-server
* daemon not running. starting it now on port 8212 *
* daemon started successfully *
$ /home/jenkins/tools/android-sdk-linux/platform-tools/adb start-server
[android] Starting Android emulator
[android] Erasing existing emulator data...
$ /home/jenkins/tools/android-sdk-linux/tools/emulator -ports 8210,8211 -prop persist.sys.language=en -prop persist.sys.country=US -avd hudson_en-US_213_HVGA_android-18_x86 -no-snapshot-load -no-snapshot-save -wipe-data -camera-back emulated -camera-front emulated -gpu on -qemu -m 800 -enable-kvm
unhandled buffer attach event, attachment type 20
unhandled buffer attach event, attachment type 20
$ /home/jenkins/tools/android-sdk-linux/platform-tools/adb connect localhost:8211
connected to localhost:8211
[android] Waiting for emulator to finish booting...
$ /home/jenkins/tools/android-sdk-linux/platform-tools/adb -s localhost:8211 shell getprop init.svc.bootanim
error: device offline
$ /home/jenkins/tools/android-sdk-linux/platform-tools/adb connect localhost:8211
unhandled buffer attach event, attachment type 26
unhandled buffer attach event, attachment type 28
$ /home/jenkins/tools/android-sdk-linux/platform-tools/adb -s localhost:8211 shell getprop init.svc.bootanim
error: device offline
$ /home/jenkins/tools/android-sdk-linux/platform-tools/adb connect localhost:8211
unhandled buffer attach event, attachment type 30
unhandled buffer attach event, attachment type 32
unhandled buffer attach event, attachment type 32
$ /home/jenkins/tools/android-sdk-linux/platform-tools/adb -s localhost:8211 shell getprop init.svc.bootanim
$ /home/jenkins/tools/android-sdk-linux/platform-tools/adb -s localhost:8211 logcat -v time
$ /home/jenkins/tools/android-sdk-linux/platform-tools/adb connect localhost:8211
[android] Emulator is ready for use (took 32 seconds)
$ /home/jenkins/tools/android-sdk-linux/platform-tools/adb disconnect localhost:8211
[android] Stopping Android emulator
*** Error in `/home/jenkins/tools/android-sdk-linux/tools/emulator64-x86': double free or corruption (fasttop): 0x00007f1ecf2a8000 ***
$ /home/jenkins/tools/android-sdk-linux/platform-tools/adb kill-server
Terminating xvnc.
$ vncserver -kill :93
Killing Xvnc4 process ID 5807
Finished: SUCCESS

Mark Waite

unread,
Sep 8, 2015, 1:04:19 PM9/8/15
to Jenkins Users
I don't think that is related to Xvnc, but it could be.  A double free message could be from many different places.

Mark Waite

Kirshan Luhana

unread,
Sep 10, 2015, 3:26:26 AM9/10/15
to Jenkins Users
Thanks, can you give hints, where to look for double memory error ?

I tried to install a fresh copy for some more experience on Jenkins and now getting error

[android] Starting Android emulator
[android] Erasing existing emulator data...
$ /home/jenkins/tools/android-sdk/tools/emulator -ports 7688,7689 -prop persist.sys.language=en -prop persist.sys.country=US -avd hudson_en-US_640_HVGA_android-23_x86_64 -no-snapshot-load -no-snapshot-save -wipe-data -camera-back emulated -camera-front emulated -gpu on -qemu -m 800 -enable-kvm
libGL error: failed to load driver: swrast
libGL error: failed to load driver: swrast
getGLES1ExtensionString: Could not find GLES 1.x config!
Failed to obtain GLES 1.x extensions string!
Could not initialize emulated framebufferCreating filesystem with parameters:
    Size: 69206016
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 4224
    Inode size: 256
    Journal blocks: 1024
    Label: 
    Blocks: 16896
    Block groups: 1
    Reserved block group size: 7
Created filesystem with 11/4224 inodes and 1302/16896 blocks
emulator: ERROR: Could not initialize OpenglES emulation, use '-gpu off' to disable it.
[android] Emulator did not appear to start; giving up
$ /home/jenkins/tools/android-sdk/platform-tools/adb disconnect localhost:7689
[android] Stopping Android emulator
$ /home/jenkins/tools/android-sdk/platform-tools/adb kill-server
Terminating xvnc.
$ vncserver -kill :20
Killing Xvnc4 process ID 3316
Finished: NOT_BUILT


Kirshan Luhana

unread,
Sep 22, 2015, 8:02:54 PM9/22/15
to Jenkins Users
Can you please guide how can I solve this problem,

libGL error: failed to load driver: swrast
libGL error: failed to load driver: swrast
getGLES1ExtensionString: Could not find GLES 1.x config!
Failed to obtain GLES 1.x extensions string!

I using linux mint 17.2, latest Jenkins and andoid plugin and XVNC.
 

Mark Waite

unread,
Sep 22, 2015, 8:07:22 PM9/22/15
to Jenkins Users
Google search is a very helpful tool for those types of questions.  Paste the error message into a search, and review the suggestions which result.

Mark Waite

Kirshan Kumar

unread,
Sep 22, 2015, 8:16:14 PM9/22/15
to jenkins...@googlegroups.com

Thanks,  from many days trying to gogle bus could not find good solution :(

You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/R8tVHVu6cUA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtEmhJa4ncJYgCMDQsy9F%2BiErkOSuO8o%3DhyVmpfZG82pFQ%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages