You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Gerolf Seitz (JIRA)" <ji...@apache.org> on 2008/04/03 15:40:24 UTC

[jira] Created: (WICKET-1476) Referencing Page may cause StackOverflowError

Referencing Page may cause StackOverflowError
---------------------------------------------

                 Key: WICKET-1476
                 URL: https://issues.apache.org/jira/browse/WICKET-1476
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 1.3.2
            Reporter: Gerolf Seitz
         Attachments: StackOverflowBug.zip

scenario:
+ 2 pages. each page stores itself in the session in the constructor ( -> last accessed instance of a page is stored in session (which ultimately is rather bad in the first place))
+ have a final reference to session in page's constructor
+ access page 1 mounted as "first" (-> pageId=0)
+ access page 2 mounted as "second" several times so that new pages are created until page1 gets serialized
+ access the serialized page 1 via "/first.0"
+ StackOverflowError



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-1476) Referencing Page may cause StackOverflowError

Posted by "Gerolf Seitz (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12585145#action_12585145 ] 

Gerolf Seitz commented on WICKET-1476:
--------------------------------------

agreed, it still causes the StackOverFlowError.
there may be other ways to hold on to a reference to a page.
this is just meant as an example (maybe a bad one) to reproduce and possibly fix the error.

we can also decide not to encourage such "mistakes" by keeping the flooded stack...

> Referencing Page may cause StackOverflowError
> ---------------------------------------------
>
>                 Key: WICKET-1476
>                 URL: https://issues.apache.org/jira/browse/WICKET-1476
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.2
>            Reporter: Gerolf Seitz
>         Attachments: StackOverflowBug.zip
>
>
> scenario:
> + 2 pages. each page stores itself in the session in the constructor ( -> last accessed instance of a page is stored in session (which ultimately is rather bad in the first place))
> + have a final reference to session in page's constructor
> + access page 1 mounted as "first" (-> pageId=0)
> + access page 2 mounted as "second" several times so that new pages are created until page1 gets serialized
> + access the serialized page 1 via "/first.0"
> + StackOverflowError

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (WICKET-1476) Referencing Page may cause StackOverflowError

Posted by "Johan Compagner (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1476?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Johan Compagner closed WICKET-1476.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.3.4

the example could be even a bit simpler
The problem was that when pages where references in Component (metadata) or MarkupContainter (childs)
then the page readObject isnt yet called to register the page as being read in.
Moved to Component now so that it is in the lowest wicket class.

> Referencing Page may cause StackOverflowError
> ---------------------------------------------
>
>                 Key: WICKET-1476
>                 URL: https://issues.apache.org/jira/browse/WICKET-1476
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.2
>            Reporter: Gerolf Seitz
>            Assignee: Johan Compagner
>             Fix For: 1.3.4
>
>         Attachments: StackOverflowBug.zip
>
>
> scenario:
> + 2 pages. each page stores itself in the session in the constructor ( -> last accessed instance of a page is stored in session (which ultimately is rather bad in the first place))
> + have a final reference to session in page's constructor
> + access page 1 mounted as "first" (-> pageId=0)
> + access page 2 mounted as "second" several times so that new pages are created until page1 gets serialized
> + access the serialized page 1 via "/first.0"
> + StackOverflowError

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-1476) Referencing Page may cause StackOverflowError

Posted by "Gerolf Seitz (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1476?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gerolf Seitz updated WICKET-1476:
---------------------------------

    Attachment: StackOverflowBug.zip

try attached quickstart to reproduce the error

> Referencing Page may cause StackOverflowError
> ---------------------------------------------
>
>                 Key: WICKET-1476
>                 URL: https://issues.apache.org/jira/browse/WICKET-1476
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.2
>            Reporter: Gerolf Seitz
>         Attachments: StackOverflowBug.zip
>
>
> scenario:
> + 2 pages. each page stores itself in the session in the constructor ( -> last accessed instance of a page is stored in session (which ultimately is rather bad in the first place))
> + have a final reference to session in page's constructor
> + access page 1 mounted as "first" (-> pageId=0)
> + access page 2 mounted as "second" several times so that new pages are created until page1 gets serialized
> + access the serialized page 1 via "/first.0"
> + StackOverflowError

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-1476) Referencing Page may cause StackOverflowError

Posted by "Gerolf Seitz (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12586134#action_12586134 ] 

Gerolf Seitz commented on WICKET-1476:
--------------------------------------

Johan, seems like I uploaded a wrong export of the project. sorry for this.
the new quickstart ends up in a StackOverflowError on my machine (Vistax64, JDK1.6.0_04-32bit)

1) go to http://localhost:8080/first (which redirects to first.0)
2) manually enter the address http://localhost:8080/second (-> second.1)
3) manually enter http://localhost:8080/first.0 in the address bar (don't use the back button)
4) StackOverflowError



> Referencing Page may cause StackOverflowError
> ---------------------------------------------
>
>                 Key: WICKET-1476
>                 URL: https://issues.apache.org/jira/browse/WICKET-1476
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.2
>            Reporter: Gerolf Seitz
>            Assignee: Johan Compagner
>         Attachments: StackOverflowBug.zip
>
>
> scenario:
> + 2 pages. each page stores itself in the session in the constructor ( -> last accessed instance of a page is stored in session (which ultimately is rather bad in the first place))
> + have a final reference to session in page's constructor
> + access page 1 mounted as "first" (-> pageId=0)
> + access page 2 mounted as "second" several times so that new pages are created until page1 gets serialized
> + access the serialized page 1 via "/first.0"
> + StackOverflowError

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-1476) Referencing Page may cause StackOverflowError

