2014-11-24 51 views
1

我使用0.11.14節點(通過'n'節點版本管理器安裝)。當我開始使用'n'時,就是當這些問題開始時。Selenium standalone已退出,代碼爲null

我運行Java 1.7

java version "1.7.0" 
Java(TM) SE Runtime Environment (build 1.7.0-b147) 
Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode) 

開始的webdriver我收到以下錯誤

webdriver-manager start --standalone 

seleniumProcess.pid: 3632 
12:57:21.793 INFO - Launching a standalone server 
java: malloc.c:3096: sYSMALLOc: Assertion `(old_top == (((mbinptr) (((char *) &((av)->bins[((1) - 1) * 2])) - __builtin_offsetof (struct malloc_chunk, fd)))) && old_size == 0) || ((unsigned long) (old_size) >= (unsigned long)((((__builtin_offsetof (struct malloc_chunk, fd_nextsize))+((2 * (sizeof(size_t))) - 1)) & ~((2 * (sizeof(size_t))) - 1))) && ((old_top)->size & 0x1) && ((unsigned long)old_end & pagemask) == 0)' failed. 
Selenium Standalone has exited with code null 

更新硒:使用節點沒有版本管理

我剛剛卸載'n'並從github安裝節點(使用標準./configure & make; make install)。現在我已安裝Verion 0.13.0,並得到同樣的問題。我確信我得到了在/ usr/local/lib目錄/ node_modules擺脫我node_modules(以及任何其在主目錄存在),並重新安裝量角器

npm install -g protractor 

這將安裝[email protected]具有相同問題。

更新:先從單機標誌

開始webdriver的經理有以下

webdriver-manager start --standalone 
seleniumProcess.pid: 32701 
14:04:16.070 INFO - Launching a standalone server 
*** glibc detected *** java: free(): invalid next size (fast): 0x00007f061c116e20 *** 
======= Backtrace: ========= 
/lib/x86_64-linux-gnu/libc.so.6(+0x76aa6)[0x7f062e766aa6] 
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x6c)[0x7f062e76b84c] 
/opt/jdk1.7.0/jre/lib/amd64/libnet.so(+0x5a1d)[0x7f06234f7a1d] 
/opt/jdk1.7.0/jre/lib/amd64/libnet.so(Java_java_net_NetworkInterface_getAll+0x9e)[0x7f06234f84fe] 
[0x7f0629746bd1] 
======= Memory map: ======== 
00400000-00401000 r-xp 00000000 fd:00 1062136       /opt/jdk1.7.0/bin/java 
00600000-00601000 rw-p 00000000 fd:00 1062136       /opt/jdk1.7.0/bin/java 
01a13000-01cb9000 rw-p 00000000 00:00 0         [heap] 
40a600000-40bac0000 rw-p 00000000 00:00 0 
40bac0000-40f800000 rw-p 00000000 00:00 0 
40f800000-439850000 rw-p 00000000 00:00 0 
439850000-6afd60000 rw-p 00000000 00:00 0 
6afd60000-6c4d80000 rw-p 00000000 00:00 0 
6c4d80000-800000000 rw-p 00000000 00:00 0 
7f061c000000-7f061c117000 rw-p 00000000 00:00 0 
7f061c117000-7f0620000000 ---p 00000000 00:00 0 
7f06232b5000-7f06232ca000 r-xp 00000000 fd:00 523478      /lib/x86_64-linux-gnu/libgcc_s.so.1 
7f06232ca000-7f06234ca000 ---p 00015000 fd:00 523478      /lib/x86_64-linux-gnu/libgcc_s.so.1 
7f06234ca000-7f06234cb000 rw-p 00015000 fd:00 523478      /lib/x86_64-linux-gnu/libgcc_s.so.1 

更新:嘗試用java

上市的網絡設備,如果我用一個簡單的java程序將列出網絡設備,這將失敗,同樣的錯誤;

import java.io.*; 
import java.net.*; 
import java.util.*; 
import static java.lang.System.out; 

public class ListNets { 

    public static void main(String args[]) throws SocketException { 
     Enumeration<NetworkInterface> nets = NetworkInterface.getNetworkInterfaces(); 
     for (NetworkInterface netint : Collections.list(nets)) 
      displayInterfaceInformation(netint); 
    } 

    static void displayInterfaceInformation(NetworkInterface netint) throws SocketException { 
     out.printf("Display name: %s\n", netint.getDisplayName()); 
     out.printf("Name: %s\n", netint.getName()); 
     Enumeration<InetAddress> inetAddresses = netint.getInetAddresses(); 
     for (InetAddress inetAddress : Collections.list(inetAddresses)) { 
      out.printf("InetAddress: %s\n", inetAddress); 
     } 
     out.printf("\n"); 
    } 
} 

編譯&運行

javac ListNets.java 
java ListNets 

顯示此錯誤

java: malloc.c:3096: sYSMALLOc: Assertion `(old_top == (((mbinptr) (((char *) 
&((av)->bins[((1) - 1) * 2])) - __builtin_offsetof (struct malloc_chunk, fd)))) 
&& old_size == 0) || ((unsigned long) (old_size) >= (unsigned long) 
((((__builtin_offsetof (struct malloc_chunk, fd_nextsize))+((2 * (sizeof(size_t))) 
- 1)) & ~((2 * (sizeof(size_t))) - 1))) && ((old_top)->size & 0x1) && ((unsigned 
long)old_end & pagemask) == 0)' failed. 
[1] 1338 abort  java ListNets 

回答

0

如果我恢復一切恢復使用的OpenJDK那麼這修正了webdriver的經理原來的問題

sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/java-7-openjdk-amd64/bin/java 1066 
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/java-7-openjdk-amd64/bin/javac 1066 
sudo update-alternatives --set java /usr/lib/jvm/java-7-openjdk-amd64/bin/java 
sudo update-alternatives --set javac /usr/lib/jvm/java-7-openjdk-amd64/bin/javac 

現在下面的作品

webdriver-manager start 

seleniumProcess.pid: 28522 
16:27:21.246 INFO - Launching a standalone server 
Setting system property webdriver.chrome.driver to /usr/local/lib/node_modules/protractor/selenium/chromedriver 
16:27:21.283 INFO - Java: Oracle Corporation 24.65-b04 
16:27:21.283 INFO - OS: Linux 3.2.0-4-amd64 amd64 
16:27:21.293 INFO - v2.44.0, with Core v2.44.0. Built from revision 76d78cf 
16:27:21.363 INFO - Default driver org.openqa.selenium.ie.InternetExplorerDriver registration is skipped: registration capabilities Capabilities [{platform=WINDOWS, ensureCleanSession=true, browserName=internet explorer, version=}] does not match with current platform: LINUX 
16:27:21.400 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub 
16:27:21.401 INFO - Version Jetty/5.1.x 
16:27:21.402 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver] 
16:27:21.402 INFO - Started HttpContext[/selenium-server,/selenium-server] 
16:27:21.403 INFO - Started HttpContext[/,/] 
16:27:21.441 INFO - Started [email protected] 
16:27:21.441 INFO - Started HttpContext[/wd,/wd] 
16:27:21.445 INFO - Started SocketListener on 0.0.0.0:4444 
16:27:21.445 INFO - Started [email protected] 
相關問題