Recursion error when opening object lists

Bug #600205 reported by Dukai Gábor
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KDE OpenObject Client
New
Undecided
Unassigned

Bug Description

Hello!

Latest bzr code.
This recursion error happens everywhere but this example is made with the partners menu.
When I open the partner list, it goes into some kind of recursion and leaves the mouse pointer with the waiting icon.
Trace log when opening from the partner menu:

ˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇthis part is repeated
  File "Koo/Model/Group.py", line 706, in update
    self.sort( self.toBeSortedField, self.toBeSortedOrder )
  File "Koo/Model/Group.py", line 721, in sort
    self.sortVisible( field, order )
  File "Koo/Model/Group.py", line 835, in sortVisible
    self.ensureAllLoaded()
  File "Koo/Model/Group.py", line 476, in ensureAllLoaded
    ids = self.unloadedIds()
  File "Koo/Model/Group.py", line 490, in unloadedIds
    self.ensureUpdated()
  File "Koo/Model/Group.py", line 712, in ensureUpdated
    self.update()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^this part is repeated
  File "Koo/Model/Group.py", line 706, in update
    self.sort( self.toBeSortedField, self.toBeSortedOrder )
  File "Koo/Model/Group.py", line 721, in sort
    self.sortVisible( field, order )
  File "Koo/Model/Group.py", line 828, in sortVisible
    ids = self.rpc.search( self._domain + self._filter, 0, self.limit, False, self._context )
  File "Koo/Rpc/Rpc.py", line 588, in __call__
    return session.execute('/object', 'execute', self.object, self.func, *args)
  File "Koo/Rpc/Rpc.py", line 428, in execute
    return self.call(obj, method, *args)
  File "Koo/Rpc/Rpc.py", line 411, in call
    if self.cache:
AttributeError: ActionViewCache instance has no attribute '__nonzero__'

If I open it from the 'Open partners tab' shortcut, it's quite the same but at the end it gives a RuntimeError:
    return self.call(obj, method, *args)
RuntimeError: maximum recursion depth exceeded

Gábor

Dukai Gábor (gdukai)
summary: - Problems opening the partner list
+ Recursion error
summary: - Recursion error
+ Recursion error when opening object lists
description: updated
Revision history for this message
Albert Cervera i Areny - http://www.NaN-tic.com (albert-nan) wrote : Re: [Bug 600205] [NEW] Problems opening the partner list

A Dimecres, 30 de juny de 2010, Dukai Gábor va escriure:
> Public bug reported:
>
> Hello!
>
> Latest bzr code.
> When I open the partner list, it goes into some kind of recursion and
> leaves the mouse pointer with the waiting icon. Trace log when opening
> from the partner menu:
>
> ˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇthis part is repeated
> File "Koo/Model/Group.py", line 706, in update
> self.sort( self.toBeSortedField, self.toBeSortedOrder )
> File "Koo/Model/Group.py", line 721, in sort
> self.sortVisible( field, order )
> File "Koo/Model/Group.py", line 835, in sortVisible
> self.ensureAllLoaded()
> File "Koo/Model/Group.py", line 476, in ensureAllLoaded
> ids = self.unloadedIds()
> File "Koo/Model/Group.py", line 490, in unloadedIds
> self.ensureUpdated()
> File "Koo/Model/Group.py", line 712, in ensureUpdated
> self.update()
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^this part is repeated
> File "Koo/Model/Group.py", line 706, in update
> self.sort( self.toBeSortedField, self.toBeSortedOrder )
> File "Koo/Model/Group.py", line 721, in sort
> self.sortVisible( field, order )
> File "Koo/Model/Group.py", line 828, in sortVisible
> ids = self.rpc.search( self._domain + self._filter, 0, self.limit,
> False, self._context ) File "Koo/Rpc/Rpc.py", line 588, in __call__
> return session.execute('/object', 'execute', self.object, self.func,
> *args) File "Koo/Rpc/Rpc.py", line 428, in execute
> return self.call(obj, method, *args)
> File "Koo/Rpc/Rpc.py", line 411, in call
> if self.cache:
> AttributeError: ActionViewCache instance has no attribute '__nonzero__'
>
> If I open it from the 'Open partners tab' shortcut, it's quite the same but
> at the end it gives a RuntimeError: return self.call(obj, method, *args)
> RuntimeError: maximum recursion depth exceeded

This (like the other bug) are in really 'basic' usage and the application is
working for a lot of people, so it seems to me there must be something wrong
in your client installation or server. Did you pull the changes from an older
version of the repository or did you make 'branch' for the first time?

>
>
> Gábor
>
> ** Affects: openobject-client-kde
> Importance: Undecided
> Status: New

--
Albert Cervera i Areny
http://www.NaN-tic.com
OpenERP Partners
Mòbil: +34 669 40 40 18