Posted by "Johan Compagner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12586117#action_12586117 ] 

Johan Compagner commented on WICKET-1476:
-----------------------------------------

I am trying and trying but i will not get a stackoverflow

also final MySession session in the constructor doesn't have any effect on what is serialized
so i changed it to:

public class FirstPage extends WebPage {

	final MySession session = MySession.get();
	public FirstPage() {

		session.setHomepage(this);
		setStatelessHint(false);
	}
}

but also then it works fine for me.

What platform and jvm versions are you testing?


> Referencing Page may cause StackOverflowError
> ---------------------------------------------
>
>                 Key: WICKET-1476
>                 URL: https://issues.apache.org/jira/browse/WICKET-1476
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.2
>            Reporter: Gerolf Seitz
>            Assignee: Johan Compagner
>         Attachments: StackOverflowBug.zip
>
>
> scenario:
> + 2 pages. each page stores itself in the session in the constructor ( -> last accessed instance of a page is stored in session (which ultimately is rather bad in the first place))
> + have a final reference to session in page's constructor
> + access page 1 mounted as "first" (-> pageId=0)
> + access page 2 mounted as "second" several times so that new pages are created until page1 gets serialized
> + access the serialized page 1 via "/first.0"
> + StackOverflowError

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-1476) Referencing Page may cause StackOverflowError

Posted by "Gerolf Seitz (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1476?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gerolf Seitz updated WICKET-1476:
---------------------------------

    Attachment:     (was: StackOverflowBug.zip)

> Referencing Page may cause StackOverflowError
> ---------------------------------------------
>
>                 Key: WICKET-1476
>                 URL: https://issues.apache.org/jira/browse/WICKET-1476
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.2
>            Reporter: Gerolf Seitz
>            Assignee: Johan Compagner
>         Attachments: StackOverflowBug.zip
>
>
> scenario:
> + 2 pages. each page stores itself in the session in the constructor ( -> last accessed instance of a page is stored in session (which ultimately is rather bad in the first place))
> + have a final reference to session in page's constructor
> + access page 1 mounted as "first" (-> pageId=0)
> + access page 2 mounted as "second" several times so that new pages are created until page1 gets serialized
> + access the serialized page 1 via "/first.0"
> + StackOverflowError

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-1476) Referencing Page may cause StackOverflowError

Posted by "Gerolf Seitz (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1476?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gerolf Seitz updated WICKET-1476:
---------------------------------

    Attachment: StackOverflowBug.zip

> Referencing Page may cause StackOverflowError
> ---------------------------------------------
>
>                 Key: WICKET-1476
>                 URL: https://issues.apache.org/jira/browse/WICKET-1476
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.2
>            Reporter: Gerolf Seitz
>            Assignee: Johan Compagner
>         Attachments: StackOverflowBug.zip
>
>
> scenario:
> + 2 pages. each page stores itself in the session in the constructor ( -> last accessed instance of a page is stored in session (which ultimately is rather bad in the first place))
> + have a final reference to session in page's constructor
> + access page 1 mounted as "first" (-> pageId=0)
> + access page 2 mounted as "second" several times so that new pages are created until page1 gets serialized
> + access the serialized page 1 via "/first.0"
> + StackOverflowError

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (WICKET-1476) Referencing Page may cause StackOverflowError

Posted by "Johan Compagner (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1476?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Johan Compagner reassigned WICKET-1476:
---------------------------------------

    Assignee: Johan Compagner

> Referencing Page may cause StackOverflowError
> ---------------------------------------------
>
>                 Key: WICKET-1476
>                 URL: https://issues.apache.org/jira/browse/WICKET-1476
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.2
>            Reporter: Gerolf Seitz
>            Assignee: Johan Compagner
>         Attachments: StackOverflowBug.zip
>
>
> scenario:
> + 2 pages. each page stores itself in the session in the constructor ( -> last accessed instance of a page is stored in session (which ultimately is rather bad in the first place))
> + have a final reference to session in page's constructor
> + access page 1 mounted as "first" (-> pageId=0)
> + access page 2 mounted as "second" several times so that new pages are created until page1 gets serialized
> + access the serialized page 1 via "/first.0"
> + StackOverflowError

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-1476) Referencing Page may cause StackOverflowError

Posted by "Johan Compagner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12585118#action_12585118 ] 

Johan Compagner commented on WICKET-1476:
-----------------------------------------

hmm final reference to the session? that isn't the best thing to do...

> Referencing Page may cause StackOverflowError
> ---------------------------------------------
>
>                 Key: WICKET-1476
>                 URL: https://issues.apache.org/jira/browse/WICKET-1476
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.2
>            Reporter: Gerolf Seitz
>         Attachments: StackOverflowBug.zip
>
>
> scenario:
> + 2 pages. each page stores itself in the session in the constructor ( -> last accessed instance of a page is stored in session (which ultimately is rather bad in the first place))
> + have a final reference to session in page's constructor
> + access page 1 mounted as "first" (-> pageId=0)
> + access page 2 mounted as "second" several times so that new pages are created until page1 gets serialized
> + access the serialized page 1 via "/first.0"
> + StackOverflowError

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.