A case of a mysteriously stalling grok.Container

View: New views
5 Messages — Rating Filter:   Alert me  

A case of a mysteriously stalling grok.Container

by Sebastian Ware :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I am not getting any errors and I am having difficulties narrowing  
down the problem but...

In a view, I am doing a simple:

   self.context['a_container']['myId_x'] ≈ an_object

then I delete the object

   del self.context['a_container']['myId_x']

next time I try to assign the same object with the same id

   self.context['a_container']['myId_x'] ≈ an_object

The application stalls without any error message. It requires a restart.

I apologies for the vague description of the error, but has anyone  
experienced anything similar?

Mvh Sebastian
_______________________________________________
Grok-dev mailing list
Grok-dev@...
https://mail.zope.org/mailman/listinfo/grok-dev

Re: A case of a mysteriously stalling grok.Container

by Souheil CHELFOUH :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

What is the context of this error ? A custom application ? A basic grok app ?

2009/9/23 Sebastian Ware <sebastian@...>:

> I am not getting any errors and I am having difficulties narrowing
> down the problem but...
>
> In a view, I am doing a simple:
>
>   self.context['a_container']['myId_x'] ≈ an_object
>
> then I delete the object
>
>   del self.context['a_container']['myId_x']
>
> next time I try to assign the same object with the same id
>
>   self.context['a_container']['myId_x'] ≈ an_object
>
> The application stalls without any error message. It requires a restart.
>
> I apologies for the vague description of the error, but has anyone
> experienced anything similar?
>
> Mvh Sebastian
> _______________________________________________
> Grok-dev mailing list
> Grok-dev@...
> https://mail.zope.org/mailman/listinfo/grok-dev
>
_______________________________________________
Grok-dev mailing list
Grok-dev@...
https://mail.zope.org/mailman/listinfo/grok-dev

Re: A case of a mysteriously stalling grok.Container

by Sebastian Ware :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

A custom CMS app. I am trying to track it down, but I was hoping that  
someone might have run into the same mysterious problem.

Mvh Sebastian

On 23 sep 2009, at 16.05, Souheil CHELFOUH wrote:

> What is the context of this error ? A custom application ? A basic  
> grok app ?
>
> 2009/9/23 Sebastian Ware <sebastian@...>:
>> I am not getting any errors and I am having difficulties narrowing
>> down the problem but...
>>
>> In a view, I am doing a simple:
>>
>>   self.context['a_container']['myId_x'] ≈ an_object
>>
>> then I delete the object
>>
>>   del self.context['a_container']['myId_x']
>>
>> next time I try to assign the same object with the same id
>>
>>   self.context['a_container']['myId_x'] ≈ an_object
>>
>> The application stalls without any error message. It requires a  
>> restart.
>>
>> I apologies for the vague description of the error, but has anyone
>> experienced anything similar?
>>
>> Mvh Sebastian
>> _______________________________________________
>> Grok-dev mailing list
>> Grok-dev@...
>> https://mail.zope.org/mailman/listinfo/grok-dev
>>

_______________________________________________
Grok-dev mailing list
Grok-dev@...
https://mail.zope.org/mailman/listinfo/grok-dev

Re: A case of a mysteriously stalling grok.Container

by Martijn Faassen-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Sebastian Ware wrote:

> I am not getting any errors and I am having difficulties narrowing  
> down the problem but...
>
> In a view, I am doing a simple:
>
>    self.context['a_container']['myId_x'] ≈ an_object
>
> then I delete the object
>
>    del self.context['a_container']['myId_x']
>
> next time I try to assign the same object with the same id
>
>    self.context['a_container']['myId_x'] ≈ an_object
>
> The application stalls without any error message. It requires a restart.
>
> I apologies for the vague description of the error, but has anyone  
> experienced anything similar?

Never seen that before. To get more help you should definitely try to
cut this problem down to a small test case. Do you have any event
handlers that get triggered by adding or removing an object?

Regards,

Martijn

_______________________________________________
Grok-dev mailing list
Grok-dev@...
https://mail.zope.org/mailman/listinfo/grok-dev

Re: A case of a mysteriously stalling grok.Container

by Sebastian Ware :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks. I have rewritten the code five times in different ways and now  
it works. I am not sure I will be able to isolate the problem  
eventhough it was fairly consistent...  however when dropping into the  
debugger the code never failed so I am guessing some kind of event  
deadlock. Possibly related to indexing, but this is a just a guess.

I was doing stuff in grok.Annotation and in ordinary grok.Containers  
in the same operation. Whereas I guess this shouldn't be a problem, it  
seemed to be the only obvious circumstance.

Anyway, if someone else runs into a similar problem. Try implementing  
without annotations. That was the route that solved my problem. That  
said. I never got to the bottom of the problem and now that I have got  
it working I have lost too much time to investigate further.

Mvh Sebastian

On 24 sep 2009, at 16.54, Martijn Faassen wrote:

> Sebastian Ware wrote:
>> I am not getting any errors and I am having difficulties narrowing
>> down the problem but...
>>
>> In a view, I am doing a simple:
>>
>>   self.context['a_container']['myId_x'] ≈ an_object
>>
>> then I delete the object
>>
>>   del self.context['a_container']['myId_x']
>>
>> next time I try to assign the same object with the same id
>>
>>   self.context['a_container']['myId_x'] ≈ an_object
>>
>> The application stalls without any error message. It requires a  
>> restart.
>>
>> I apologies for the vague description of the error, but has anyone
>> experienced anything similar?
>
> Never seen that before. To get more help you should definitely try to
> cut this problem down to a small test case. Do you have any event
> handlers that get triggered by adding or removing an object?
>
> Regards,
>
> Martijn
>
> _______________________________________________
> Grok-dev mailing list
> Grok-dev@...
> https://mail.zope.org/mailman/listinfo/grok-dev

_______________________________________________
Grok-dev mailing list
Grok-dev@...
https://mail.zope.org/mailman/listinfo/grok-dev