I've been attempting to resolve memory issues that cause my app to break when I attempt to create a bitmap with writing and images on it (via canvas / paint). I've been looking into attempting to get the right files repeated in the right places, at the right sizes across all of the various drawables folders.
This involved cutting and pasting a few files in and out, attempting to remove some duplication etc.
However after moving files around I started getting only Fatal signal 7 (SIGBUS) errors on my Nexus 5. I restored my drawables folders to how they were, and I'm still getting the error no matter what I do. Also an S3 Mini that I use for testing returns FileNotFoundException when I try to access a drawable:
Uri uri = Uri.parse("android.resource://"+getPackageName()+"/drawable/"+getApplicationContext().getResources().getResourceEntryName(imgId));
The path in the error in DDMS looks fine, and no different from when it was working. I really haven't changed anything else and have reverted everything I can, but I seem to have somehow corrupted something to do with my drawables.
I realise there isn't a huge amount to go on here, and I'm not posting my code as I'm not looking for a huge technical solution that dives into my extensive codebase, more just information as to whether this is a known problem / any ideas on what could be causing such a strange issue. I'm using Android Studio.
Related
I am in the process of upgrading from Skobbler 2.3 to the latest 2.5 and I am picking up an error with navigation.
When onUpdateNavigationState() is called, all data in the SKNavigationState object is always empty. For instance, getCurrentAdviceDistanceToAdvice() is always 0, getCurrentAdviceCurrentStreetName() is always "" etc. The only value that is consistently populated is from getCurrentAdviceTimeToDestination(), but that value is always incorrect. The value should be in the region of 16 hours, but is more like 440 hours.
Other problems are:
Visual advices are not displayed correctly
Audio advices are not heard, both when using Text to speech and when using audio files
Interestingly, the route is calculated correctly. The map is displayed correctly, complete with road names etc. The map can be panned, zoomed etc correctly. When navigation is started, the calculated route is displayed correctly and when using the simulator, follower mode is activated correctly and the vehicle follows the calculated route. However the SKNavigationState object always contains empty values even though looking at the map, I can see the name of the road displayed.
I've checked SKMaps.zip and the correct language files are included etc.
Originally, I tried upgrading from 2.3 to 2.5. After this failed (i.e. with the problems above) I abandoned upgrading and now I am unzipping SKMaps.zip to a completely new location on disk, but the problem persists. No preloaded maps are being used.
The problem occurs even after uninstalling the app. I've tried installing on a completely different phone and the problem still remains.
None of these were issues with the 2.3 API which just worked. Any help would be appreciated.
Test phones:
Galaxy S3 running Android 4.3
Galaxy Note 4 running Android 5.0.1
I got the same issue several weeks ago, I found out that the paths where the Advisor files (audios, advices and other files) were wrong. I'd recommend you to debug the application where the AdvisorSettings files and paths are configured and double check whether those paths are well configured and the files inside them are properly located.
Regards.
I'm creating a version of my game for app stores such as Amazon, which don't have the APK expansion mechanism - so I put all the files in my "assets" folder.
However, my 300+ MB APK seems to create a lot of problems:
When I try to install it with ADB on either the emulator or Samsung Galaxy S2, about 75% of the times it fails. From Samsung, I get INSTALL_FAILED_MEDIA_UNAVAILABLE (although it's not mounted, and there's plenty of free space), and from the emulator, I get just 'null'.
Again, this happens about 75% of the time, completely random.
My game locks up at a certain point in native code. There's absolutely nothing there that can lock up or has anything to do with the OS - just plain C++ logic.
I verified that this issue happens ONLY when I push large assets into the APK. If I remove the assets (completely unused, just pushing large files there), the issue doesn't happen.
Just to clarify - in order to test that, I manually pushed the game files into the device, so it has nothing to do with the asset extraction.
This is very weird, and I'm starting to consider getting my own expansion file server.
Any ideas?
UPDATE:
Found the solution to #2. The code base I was using was doing something hackish in the background with the APK assets, that's why it locked up. I removed that code, so #2 is irrelevant.
The only issue now is difficulty installing large APK files.
How about making two seperate apps for the game?
One for the game code and the other for just the large assets. Pardon my intrusion.
I found that the installation problem happens only with ADB.
By manually copying a big APK to the device external storage, and then installing using a file manager app, there is never a problem.
Regarding the 2nd problem - as updated on the original question - it was a specific problem with the app (someone wrote shitty code that manipulates all the APK assets).
I get the following error on my Android device:
E/OsclNativeFile( 1616): OsclNativeFile::Seek lseek64 failed
I want to know what it means, because I wasn't making anything special just getting a battery drain and the logcat show me zillion lines like the above. Thanks.
I got the same. That happened after i had updated my LG Optimus One P500 phone to android 2.3.3. I read this topic with no answers and was a bit disappointed. I tried to come back to 2.2, but phone didn't start (it stopped at android logo). I installed 2.3.3 again and it started normally. Then i experimented and soon noticed that there was no errors with sd-card unmounted. So I removed all programs from sd-card, and deleted all files from it (I moved it to laptop). And I have no such errors now. Maybe there is an easier way to solve it, but it has worked in my case.
The lseek64() system library function is typically used to access large files (2GB or greater). It's possible there's a flaw with the way the platform implements lseek64. A workaround--as tonixart has discovered--is to delete the large files on your sdcard.
As the titles state, I can't drag widgets onto the screen. Attempting to do so simply produces a dashed outline, but the widget isn't added. Different widgets cause differently-sized outlines to be created, so the application (Eclipse) is recognizing my input to some degree. No errors are produced either.
I've found no documentation on the drag-and-drop UI approach, probably because it's supposed to be self-explanatory (I had no problems doing the same thing on Qt, for example). Also note that I've gotten a basic "hello world" program working, both on an emulated device and on a smartphone.
I tried uploading a picture illustrating the problem but as I am a new user I don't have the permissions to do so.
EDIT: Well restarting Eclipse fixed the issue, though I still don't know what caused it.
Well restarting Eclipse fixed the issue, though I still don't know what caused it.
I have an app that displays an an image in an ImageView using the setImageDrawable(Drawable) method. However, with the release of the Droid Incredible the images are coming up as a blank screen. I am using Drawable.createFromPath(Environment.getExternalStorageDirectory() + "\\imagefile") to access the image from the SD card. I don't get any sort of error, just a black screen. I will get a null pointer exception if after trying to load the image I try to access a property of the Drawable. This makes me believe that the Drawable wasn't loaded, but I don't know why or how to make it work.
This code as been working on all other Android devices, so I'm not sure what is different with the Incredible.
Unfortunately I don't have access to an Incredible to test on, so I've got to rely on others to test and send me the log files. Any help you can offer would be greatly appreciated. If anyone knows how to replicate this issue on the emulator, that would be helpful too. I've configured an emulator with firmware 7 and the correct screen resolution, but I was unable to replicate the issue.
The Incredible does not come with an SD card. Instead, it has 8GB internal storage you can work with. See here for more information.
Heh, I just noticed Mark already said this.
I've verified that it's not an issue with the SD card (although that is another issue to be addressed). Using an Incredible with an SD card installed produces the result described above as does saving/loading the image from the internal memory ("/emmc").