Revision history for this message
Dukai Gábor (gdukai) wrote :

I did the following to get rid of the problem:
-did a clean pull of the latest rev (1500)
-tried to run it from that directory and tried to install it with setup.py and run from /usr
-tried the server with Ubuntu 9.10 and 10.04
-tried it with a new OpenERP db
-tried net-rpc instead of pyro
-tried a fresh upstream version of the OpenERP server

None of these worked and both bugs appeared the same as I reported.
Could you give some more advice?

Revision history for this message
Albert Cervera i Areny - http://www.NaN-tic.com (albert-nan) wrote :

I have no other ideas. I suppose you're using python 2.5 or 2.6, aren't you?

Revision history for this message
Dukai Gábor (gdukai) wrote :

Yes, python 2.6. Now I tried on another Ubuntu 10.04 system (from the .deb I made) and the result was the same.

Revision history for this message
Dukai Gábor (gdukai) wrote :

Just made it working.

Revision history for this message
Dukai Gábor (gdukai) wrote :

It has something to do with the paths:

This fails:
export PYTHONPATH=koodir
cd koodir
./Koo/koo.py

This works:
sudo python setup.py install
koo

This fails:
sudo python setup.py install
export PYTHONPATH=koodir
koo

This fails:
make builddeb
install the .deb
sudo cp -r /usr/lib/python2.6/site-packages/Koo /usr/lib/python2.6/dist-packages
koo

The 'Open products tab' bug is not related to this, that still doesn't succeed.

Revision history for this message
Albert Cervera i Areny - http://www.NaN-tic.com (albert-nan) wrote : Re: [Bug 600205] Re: Recursion error when opening object lists

A Dijous, 1 de juliol de 2010, Dukai Gábor va escriure:
> Just made it working.

Could you explain what was going on?

--
Albert Cervera i Areny
http://www.NaN-tic.com
OpenERP Partners
Mòbil: +34 669 40 40 18

Revision history for this message
Borja López Soilán (NeoPolus) (borjals) wrote :

As a reference, this is the script I usually use to launch Koo (that looks pretty similar to Dukai's first try):

#!/bin/sh
export PYTHON_PATH=~/Proyectos/OpenErp/openobject-client-kde/current
cd ~/Proyectos/OpenErp/openobject-client-kde/current
python2.6 ./Koo/koo.py $@

Revision history for this message
Dukai Gábor (gdukai) wrote :

Borja:
Strange but the exact same code fails on my computer.

Revision history for this message
Borja López Soilán (NeoPolus) (borjals) wrote :

Dukai:
I'm directly using the code downloaded from Launchpad, without running the installation script, on Linux Mint 7 (~ Ubuntu 9.04).

Revision history for this message
Dukai Gábor (gdukai) wrote :

Hello Albert,
I've updated to the latest from bazarr but still having this issue. Could you help debugging it? I don't know much about Qt.
I put a print_stack() in the code and it looks like a closeEvent is being constantly received.

The traceback of the code that is in the infinite loop:
  File "Koo/koo.py", line 193, in <module>
    app.exec_()
  File "/home/dukai/workspace/5.0-koo/Koo/Dialogs/KooMainWindow.py", line 657, in closeEvent
    if not wid.canClose():
  File "/home/dukai/workspace/5.0-koo/Koo/Dialogs/FormWidget.py", line 555, in canClose
    if self.modifiedSave():
  File "/home/dukai/workspace/5.0-koo/Koo/Dialogs/FormWidget.py", line 528, in modifiedSave
    self.screen.cancel()
  File "/home/dukai/workspace/5.0-koo/Koo/Screen/Screen.py", line 737, in cancel
    self.display()
  File "/home/dukai/workspace/5.0-koo/Koo/Screen/Screen.py", line 826, in display
    self.currentView().display(self.currentRecord(), self.group)
  File "/home/dukai/workspace/5.0-koo/Koo/View/Tree/TreeView.py", line 302, in display
    self.widget.setCurrentIndex( idx )
  File "/home/dukai/workspace/5.0-koo/Koo/Model/KooModel.py", line 338, in data
    value = self.value( index.row(), index.column(), index.internalPointer() )
  File "/home/dukai/workspace/5.0-koo/Koo/Model/KooModel.py", line 670, in value
    model = self.record(row, group)
  File "/home/dukai/workspace/5.0-koo/Koo/Model/KooModel.py", line 657, in record
    if row >= group.count():
  File "/home/dukai/workspace/5.0-koo/Koo/Model/Group.py", line 539, in count
    self.ensureUpdated()
  File "/home/dukai/workspace/5.0-koo/Koo/Model/Group.py", line 722, in ensureUpdated
    traceback.print_stack()

Thanks

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.