You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Guillaume Smet <gu...@gmail.com> on 2015/06/24 11:48:08 UTC

Weird enclosure bug with 7.0.0-M6

Hi,

In production, yesterday, I had a very disturbing bug with an enclosure
(the wicket:enclosure tag): the content of the enclosure was displayed even
if the child was not visible (and the child was indeed not visible in the
page).

I switched to using an EnclosureContainer and redeployed the app in
production and it fixed the issue.

I was unable to reproduce the issue in development, it was only visible in
production.

I know it's not a very useful bug report but I was wondering if someone had
an idea on what could be the issue. It might guide me on the way to build a
proper quickstart.

Thanks!

--
Guillaume

Re: Weird enclosure bug with 7.0.0-M6

Posted by Martin Grigorov <mg...@apache.org>.
org.apache.wicket.markup.parser.filter.EnclosureHandler this is the shared
state
It is both a IMarkupFilter (an application singleton) and
IComponentResolver (resolves components for <wicket:enclosure>)

Martin Grigorov
Freelancer. Available for hire!
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Wed, Jun 24, 2015 at 3:39 PM, Guillaume Smet <gu...@gmail.com>
wrote:

> I think I have reproduced it locally but it's intermittent and really
> weird. I can't get a way to reproduce it each time.
>
> Is there a shared state between pages regarding the enclosures or the
> component queueing (I mean for a given page class but different page
> parameters)?
>
> On Wed, Jun 24, 2015 at 12:15 PM, Martin Grigorov <mg...@apache.org>
> wrote:
>
> > Yes, the problems came with the work for component queueing.
> >
> > I guess at some point someone will be able to reproduce the problem in a
> > quickstart and we will be able to debug and fix it. Until then use the
> > better solution (EnclosureContainer).
> >
> > Martin Grigorov
> > Freelancer. Available for hire!
> > Wicket Training and Consulting
> > https://twitter.com/mtgrigorov
> >
> > On Wed, Jun 24, 2015 at 1:10 PM, Guillaume Smet <
> guillaume.smet@gmail.com>
> > wrote:
> >
> > > On Wed, Jun 24, 2015 at 11:57 AM, Martin Grigorov <
> mgrigorov@apache.org>
> > > wrote:
> > >
> > > > EnclosureContainer FTW!
> > > >
> > > > P.S. I know the above is not very useful but I'm preaching against
> > > > (Inline)Enclosure for few years now :-)
> > > >
> > >
> > > Yeah, we only use it for very simple cases and we use
> EnclosureContainer
> > > for complex cases but most of our cases are simple and we have hundreds
> > of
> > > them in our code. I would really prefer not having to get rid of them!
> > >
> > > There definitely is something fishy with enclosures and Wicket 7 as all
> > our
> > > issues with 7 are related to this. It worked quite well with 6.
> > >
> > > --
> > > Guillaume
> > >
> >
>

Re: Weird enclosure bug with 7.0.0-M6

Posted by Guillaume Smet <gu...@gmail.com>.
Considering getPage().getAutoIndex() is supposed to return an int and what
we have here is obviously not an int, I'm starting to wonder if the index
is concatenated several times which doesn't look normal to me.

(I'm not sure this issue is related to the markup null problem but it does
look weird)

On Wed, Jul 1, 2015 at 10:09 AM, Guillaume Smet <gu...@gmail.com>
wrote:

