Bug #2677

Updated by Sebastien Jacquot 6 months ago

recursion infinie lors de la réouverture de TXM si il y a une CA persistée
Caused by: java.lang.StackOverflowError
at java.security.AccessController.doPrivileged(Native Method)
at org.osgi.framework.FrameworkUtil.getBundle(FrameworkUtil.java:209)
at org.txm.core.results.TXMResult.autoSaveParametersFromAnnotations(TXMResult.java:1059)
at org.txm.core.results.TXMResult.setUserPersistable(TXMResult.java:2625)
at org.txm.core.results.TXMResult.setUserPersistable(TXMResult.java:2614)
at org.txm.ca.core.functions.CA.setUserPersistable(CA.java:1037)
at org.txm.core.results.TXMResult.setUserPersistable(TXMResult.java:2614)
at org.txm.ca.core.functions.CA.setUserPersistable(CA.java:1041)
at org.txm.core.results.TXMResult.setUserPersistable(TXMResult.java:2614)
at org.txm.ca.core.functions.CA.setUserPersistable(CA.java:1041)
at org.txm.core.results.TXMResult.setUserPersistable(TXMResult.java:2614)
at org.txm.ca.core.functions.CA.setUserPersistable(CA.java:1041)
at org.txm.core.results.TXMResult.setUserPersistable(TXMResult.java:2614)
at org.txm.ca.core.functions.CA.setUserPersistable(CA.java:1041)
at org.txm.core.results.TXMResult.setUserPersistable(TXMResult.java:2614)

h3. Diagnostic

Bug has been introduced by adding:

@ // not an internal persistence (eg. corpus or partition)
if (!result.isInternalPersistable()) {
result.setUserPersistable(true);
}@

to org.txm.objects.Project.loadResults(Class) line 535

to restore the user persistable state.
It also leads to saving the .prefs files that have just been loaded.

Fixed by using a new method
public void setUserPersistable(boolean userPersistable, boolean doCheck)
that only sets TXMResult.userPersistable to true without any more check if doCheck is equal to false.

*Since it removes some processes as resaving the .prefs.file, need to see with MD if it's not break some special objects eg. Edition, Text, etc.*

Back