IDE crashes daily - is it Ubuntu , is it Android-studio or something else? - android-studio

--EDIT-- following #siva advice, i switched over to Oracle JDK from OpenJDK.
also updated a bunch of recently added stuff in the SDK 'manager'...
--END EDIT --
At random, UI event in the IDE like ( open edit on android proj file ) results in very long UI freeze then app crash.
Env:
Android studio 1.0 Prod
Ubuntu 12.04 - 3.8.13-03081328-generic
Random crashes ( daily in Android-studio IDE ) that produce large , 'apport' crash dump in :
-rw-r----- 1 rob whoopsie 177030197 Dec 9 20:14 _usr_lib_jvm_java-7-openjdk-amd64_jre_bin_java.1000.crash
NOTE - im still using the 'openJDK' with AS despite the warning in AS about issues with JVM's other than oracle. Maybe , after all this time on ubuntu/OpenjavaJSK , i need to switch JVM's
.
Ubuntu reports a crash dialog error in a pop-up box similar to this one
Pretty sure the abend is within a shared lib in folder:
/home/user/.AndroidStudio/system/tmp/native-platform-nnn-dir/libnative-platform.so
Where to report this?
ubuntu apport crash dump
OR
Android-studio forums
IMO - its within a shared lib installed by the app ( AS ) but i dont see anything in the Android-studio forum space mentioning this type of crash??
PS - what are all these Shared libs under /home/user/.Androidstudio/system/tmp
drwxrwxr-x 2 rob rob 4096 Nov 28 06:56 native-platform2953326984648443135dir
drwxrwxr-x 2 rob rob 4096 Dec 8 18:03 native-platform5404575141685110828dir
drwxrwxr-x 2 rob rob 4096 Dec 5 13:28 native-platform5488604906885341235dir
drwxrwxr-x 2 rob rob 4096 Dec 9 09:29 native-platform5969166866748048826dir
drwxrwxr-x 2 rob rob 4096 Dec 9 20:25 native-platform6032919435567587484dir
drwxrwxr-x 2 rob rob 4096 Dec 2 07:16 native-platform800088999941561401dir

If you are using OpenJDK, switch to Oracle JRE. Put it somewhere and set STUDIO_JDK to point to it.

Related

Can't write data to applesmc error, after upgrade to Arch linux kernel 5.8.1

I'm using the current version of mbpfan (mbpfan-git-2.2.1.r4.g52d8973-1-x86_64) from Arch User Repository, running Arch linux on a MacBookPro 6,1 mid-2010 (on external usb, actually). Mbpfan is a small daemon designed to control mac fan speed and solve heat problems.
After a recent upgrade to 5.8.1 kernal, from 5.7.12, mbpfan does not work,
with error
Aug 20 17:19:56 ehost kernel: applesmc: send_byte(0x03, 0x0300) fail:
0x00 Aug 20 17:19:56 ehost kernel: applesmc: FS! : write data fail
and
ehost mbpfan[380]: Could not set fan speed: Input/output error Aug 20
17:21:56 ehost kernel: applesmc: send_byte(0x40, 0x0300) fail: 0x00
Aug 20 17:21:56 ehost kernel: applesmc: F0Tg: write data fail
FS! fail is saying, can't change fan to "manual," and F0Tg is the first fan where it
tries to write a new speed.
From looking in /sys/devices/platform/applesmc.768 one can see that even root can only write to fan1_manual, fan1_min, and
fan1_output, for example.
-r--r--r-- 1 root root 4096 Aug 18 21:00 fan1_input
-r--r--r-- 1 root root 4096 Aug 18 21:01 fan1_label
-rw-r--r-- 1 root root 4096 Aug 18 21:00 fan1_manual
-r--r--r-- 1 root root 4096 Aug 18 21:00 fan1_max
-rw-r--r-- 1 root root 4096 Aug 18 21:00 fan1_min
-rw-r--r-- 1 root root 4096 Aug 18 21:00 fan1_output
The above permissions have not changed from earlier kernels when mbpfan worked.
They are exactly the same on the installations where mbpfan works (different usb stick, same machine).
Permissions should not be an issue, as I understand that one writes to "fan1_output," which is rw, to set the desired fan speed (counterintuitively).
As a test, I upgraded another installation with a working mbpfan (kernel 5.7.9) to 5.8.1, and the same no write problem appears.
--It seems that something in the kernel that affects mbpfan has changed between
5.7.12 and 5.8.1.
Naturally, I have reported this at the developer's git hub area. I've been digging around in the code a bit, but it's tough going so far as I really know nothing about drivers. --I'd really appreciate any suggestions on what I might try to get this working...

How to solve initialization error 1 (read_params_file: parameter not found: II*) when using --tessdata-dir parameter?