> And the " java.lang.IllegalArgumentException: Argument 'markup' may not be
> null." is not completely solved. I still have 4/5 occurrences per day in
> production.
>
> I noticed a weird thing:
> Error attaching this container for rendering:
> [TransparentWebMarkupContainer [Component id =
> wicket_extend29292829152915292929283520323928212828352835352928282828222828213521212141322935222929292929292929292929162922292932291029292929292929292317171729292128282829292228101329292918181828352929292929292929282828282829352935293529282929292929292941414141294128412941282828282818282819351928192935191629212828162828282329292929232929292929292428292829282323292929292929292929292928292929292929233535353535242924292929282528242829282829412829282928292929292828282924161629243535292828241632312824252816282928282928282528282828353541414141194128283535353535292913131314141516291628282835352526292828282828353529263129292929262929262929292929292826282828282640402828402928292929292929343434262629262826292928292929352626342934292929294141292829282929292929292929292935402935292929352929292940282840284028344028402840402840402728284027292827352828283528282828412841414141414141414141414129402940404040404040404040282929282828353535353535353535353523242424111141282832292828161728282828283528282828282828282929292828282829292929505050503129292929292829292929292929292928282828292821292935292929292928282729414141293141292928282841412910292929324129292931292929292929242924292417323228282929292929413131313228292929312929294141292929294141292828414129353535352832352929292928313135353129292928292928292929292929292928292928292928282829282525171926271926262729272827282828282929292929292911291132323232323229292929292929292929281129291228132829292829292929292928132927313131311531163131161331292929292929292927292927282929282929281729292929291329291329132828282828282929282828283129192929202020202121212729292935282829]]
>
> IIRC, the id was per RequestCycle but it seems there's something weird
> going on if I have an id so high.
>
> On Tue, Jun 30, 2015 at 5:00 PM, Guillaume Smet <gu...@gmail.com>
> wrote:
>
>> Hi Andrea,
>>
>> Sorry for the late reply. I haven't succeeded in isolating the bug in a
>> quickstart.
>>
>> From what I have collected for now:
>> - it happens only in deployment mode;
>> - when the bug occurs, the enclosure is visible each time on each page
>> even if it shouldn't AND it looks as if the enclosure wasn't created as
>> it's the only enclosure that doesn't trigger my breakpoint in
>> Enclosure.getChildComponent(  );
>>
>> That's all I have so far :/
>>
>>
>> On Wed, Jun 24, 2015 at 3:59 PM, andrea del bene <an...@gmail.com>
>> wrote:
>>
>>> Great! Could you share the code to investigate it?
>>>
>>> Thank you.
>>>
>>>
>>> On 24/06/2015 14:39, Guillaume Smet wrote:
>>>
>>>> I think I have reproduced it locally but it's intermittent and really
>>>> weird. I can't get a way to reproduce it each time.
>>>>
>>>> Is there a shared state between pages regarding the enclosures or the
>>>> component queueing (I mean for a given page class but different page
>>>> parameters)?
>>>>
>>>> On Wed, Jun 24, 2015 at 12:15 PM, Martin Grigorov <mgrigorov@apache.org
>>>> >
>>>> wrote:
>>>>
>>>
>>>
>>
>

Re: Weird enclosure bug with 7.0.0-M6

Posted by Guillaume Smet <gu...@gmail.com>.
And the " java.lang.IllegalArgumentException: Argument 'markup' may not be
null." is not completely solved. I still have 4/5 occurrences per day in
production.

I noticed a weird thing:
Error attaching this container for rendering:
[TransparentWebMarkupContainer [Component id =
wicket_extend29292829152915292929283520323928212828352835352928282828222828213521212141322935222929292929292929292929162922292932291029292929292929292317171729292128282829292228101329292918181828352929292929292929282828282829352935293529282929292929292941414141294128412941282828282818282819351928192935191629212828162828282329292929232929292929292428292829282323292929292929292929292928292929292929233535353535242924292929282528242829282829412829282928292929292828282924161629243535292828241632312824252816282928282928282528282828353541414141194128283535353535292913131314141516291628282835352526292828282828353529263129292929262929262929292929292826282828282640402828402928292929292929343434262629262826292928292929352626342934292929294141292829282929292929292929292935402935292929352929292940282840284028344028402840402840402728284027292827352828283528282828412841414141414141414141414129402940404040404040404040282929282828353535353535353535353523242424111141282832292828161728282828283528282828282828282929292828282829292929505050503129292929292829292929292929292928282828292821292935292929292928282729414141293141292928282841412910292929324129292931292929292929242924292417323228282929292929413131313228292929312929294141292929294141292828414129353535352832352929292928313135353129292928292928292929292929292928292928292928282829282525171926271926262729272827282828282929292929292911291132323232323229292929292929292929281129291228132829292829292929292928132927313131311531163131161331292929292929292927292927282929282929281729292929291329291329132828282828282929282828283129192929202020202121212729292935282829]]

