rxtx error using smslib and mobile phone as a modem - java

I am trying to use smslib to send an sms. It works fine on windows but now I need to get it working under ubuntu 11.10. So I installed rxtx for a 64 bit os from here http://www.cloudhopper.com/opensource/rxtx/. Connected the mobile phones using usb which has been detected as /dev/ttyACM0 which I linked to /dev/ttyS32 (a free serial port). Then I try to run the program and I am getting the following error:
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f44f9a065da, pid=8875, tid=139934227818240
#
# JRE version: 7.0_147-b147
# Java VM: OpenJDK 64-Bit Server VM (21.0-b17 mixed mode linux-amd64 compressed oops)
# Derivative: IcedTea7 2.0
# Distribution: Ubuntu 11.10, package 7~b147-2.0-0ubuntu0.11.10.1
# Problematic frame:
# C [librxtxSerial.so+0x75da] Java_gnu_io_RXTXPort_nativeDrain+0xea
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/radek/NetBeansProjects/sms/hs_err_pid8875.log
#
# If you would like to submit a bug report, please include
# instructions on how to reproduce the bug and visit:
# https://bugs.launchpad.net/ubuntu/+source/openjdk-7/
#
Java Result: 134
I have no idea how to tackle this.

I had similar problem on my ubuntu 11.10 64bit edition.
Problem was because I installed RXTX manually and it was incompatible with my architecture.
I re-installed RXTX using
sudo apt-get install librxtx-java
and now it works. I hope this helps.

rxtx-java reportedly will crash with openjdk 7 on Ubuntu 64bit.
I'm also getting the same with above said configuration (12.04LTS)
read here https://lists.launchpad.net/openjdk/msg08527.html

I installed a newer version and it's working fine now.

Download the updated version on the site: http://jlog.org/rxtx-lin.html
"Download 'RXTXcomm.jar' and install it in the 'lib/ext' folder of the Java VM (e.g. for Ubuntu 11.04: '/usr/lib/jvm/java-6-sun-1.6.0.26/jre' and for RH9 with Sun's Java 1.6.0_04: '/usr/java/j2re1.6.0_04/lib/ext').
You may need to download the file to a temporary location (e.g. Desktop) and use a privileged command (or sudo from the command/terminal) to move it to the destination.
If you are upgrading from V 3.x or V4 Beta 2 (i.e. from an older version of RXTX), please remove the file 'librxtxSerial-2.1-x.so' in the '/lib/386' folder (or equivalent).
Download 'librxtxSerial.so' and install it in the 'lib/i386' or 'lib/amd64' folder of the Java VM (e.g. for Ubuntu 11.04: '/usr/lib/jvm/java-6-sun-1.6.0.26/jre' and for RH9 with Sun's Java 1.6.0_04: '/usr/java/j2re1.6.0_04/lib/i386'). Try the 'bin' folder for this file if the 'lib/i386' is not found (e.g. for IBM's Java 1.4.x). Make sure that 'librxtxSerial' has execute permissions for all. You may need to download the file to a temporary location (e.g. Desktop) and use a privileged command (or sudo from the command/terminal) to move it to the destination.
You may need to Log in as 'root' and add your jLog user to the group owning the '/var/lock' directory and the group owning the serial port (e.g. /dev/ttyS0) to be used. This is not needed for Ubuntu 11.04.
This would typically (e.g. for Red Hat 9 and Fedora Core) be users 'lock' and 'uucp' respectively.
Try running jLog as root if you experience problems, i.e. to find out if the problem is caused by improper access or improper installation of the files."

Related

JVM crashes when loading a native library

I'm working on a CD burner using java, where ( using JNI ) i must load some native libraries (DLL). Well, i know that to load a native library using "System.loadLibrary(libName)", the library must be set to one of the "java.library.path" paths, however if using "System.load(libPath)" there is no need for that.
So, i used to load all my native libraries using "System.load(libPath)" and that worked for all of them except a single one "BurnerCaller.dll" that causes a JVM crash with the error message below.
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (0xe0434352), pid=2280, tid=0x00000000000013a8
#
# JRE version: Java(TM) SE Runtime Environment (8.0_92-b14) (build 1.8.0_92-b14)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.92-b14 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C [KERNELBASE.dll+0xaa7d]
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\Program Files\Java\MainWorkspace\NewAman\hs_err_pid2280.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
Here is the detailed result error.
The weird thing is that if and only if i put this library to the "bin" directory of the currently running JRE or JDK (that my application is using to run) it works like a charm.
Any help would be appreciated, thanks in advance.
Try other JDK (Oracle JDK, Open JDK, versions 6,7,8). make sure dll bitness (32 vs 64) match JDK bitness
Debug native code
It looks like pure native problem and you should use native tools.
If you have source code of BurnerCaller.dll you can attach(Visual Studio, WinDbg)\debug\fix it. At least you will see the stacktrace of native crash.
If you don't have the souce - just put it in java bin directory, the easiest way.
When system loader loads a library, it calls DllMain for this library, looks like the bug is somewhere around it.

