You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by GitBox <gi...@apache.org> on 2022/11/02 11:38:20 UTC

[GitHub] [wicket] renoth opened a new pull request, #547: InSessionPageStore throws IndexOutOfBoundsException

renoth opened a new pull request, #547:
URL: https://github.com/apache/wicket/pull/547

   I have the same problem like in https://issues.apache.org/jira/browse/WICKET-6966 when using Wicket 9.11.0 and all Settings in SessionPageStore at default values. The problem does only occur in DEVELOPMENT environment so far, but the settings regarding SessionStorage are the same in DEV and PROD.
   
   Can we avoid this exception centrally by checking if the pages list is empty before trying an iterator?
   Logging could be added to inform the user about an inconsistent state.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@wicket.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [wicket] martin-g commented on pull request #547: InSessionPageStore throws IndexOutOfBoundsException

Posted by GitBox <gi...@apache.org>.
martin-g commented on PR #547:
URL: https://github.com/apache/wicket/pull/547#issuecomment-1300279982

   Calling `List.iterator()` on an empty list won't lead to IndexOutOfBoundsException.
   Is the list is `null` then the exception would be a `NullPointerException`.
   
   Please create a new ticket in JIRA and paste the exception stack trace.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@wicket.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [wicket] renoth commented on pull request #547: InSessionPageStore throws IndexOutOfBoundsException

Posted by GitBox <gi...@apache.org>.
renoth commented on PR #547:
URL: https://github.com/apache/wicket/pull/547#issuecomment-1300414579

   yes you are right, The size should not be negative.
   
   the stacktrace is 
   
   ```
   java.lang.IndexOutOfBoundsException: Index: 0, Size: -1
       at java.util.LinkedList.checkPositionIndex(LinkedList.java:564) ~[?:?]
       at java.util.LinkedList.listIterator(LinkedList.java:871) ~[?:?]
       at java.util.AbstractList.listIterator(AbstractList.java:311) ~[?:?]
       at java.util.AbstractSequentialList.iterator(AbstractSequentialList.java:238) ~[?:?]
       at org.apache.wicket.pageStore.InSessionPageStore$SessionData.remove(InSessionPageStore.java:219) ~[wicket-core-9.11.0.jar:9.11.0]
       at org.apache.wicket.pageStore.InSessionPageStore$SessionData.add(InSessionPageStore.java:205) ~[wicket-core-9.11.0.jar:9.11.0]
       at org.apache.wicket.pageStore.InSessionPageStore$CountLimitedData.add(InSessionPageStore.java:313) ~[wicket-core-9.11.0.jar:9.11.0]
       at org.apache.wicket.pageStore.InSessionPageStore.addPage(InSessionPageStore.java:127) ~[wicket-core-9.11.0.jar:9.11.0]
       at org.apache.wicket.pageStore.CachingPageStore.addPage(CachingPageStore.java:71) ~[wicket-core-9.11.0.jar:9.11.0]
       at org.apache.wicket.pageStore.RequestPageStore.detach(RequestPageStore.java:114) ~[wicket-core-9.11.0.jar:9.11.0]
       at org.apache.wicket.page.PageManager.detach(PageManager.java:91) ~[wicket-core-9.11.0.jar:9.11.0]
       at org.apache.wicket.Application$2.onDetach(Application.java:1582) ~[wicket-core-9.11.0.jar:9.11.0]
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@wicket.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [wicket] martin-g commented on pull request #547: InSessionPageStore throws IndexOutOfBoundsException

Posted by GitBox <gi...@apache.org>.
martin-g commented on PR #547:
URL: https://github.com/apache/wicket/pull/547#issuecomment-1300446402

   According to https://stackoverflow.com/a/60976421/497381 it should be caused by concurrent removals.
   But all methods which manipulate `pages` are `synchronized` ...
   Maybe [#writeObject()](https://github.com/apache/wicket/blob/acc979b3bae398bc695b7558f9cb49c73a818867/wicket-core/src/main/java/org/apache/wicket/pageStore/InSessionPageStore.java#L264) breaks it somehow ...


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@wicket.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [wicket] renoth closed pull request #547: InSessionPageStore throws IndexOutOfBoundsException

Posted by GitBox <gi...@apache.org>.
renoth closed pull request #547: InSessionPageStore throws IndexOutOfBoundsException
URL: https://github.com/apache/wicket/pull/547


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@wicket.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [wicket] renoth commented on pull request #547: InSessionPageStore throws IndexOutOfBoundsException

Posted by GitBox <gi...@apache.org>.
renoth commented on PR #547:
URL: https://github.com/apache/wicket/pull/547#issuecomment-1307836104

   The error only occurs in our DEVELOPMENT staging environment but not in TEST or PRODUCTION, maybe that has something to do with it. Debugbar maybe?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@wicket.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org