Questions tagged [staledataexception]
26 questions
12
votes
2 answers
What can cause StaleDataException other than prematurely calling cursor.close()?
I'm currently heavily modifying/rewriting an Android app and I have seen a very occasional crash along the following lines: a CursorAdapter method is called, it calls AbstractWindowedCursor#checkPosition(), and:
02-20 15:03:18.180…

Andrew Wyld
- 7,133
- 7
- 54
- 96
7
votes
3 answers
StaleDataException with dialog
I am trying to show a dialog with a listview with names from my database but I keep getting a StaleDataException. I know that usually means I am trying to use data from a closed cursor but the cursor does not close until I get all the data so I dont…

tyczj
- 71,600
- 54
- 194
- 296
5
votes
4 answers
Can someone explain to me this `StaleDataException`
Can someone explain to me this StaleDataException
07-11 19:58:23.298 E/AndroidRuntime( 1044): Uncaught handler: thread main exiting due to uncaught exception
07-11 19:58:23.368 E/AndroidRuntime( 1044): android.database.StaleDataException: Access…

Pentium10
- 204,586
- 122
- 423
- 502
4
votes
2 answers
Java: ORMLite with SimpleCursorAdapter: StaleDataException
This is my first time testing out SimpleCursorAdapter. I want to use it with ORMLite.
Unfortunately, I always get StaleDataException :(
EDIT:
not sure anymore if adapter.swapCursor(c) is the problem. stepped over that without problems. the problem…

cdbeelala89
- 2,066
- 3
- 28
- 39
3
votes
1 answer
Android - android.database.StaleDataException during Activity destruction
I'm facing this crash in my app for now in only two devices, both Samsung Galaxy (SM-G950F [api 26] & Galaxy J7 [api 23]).
I think the fact they are Samsung is pretty important because with all the other testing devices I use (physical, LG [api 24],…

Massimo Baldrighi
- 365
- 2
- 6
- 17
3
votes
1 answer
Hibernate returns stale Objects when calling findOne
I am saving objects using Spring Data JPA save(Object entity) method from a multi-threaded web application.
Occasionally I find that when I load an object from the session using:
findOne(long id)
The object returned from the session is stale and…

DD.
- 21,498
- 52
- 157
- 246
3
votes
2 answers
Merging cursors during onLoadFinished() causes StaleDataException after rotation
I'm loading some results from a database using a loaderManager. Unfortunately, the following code produces a StaleDataException after rotating the device:
@Override
public void onLoadFinished(Loader loader, Cursor cursor)
{
// If we've…

IAmKale
- 3,146
- 1
- 25
- 46
3
votes
0 answers
Trying to use a UUID for a primary key. Getting stale data on SQLalchemy commit()
Starting SQLalchemy user here. I plan to use UUID's as the primary keys for my tables.
In the tutorial I saw some code for using the native Python UUID type in ORM classes. Eureka! I can use Postgresql's native UUID type for my system database and…

adamek
- 2,324
- 3
- 24
- 38
2
votes
0 answers
App Design Issue : android.database.StaleDataException
Firstly I have investigated other StaleDataExceptions on SO but none really answer, or lead me to a solution to my current App design problem.
I'm creating a Music Player App, which I initially designed to query the MediaStore.Audio with a…

Mark
- 9,604
- 5
- 36
- 64
2
votes
1 answer
How to receive notification on 404,409 and other server errors on jsonp call
I have this jsonp function:
function jsonp(url, callback) {
var script = document.createElement("script");
script.setAttribute("type","text/javascript");
…

Alon
- 7,618
- 18
- 61
- 99
1
vote
0 answers
List filtering error when i match a row name "StaleDataException"
Hi guys I'm getting an error, StaleDataException. This error keeps occurring if the edit text i am using to filter the list is blank or it matches a "Like Criteria". Im using a cursor to try and fetch the new rows, any help for this would be great…

aspiringCoder
- 415
- 1
- 9
- 24
1
vote
1 answer
How to use Selenium in Python to update multiple page elements without refreshing the DOM to avoid StaleElementReferenceException?
I have a school website html page that is used for publishing homework that looks something like this:
When you click on each lesson, a javascript div element pops up where you write in the homework and submit via a button.
I wanted to automate…

hardCrash
- 13
- 3
1
vote
1 answer
Cursor problem/Stale Data Exception in unusual situation
Hoping someone can assist with this what seems to me a peculiar problem.. My mind is pulsing a little here as it's blown my understanding of the Android Activity Lifecycle.. Let me try to make things clearer.
Problem: I'm receiving a…

David Brown
- 3,021
- 3
- 26
- 46
1
vote
1 answer
Closing Cursor causes StaleDataException on backgrounding fragment with CursorAdapter
This is a follow up to my question here:
How to close a cursor used in a for loop
The responses solved the "Cursor finalized without prior close" warning but it has caused a StaleDataException in a very particular situation.
If the list has been…

user1977132
- 487
- 2
- 18
1
vote
2 answers
How to close a cursor used in a for loop
Background
I have a cursor used as follows:
for (int n=0; n

user1977132
- 487
- 2
- 18