Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forms with selects that have default values cannot be read from cache #6571

Open
grzesiek2010 opened this issue Jan 22, 2025 · 0 comments
Open
Assignees

Comments

@grzesiek2010
Copy link
Member

Problem description

Forms with selects that have default values cannot be read from cache. There is an exception thrown and a form is read from XML. Here is the exception:

java.lang.RuntimeException: FormDef.attachControlsToInstanceData: can't find question to link 	
at org.javarosa.core.model.FormDef.attachControlsToInstanceData(FormDef.java:1407) 	
at org.javarosa.core.model.FormDef.attachControlsToInstanceData(FormDef.java:1392) 	
at org.javarosa.core.model.FormDef.attachControlsToInstanceData(FormDef.java:1392) 	
at org.javarosa.core.model.FormDef.attachControlsToInstanceData(FormDef.java:1387) 	
at org.javarosa.core.model.FormDef.setInstance(FormDef.java:278) 	at org.javarosa.core.model.FormDef.readExternal(FormDef.java:1005) 	
at org.odk.collect.android.utilities.ExternalizableFormDefCache.deserializeFormDef(ExternalizableFormDefCache.java:115) 	
at org.odk.collect.android.utilities.ExternalizableFormDefCache.readCache(ExternalizableFormDefCache.java:86) 	
at org.odk.collect.android.tasks.FormLoaderTask.createFormDefFromCacheOrXml(FormLoaderTask.java:302) 	
at org.odk.collect.android.tasks.FormLoaderTask.doInBackground(FormLoaderTask.java:197) 
at org.odk.collect.android.tasks.FormLoaderTask.doInBackground(FormLoaderTask.java:81) 	
at org.odk.collect.async.SchedulerAsyncTaskMimic.execute$lambda$0(SchedulerAsyncTaskMimic.kt:37) 	
at org.odk.collect.async.SchedulerAsyncTaskMimic.$r8$lambda$91Ccusi_zfxwouZjauTWIiyE2dg(SchedulerAsyncTaskMimic.kt:0) 	
at org.odk.collect.async.SchedulerAsyncTaskMimic$$ExternalSyntheticLambda0.get(R8$$SyntheticClass:0) 	
at org.odk.collect.async.CoroutineScheduler$immediate$1$result$1.invokeSuspend(CoroutineScheduler.kt:18) 	
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) 	
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104) 	
at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:111) 	
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99) 	
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584) 	
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:811) 	
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:715) 	
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:702)

Steps to reproduce the problem

  1. Open the attached form: selectDefault1.xlsx
  2. Close the form and try to open again.

The exception will be present in Logcat.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: in progress
Development

No branches or pull requests

1 participant