IIRC, the id was per RequestCycle but it seems there's something weird
going on if I have an id so high.

On Tue, Jun 30, 2015 at 5:00 PM, Guillaume Smet <gu...@gmail.com>
wrote:

> Hi Andrea,
>
> Sorry for the late reply. I haven't succeeded in isolating the bug in a
> quickstart.
>
> From what I have collected for now:
> - it happens only in deployment mode;
> - when the bug occurs, the enclosure is visible each time on each page
> even if it shouldn't AND it looks as if the enclosure wasn't created as
> it's the only enclosure that doesn't trigger my breakpoint in
> Enclosure.getChildComponent(  );
>
> That's all I have so far :/
>
>
> On Wed, Jun 24, 2015 at 3:59 PM, andrea del bene <an...@gmail.com>
> wrote:
>
>> Great! Could you share the code to investigate it?
>>
>> Thank you.
>>
>>
>> On 24/06/2015 14:39, Guillaume Smet wrote:
>>
>>> I think I have reproduced it locally but it's intermittent and really
>>> weird. I can't get a way to reproduce it each time.
>>>
>>> Is there a shared state between pages regarding the enclosures or the
>>> component queueing (I mean for a given page class but different page
>>> parameters)?
>>>
>>> On Wed, Jun 24, 2015 at 12:15 PM, Martin Grigorov <mg...@apache.org>
>>> wrote:
>>>
>>
>>
>

Re: Weird enclosure bug with 7.0.0-M6

Posted by Guillaume Smet <gu...@gmail.com>.
Hi Andrea,

Sorry for the late reply. I haven't succeeded in isolating the bug in a
quickstart.

>From what I have collected for now:
- it happens only in deployment mode;
- when the bug occurs, the enclosure is visible each time on each page even
if it shouldn't AND it looks as if the enclosure wasn't created as it's the
only enclosure that doesn't trigger my breakpoint in
Enclosure.getChildComponent(  );

That's all I have so far :/

On Wed, Jun 24, 2015 at 3:59 PM, andrea del bene <an...@gmail.com>
wrote:

> Great! Could you share the code to investigate it?
>
> Thank you.
>
>
> On 24/06/2015 14:39, Guillaume Smet wrote:
>
>> I think I have reproduced it locally but it's intermittent and really
>> weird. I can't get a way to reproduce it each time.
>>
>> Is there a shared state between pages regarding the enclosures or the
>> component queueing (I mean for a given page class but different page
>> parameters)?
>>
>> On Wed, Jun 24, 2015 at 12:15 PM, Martin Grigorov <mg...@apache.org>
>> wrote:
>>
>
>

Re: Weird enclosure bug with 7.0.0-M6

Posted by andrea del bene <an...@gmail.com>.
Great! Could you share the code to investigate it?

Thank you.

On 24/06/2015 14:39, Guillaume Smet wrote:
> I think I have reproduced it locally but it's intermittent and really
> weird. I can't get a way to reproduce it each time.
>
> Is there a shared state between pages regarding the enclosures or the
> component queueing (I mean for a given page class but different page
> parameters)?
>
> On Wed, Jun 24, 2015 at 12:15 PM, Martin Grigorov <mg...@apache.org>
> wrote:


Re: Weird enclosure bug with 7.0.0-M6

Posted by Guillaume Smet <gu...@gmail.com>.
I think I have reproduced it locally but it's intermittent and really
weird. I can't get a way to reproduce it each time.

Is there a shared state between pages regarding the enclosures or the
component queueing (I mean for a given page class but different page
parameters)?

On Wed, Jun 24, 2015 at 12:15 PM, Martin Grigorov <mg...@apache.org>
wrote:

> Yes, the problems came with the work for component queueing.
>
> I guess at some point someone will be able to reproduce the problem in a
> quickstart and we will be able to debug and fix it. Until then use the
> better solution (EnclosureContainer).
>
> Martin Grigorov
> Freelancer. Available for hire!
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Wed, Jun 24, 2015 at 1:10 PM, Guillaume Smet <gu...@gmail.com>
> wrote:
>
> > On Wed, Jun 24, 2015 at 11:57 AM, Martin Grigorov <mg...@apache.org>
> > wrote:
> >
> > > EnclosureContainer FTW!
> > >
> > > P.S. I know the above is not very useful but I'm preaching against
> > > (Inline)Enclosure for few years now :-)
> > >
> >
> > Yeah, we only use it for very simple cases and we use EnclosureContainer
> > for complex cases but most of our cases are simple and we have hundreds
> of
> > them in our code. I would really prefer not having to get rid of them!
> >
> > There definitely is something fishy with enclosures and Wicket 7 as all
> our
> > issues with 7 are related to this. It worked quite well with 6.
> >
> > --
> > Guillaume
> >
>

Re: Weird enclosure bug with 7.0.0-M6

Posted by Martin Grigorov <mg...@apache.org>.
Yes, the problems came with the work for component queueing.

I guess at some point someone will be able to reproduce the problem in a
quickstart and we will be able to debug and fix it. Until then use the
better solution (EnclosureContainer).

Martin Grigorov
Freelancer. Available for hire!
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Wed, Jun 24, 2015 at 1:10 PM, Guillaume Smet <gu...@gmail.com>
wrote:

> On Wed, Jun 24, 2015 at 11:57 AM, Martin Grigorov <mg...@apache.org>
> wrote:
>
> > EnclosureContainer FTW!
> >
> > P.S. I know the above is not very useful but I'm preaching against
> > (Inline)Enclosure for few years now :-)
> >
>
> Yeah, we only use it for very simple cases and we use EnclosureContainer
> for complex cases but most of our cases are simple and we have hundreds of
> them in our code. I would really prefer not having to get rid of them!
>
> There definitely is something fishy with enclosures and Wicket 7 as all our
> issues with 7 are related to this. It worked quite well with 6.
>
> --
> Guillaume
>

Re: Weird enclosure bug with 7.0.0-M6

Posted by Guillaume Smet <gu...@gmail.com>.
On Wed, Jun 24, 2015 at 11:57 AM, Martin Grigorov <mg...@apache.org>
wrote:

> EnclosureContainer FTW!
>
> P.S. I know the above is not very useful but I'm preaching against
> (Inline)Enclosure for few years now :-)
>

Yeah, we only use it for very simple cases and we use EnclosureContainer
for complex cases but most of our cases are simple and we have hundreds of
them in our code. I would really prefer not having to get rid of them!

There definitely is something fishy with enclosures and Wicket 7 as all our
issues with 7 are related to this. It worked quite well with 6.

-- 
Guillaume

Re: Weird enclosure bug with 7.0.0-M6

Posted by Martin Grigorov <mg...@apache.org>.
EnclosureContainer FTW!

P.S. I know the above is not very useful but I'm preaching against
(Inline)Enclosure for few years now :-)

Martin Grigorov
Freelancer. Available for hire!
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Wed, Jun 24, 2015 at 12:48 PM, Guillaume Smet <gu...@gmail.com>
wrote:

> Hi,
>
> In production, yesterday, I had a very disturbing bug with an enclosure
> (the wicket:enclosure tag): the content of the enclosure was displayed even
> if the child was not visible (and the child was indeed not visible in the
> page).
>
> I switched to using an EnclosureContainer and redeployed the app in
> production and it fixed the issue.
>
> I was unable to reproduce the issue in development, it was only visible in
> production.
>
> I know it's not a very useful bug report but I was wondering if someone had
> an idea on what could be the issue. It might guide me on the way to build a
> proper quickstart.
>
> Thanks!
>
> --
> Guillaume
>