Environment & Setup
Operating System: Suse Linux Enterprise Server 12 SP 1
$ uname –a
Linux 3.12.62-60.64.8-default #1 SMP Tue Oct 18 12:21:38 UTC 2016 (42e0a66) x86_64 x86_64 x86_64 GNU/Linux
Since this environment is managed, I can not update any system libraries like glibc etc.
So the newest and only official supported version for "Suse 12 SP1 x86_64" of teaaseract I found is 3.02.
Installed Packages:
libgif4-4.1.6-34.1.1.x86_64.rpm
liblept3-1.69-16.1.x86_64.rpm
libtesseract3-3.02.02-3.2.1.x86_64.rpm
libwebp4-0.3.1-34.1.x86_64.rpm
tesseract-3.02.02-59.1.x86_64.rpm
tesseract version
$ tesseract –v
tesseract 3.02.02
leptonica-1.69
libgif 4.1.6 : libjpeg 8d : libpng 1.5.22 : libtiff 4.0.6 : zlib 1.2.8
Release details
$ zypper info tesseract
Information for package tesseract:
----------------------------------
Repository: #System
Name: tesseract
Version: 3.02.02-59.1
Arch: x86_64
Vendor: obs://build.opensuse.org/home:koprok
Support Level: unknown
Installed: Yes
Status: up-to-date
Installed Size: 3.8 MiB
Summary: Open Source OCR Engine
Description: […]
Traindata & Languages
Traindata has been manually downloaded from:
https://sourceforge.net/projects/tesseract-ocr-alt/files/tesseract-ocr-3.02.eng.tar.gz/download
https://sourceforge.net/projects/tesseract-ocr-alt/files/tesseract-ocr-3.02.deu.tar.gz/download
And files have been extracted to /usr/share/tessdata/
$ ls -la /usr/share/tessdata/
drwxr-xr-x 1 root root 230 Dec 31 16:37 configs/
-rw-r--r-- 1 root root 2438081 Dec 30 15:31 deu.traineddata
-rw-r--r-- 1 root root 171918 Dec 30 20:16 eng.cube.bigrams
-rw-r--r-- 1 root root 38 Dec 30 20:16 eng.cube.fold
-rw-r--r-- 1 root root 181 Dec 30 20:16 eng.cube.lm
-rw-r--r-- 1 root root 857304 Dec 30 20:16 eng.cube.nn
-rw-r--r-- 1 root root 254 Dec 30 20:16 eng.cube.params
-rw-r--r-- 1 root root 13020078 Dec 30 20:16 eng.cube.size
-rw-r--r-- 1 root root 2444187 Dec 30 20:16 eng.cube.word-freq
-rw-r--r-- 1 root root 996 Dec 30 20:16 eng.tesseract_cube.nn
-rw-r--r-- 1 root root 21876572 Dec 30 20:16 eng.traineddata
drwxr-xr-x 1 root root 88 Dec 31 16:37 tessconfigs/
tesseract detects 'deu' and 'eng' as available languages
$ tesseract --list-langs
List of available languages (2):
deu
eng
Application & Problem
The software application is build based on Spring Boot framework. The code executing the tesseract command looks sth. like:
Runtime.getRuntime().exec(new String[] {
"tesseract",
"--tessdata-dir", "/usr/share/tessdata",
"-l", lang.getISO3Language(),
inputTiff.toAbsolutePath().toString(), extractedcntPath });
The appication logfile says
2016-12-30 20:30:02,320 [https-jsse-nio-8443-exec-7] WARN PDFContentExtractor - read_params_file: parameter not found: II*
Executing tesseract with tessdata dir fails
$ tesseract --tessdata-dir /usr/share/tessdata -l deu inputPdf6632237754781472255.tiff out4
read_params_file: parameter not found: II*
When executing tesseract with no tessdata dir works well
$ tesseract -l deu input.tiff out5
Tesseract Open Source OCR Engine v3.02.02 with Leptonica
Questions & Ideas
Why does tesseract work well and detect the available languages without the --tessdata-dir parameter set?
Why does teasseract crash during initialization when using the --tessdata-dir parameter set?
Is there any difference between running tesseract with/without the --tessdata-dir parameter set?
What can I do to fix this problem?
Install a newer version of tesseract?
Compile a version from sources?
Use other traindata/tessdata?
Run tesseract without the --tessdata-dir param?
If anybody can help me getting this issue solved in the upcomming week, it would not only make me happy, but rather our whole team.
Thank you very much in advance!
-Rüdiger
That command switch is not available until 3.04 version. Executing tesseract command will reveal what command options are supported for the current version.
https://github.com/tesseract-ocr/tesseract/wiki/Command-Line-Usage

CentOS and fontconfig: Cannot load default config file