run PyCharm on arch linux

I use pycharm-professional on arch linux, but since yesterday it does not run properly, here is the error when running it in temrinal:
[kahrabian#Kian-Arch ~]$ pycharm
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=350m; support was removed in 8.0
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=lcd
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f26f93b5be0, pid=1999, tid=139805401143040
#
# JRE version: Java(TM) SE Runtime Environment (8.0_60-b27) (build 1.8.0_60-b27)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.60-b23 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C 0x00007f26f93b5be0
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/kahrabian/java_error_in_PYCHARM_1999.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
#
/opt/pycharm-professional/bin/pycharm.sh: line 187: 1999 Aborted (core dumped) LD_LIBRARY_PATH="$IDE_BIN_HOME:$LD_LIBRARY_PATH" "$JDK/bin/java" $AGENT "-Xbootclasspath/a:$IDE_HOME/lib/boot.jar" -classpath "$CLASSPATH" $VM_OPTIONS "-Djb.vmOptionsFile=$VM_OPTIONS_FILES_USED" "-XX:ErrorFile=$HOME/java_error_in_PYCHARM_%p.log" -Djb.restart.code=88 -Didea.paths.selector=PyCharm40 $IDE_PROPERTIES_PROPERTY $IDE_JVM_ARGS $REQUIRED_JVM_ARGS $MAIN_CLASS_NAME "$#"
and here is the log file generated after trying to run pycharm:
http://paste.ubuntu.com/12775734/
as I can't understand the problem and it's origin, I need some help to solve this problem.
Unfortunately this is a known incompatibility with the current glib and Oracle JVM.
See here: https://youtrack.jetbrains.com/issue/IDEA-146207
And here: https://bugzilla.gnome.org/show_bug.cgi?id=755609
There are a few workarounds that you can use for the time being (found from here: https://bugs.archlinux.org/task/46619)
Prepend the command with PRELOAD=/lib/libglib-2.0.so (e.g. PRELOAD=/lib/libglib-2.0.so pycharm)
Install this patched glib from the arch forum thread (I'd be weary to use this solution without first checking the safety of this package): http://pkgbuild.com/~heftig/glib2-2.46.0-2-x86_64.pkg.tar.xz
Downgrade GLib-2 for now (only works if you still have the old package cached). The command to do this will look something like: pacman -U /var/cache/pacman/pkg/glib2-2.44.1-1-x86_64.pkg.tar.xz. You can also downgrade package using other tools, like downgrade from AUR, the just run downgrade glib2
Hopefully this bug will be squashed soon.
For anyone else running into this error and do not want to downgrade glib, the command from step #1 solution needs to be changed to:
# x64
LD_PRELOAD=/lib64/libglib-2.0.so pycharm
# x86
LD_PRELOAD=/lib/libglib-2.0.so pycharm
to build on the answer given by #8bitAce:
You actually don't need to install the older glib2 version in order to use it to run pycharm. Just extract the old glib2 package somewhere in your home directory:
mkdir -p $HOME/oldlibs/pycharm
tar Jxf /var/cache/pacman/pkg/glib2-2.44.1-1-x86_64.pkg.tar.xz -C $HOME/oldlibs/pycharm
Then start pycharm:
LD_PRELOAD=$HOME/oldlibs/pycharm/usr/lib/libglib-2.0.so pycharm
This way the rest of your programs (which may depend on the newer glib2 version) aren't forced to use an old glib2 version, and run the risk of other problems.
I had the same issue. I was using OpenJDK JRE 9, and that seems to have been the source of problem. I've later installed Oracle's JRE 8 and everything is okay. Maybe with OpenJDK JRE 8 it will work as well.
There is a pre-built package in this repo:
[archlinuxcn]
SigLevel = Optional TrustAll
Server = http://repo.archlinuxcn.org/$arch

A fatal error has been detected by the Java Runtime Environment:

I have imported repository from git and performed maven build. When I run my project with "clean install -U -Denvironment.type=dev -P autoInstallPackage -P analysis -P analysisCI" goals it throws following errors. Can some one please help me solving this.
# A fatal error has been detected by the Java Runtime Environment:
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000052811d2e, pid=6564, tid=7972
# JRE version: Java(TM) SE Runtime Environment (7.0_79-b15) (build 1.7.0_79-b15)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.79-b02 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# V [jvm.dll+0x3f1d2e]
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
# An error report file with more information is saved as:
# C:\Users\amummadi\git\kpmg-advisory\hs_err_pid6564.log
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
Thanks in Advance!
I've occasionally had this happen to me. Never did figure out why. But I figured out that I could fix things by completely cleaning out my maven repo cache. (And then, of course, suffer maven's famous "download-the-world" experience on my next build.)
I moved Eclipse from one SSD disk partition to another partition of the same SSD, to the root. The program is working!
This means that your Java installation files are probably corrupted with relation to the repositories files or the installation files being used by your installer.
Typical Solution
Attempt to reinstall the JRE on your computer. This is easiest by doing:
Click the Start button.
Select Control Panel.
Click Programs | Uninstall a program.
In the Search box on the top right corner, type “Java”
Right click “Java Runtime Environment” from the Search Results, select Uninstall option.
Alternatively
This may be an error with the installation package associated with your installer which might mean you need to rebuild your installer, though I have only had to deal with this scenario once before with an installation package our company produced.

Eclipse (C++) crash Failed to write core dump. Core dumps have been disabled

I found a related problem here: how to fix “Failed to write core dump. Core dumps have been disabled” error while running java and here: Eclipse crashing on startup and here: Eclipse continue crash.
The solutions doesnt work for my problem:
# A fatal error has been detected by the Java Runtime Environment:
#
#SIGSEGV (0xb) at pc=0x00007f235f554fe0, pid=5347, tid=139790954133248
#
# JRE version: OpenJDK Runtime Environment (7.0_65-b32) (build 1.7.0_65-b32)
# Java VM: OpenJDK 64-Bit Server VM (24.65-b04 mixed mode linux-amd64 compressed oops)
# Derivative: IcedTea 2.5.3
# Distribution: Ubuntu 14.04 LTS, package 7u71-2.5.3-0ubuntu0.14.04.1
# Problematic frame:
# C [libglib-2.0.so.0+0x38fe0] g_str_hash+0x0
#
# Failed to write core dump. Core dumps have been disabled. To enable coredumping, try "ulimit -c unlimited" before starting Java again
#
# If you would like to submit a bug report, please include
# instructions on how to reproduce the bug and visit:
# http://icedtea.classpath.org/bugzilla
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
The Crash happens, when I want to open the slide: Windows/Breakingpoint Types. At the moment I hit the slide with my Mouse, ecipse tries to open the slide (witch is empty) and crashes.
Furthermore I am not able to toogle BreakingPoints in my code, the option under /Run is greyed out. Shift+Contro+B doesn"t work either.
I tried:
Reinstallation of eclipse,
Adding the lines to the config.ini (seperatly)
-Dorg.eclipse.swt.browser.DefaultType=mozilla
org.eclipse.swt.browser.DefaultType=mozilla
I am Using:
Eclipse for Parallel Application Developers
Version: Luna Service Release 1 (4.4.1)
Build id: 20140925-1800
Ubuntu 14.04
Thank you for reading.
`
SIGSEV related with segmentation fault because of array boundaries,invalid memory addresses.
Solutions:
re-install eclipse first.
if not works then re-install java with eclipse.
OR
Add -XX:LoopUnrollLimit=1 as an argument.
Reference : Enterprise Software Development : Don't use JAVA-7

Java EE installer crashing on Mac OS X Mavericks

Trying to install Java EE 7/Glassfish 4 on OS 10.9 Mavericks and it crashes every time. I have tried installing the Apple JDK and the Oracle JDK and neither work. Has anyone ran into this? I remember installing on 10.8 and it worked just fine. Thanks!
Environment Variables:
$ echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home
Output:
$ chmod +x java_ee_sdk-7-jdk7-macosx-x64.sh
$ ./java_ee_sdk-7-jdk7-macosx-x64.sh
Extracting the installer archive...
Extracting the installer runtime... Extracting the installer
resources... Extracting the installer metadata...
Welcome to GlassFish installer
Using the user defined JAVA_HOME :
/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home
Entering setup... SwixML 1.5 (#144)
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x0000000119956af9, pid=5178, tid=50183
#
# JRE version: Java(TM) SE Runtime Environment (7.0_45-b18) (build 1.7.0_45-b18)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.45-b08 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# C 0x0000000119956af9
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /var/folders/4t/7dky_l096m1fdl5gncg_w__80000gn/T//hs_err_pid5178.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.sun.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
# /tmp/install.111513141256/install/bin/engine-wrapper: line 139: 5178 Abort trap: 6 ${JAVA_HOME}/bin/java ${JAVA_OPTIONS}
-Dinstall.engine=${theInstallEngine} -Dinstaller.resources.url=${MEDIALOC}/ -Ddefault.resources.url=file:${INSTALL_HOME}/lib/resources/ -classpath ${theCP} -Dsims.native-file-dir=${INSTALL_HOME}/lib
org.openinstaller.core.EngineBootstrap ${INSTALLPROPS}
Just a wild guess, because I had a similar issue with another software:
try to run the installation with sudo
sudo [your installer]
I know this is an old question, but I just ran into the same problem and thought my solution may help others in the future.
I found the answer here: https://apple.stackexchange.com/a/115708/89930
To summarise, you need to set a couple of variables and then run the installer in silent mode.
Start by creating a new text file called 'silent_install_answer_file' and add the following contents, updating values as necessary:
ClusteredInstance.Configuration.CLUSTER_NAME=c1
ClusteredInstance.Configuration.CREATE_CLUSTER=false
ClusteredInstance.Configuration.DOMAIN_NAME=domain1
ClusteredInstance.Configuration.INSTANCE_NAME=instance1
ClusteredInstance.Configuration.SERVER_ADMIN_PORT=4848
ClusteredInstance.Configuration.SERVER_HOST_NAME=localhost
ConfigType.Option.CREATE_CLUSTEREDINSTANCE=CREATE_CLUSTEREDINSTANCE
ConfigType.Option.CREATE_DOMAIN=CREATE_DOMAIN
ConfigType.Option.CREATE_STANDALONEINSTANCE=CREATE_STANDALONEINSTANCE
ConfigType.Option.NO_CONFIGURATION=NO_CONFIGURATION
Domain.Configuration.ADMIN_PASSWORD=password
Domain.Configuration.ADMIN_PASSWORD_REENTER=password
Domain.Configuration.ADMIN_PORT=4848
Domain.Configuration.ADMIN_USER=admin
Domain.Configuration.CREATE_SERVICE=false
Domain.Configuration.DOMAIN_NAME=domain1
Domain.Configuration.HTTP_PORT=8080
Domain.Configuration.SERVICE_NAME=domain1Service
Domain.Configuration.START_SERVER=false
InstallHome.directory.INSTALL_HOME=/usr/local/glassfish4
InstallType.Option.CONFIG_ONLY=CONFIG_ONLY
InstallType.Option.INSTALL_AND_CONFIG=INSTALL_AND_CONFIG
InstallType.Option.INSTALL_ONLY=INSTALL_ONLY
InstallUserType.Option.ADVANCED_USER=ADVANCED_USER
InstallUserType.Option.BASIC_USER=BASIC_USER
JDKSelection.directory.HIDDEN_JDK=
JDKSelection.directory.JDK_FROM_LIST_CHOICE=false
JDKSelection.directory.JDK_LIST=
JDKSelection.directory.JDK_TYPE_IN=
JDKSelection.directory.JDK_TYPED_IN_CHOICE=false
RegistrationOptions.regoptions.CREATE_NEWACCT=CREATE_NEWACCT
RegistrationOptions.regoptions.DUMMY_PROP=
RegistrationOptions.regoptions.SKIP_REGISTRATION=SKIP_REGISTRATION
RegistrationOptions.regoptions.USE_EXISTINGACCT=USE_EXISTINGACCT
RegistrationOptions.regoptions.USERNAME=
RegistrationOptions.regoptions.USERPASSWORD=
SOAccountCreation.accountinfo.COMPANYNAME=
SOAccountCreation.accountinfo.COUNTRY_DROP_DOWN=
SOAccountCreation.accountinfo.COUNTRY=
SOAccountCreation.accountinfo.EMAIL=
SOAccountCreation.accountinfo.FIRSTNAME=
SOAccountCreation.accountinfo.LASTNAME=
SOAccountCreation.accountinfo.PASSWORD=
SOAccountCreation.accountinfo.REENTERPASSWORD=
StandaloneInstance.Configuration.INSTANCE_NAME=instance1
StandaloneInstance.Configuration.SERVER_ADMIN_PORT=4848
StandaloneInstance.Configuration.SERVER_HOST_NAME=localhost
UpdateTool.Configuration.ALLOW_UPDATE_CHECK=true
UpdateTool.Configuration.BOOTSTRAP_UPDATETOOL=true
UpdateTool.Configuration.PROXY_HOST=
UpdateTool.Configuration.PROXY_PORT=
Check that the JAVA_HOME environment variable is set appropriately:
export JAVA_HOME="$(/usr/libexec/java_home)"
Create the /Users/username/temp directory if it does not already exist (mkdir /Users/username/temp).
Lastly, run the installer with sudo. You may also need to set the DISPLAY variable at the same time:
$ sudo DISPLAY=:0 ./java_ee_sdk-7-jdk7-macosx-x64.sh -a silent_install_answer_file -l /Users/username/temp -s
The installer may take a few minutes to complete and, as it is running in silent mode, you may not see much output during that time, so be patient.
If you have trouble running the installer in silent mode, the GlassFish installer documentation may be of some use to you: https://glassfish.java.net/docs/4.0/installation-guide.pdf
A seemingly related question: java ee install failing on OSX
Hope that helps someone!

Categories