I'm getting following error when using imagick:
Fontconfig error: Cannot load default config file
My script is working but i would like to fix this (is filling up log file).
OS is:
# cat /etc/redhat-release
CentOS release 5.10 (Final)
I was looking trough internet little bit and this is causing problem:
access("/etc/fonts/fonts.conf", R_OK) = -1 ENOENT (No such file or directory)
Folder exists:
# ls /etc/fonts/ -all
total 64
drwxr-xr-x 4 root root 4096 Jul 9 2010 ./
drwxr-xr-x 86 root root 12288 Jan 13 00:48 ../
drwxr-xr-x 2 root root 4096 Jan 3 2012 conf.avail/
drwxr-xr-x 2 root root 4096 Apr 14 2013 conf.d/
-rw-r--r-- 1 root root 5239 Jan 12 2008 fonts.conf
-rw-r--r-- 1 root root 6907 Jan 12 2008 fonts.dtd
But i see only this folder via root account, other account under with script is run doesn't see this folder. Permissions looks fine for me, but not so experienced with linux.
Account under with script is run is created with WHM.
Please help :)
I manage to solve my problem. chroot was making trouble.
I need to:
log with root account
find jailed environment of account on with i run script (in my case /home/virtfs/[username])
to create folder where i will mount real stuff mkdir /home/virtfs/[username]/etc/fonts
to mount /etc/fonts to this folder: mount --bind /etc/fonts /home/virtfs/[username]/etc/fonts
Posting an answer for CentOS 7 in 2021:
yum install fontconfig
More info here:
https://centos.pkgs.org/7/centos-x86_64/fontconfig-2.13.0-4.3.el7.x86_64.rpm.html

svn permission issue - txn-current-lock: Permission denied

I setup svn on my local system /svn/repos/myproject by following this tutorial. I'm able to view the repo in browser.
But when it try to import new project I couldn't through svn client ( rapid svn ) it shows following error:
Execute: Import
Error while performing action:
Can't open file '/svn/repos/myproject/db/txn-current-lock': Permission denied
Svn directory permissions:
→ ls -l /svn
total 12
drwxrwxr-x 2 root root 4096 Feb 15 12:09 permissions
drwxrwxr-x 4 apache apache 4096 Feb 15 12:09 repos
drwxrwxr-x 2 root root 4096 Feb 15 12:09 users
Repo directory:
→ ls -l
total 8
drwxrwxr-x 3 root root 4096 Feb 15 12:09 conf
drwxrwxr-x 7 apache apache 4096 Feb 15 12:09 myproject
How to solve this issue?
I've given 777 permission to repos directory which solved this issue. But i got another issue like Couldn't perform atomic initialization.
I think this is due to incompatible sqlite version with subversion we're using, this can be solved by updating svnadmin command,
svnadmin create --pre-1.6-compatible --fs-type fsfs /svn/repos/myproject

Java Security Class Couldn't be found

When launching my program the next error pops out
java.lang.NoClassDefFoundError: Could not initialize class javax.crypto.SunJCE_b
which means this class is missing although I've found this class manually, works via jar/ide but doesn't works prefectly via service.
Maybe I need to make a few modifications? but which?
Thanks in advance
I don't know if this is relevant to your problem but I was experiencing the exact same behavior due to versions of the JCE Policy files I was using.
Using the proper Unlimited Strength Cryptography Extenstions solved this issue for me. I believe I might have accidentally installed the extensions for Java 7 as opposed to 6. (I was using Java 6 for compilation)
For a windows machine, they should be installed in the jre/lib/security folder of your installed JDK, for example: c:\program files\Java\jdk1.6.0_33\jre\lib\security
The class should be located in the jce.jar file. This has to be on the classpath. Double check your classpath parameters which should be either the -cp parameter if you start the application without the -jar option xor the Class-Path entry in the jars manifest if you use java -jar myapp.jar to start you program
You found a common WTF ;) - that's a widely unknown rule: if you start you app with the -jar option, then the -cp option and the CLASSPATH environment are ignored. Then the classpath must specified inside the Manifest only.
Quick workaround - assuming, you "main class" is named com.example.App, then start the application like this:
java -cp jce.jar com.example.App
We had the permissions of our files only set to be read only by root and gave us a similar error.
Change permissions and things worked!
$ pwd
/usr/lib/jvm/java/jre/lib/security
$ ls -l
total 128
-rw-r--r--. 1 root root 2177 Mar 1 2013 blacklist
-rw-r--r--. 1 root root 84029 Sep 30 18:01 cacerts
-rw-r--r--. 1 root root 2253 Mar 1 2013 java.policy
-rw-r--r--. 1 root root 11804 Mar 1 2013 java.security
-rw-r--r--. 1 root root 109 Mar 1 2013 javaws.policy
-rw-r--r--. 1 root root 2481 Sep 16 16:50 local_policy.jar
-rw-r--r--. 1 root root 0 Mar 1 2013 trusted.libraries
-rw-r--r--. 1 root root 1924 Jul 18 17:42 truststore-epicinterbld.pem
-rw-r--r--. 1 root root 2465 Sep 16 16:50 US_export_policy.jar
Check which jre is being used when you're launching and make sure the jre/lib/ext folder contains sunjce_provider.jar
Make sure you aren't using the extensions directory option. In the past when I used the extensions directory option instead of a classpath it was no longer able to load the Security libraries and policies. When I went back to using an explicit classpath the Security functionality resumed working.
I deleted various older JDKs in /Library/Java/VirtualMachine (got osx) and after restarting android studio the error was gone, but I hat to set the jdk again. Maybe it helps others.
This is issue with the JRE version, it should point to the same jre version as being used by the program, it looks for "jre/lib/security" should be under the same jdk of your program

Resources