#1 2007-04-07 17:42:36

Registered: 2007-02-27
Posts: 17

find (item search) wizard generates error

Howdy, Tian.  I don't know if this is user error or not.  In gcstar 1.1.1 with all updates in place, I am having problems with the item search (find) wizard.  This is with a GCfilms collection.   

When I click on the "Find" button, the item search wizard appears.  When I try to search on the title, the following error is generated in the shell.  The search popup then becomes unresponsive and has to be closed via the window manager.

bash% gcstar
*** unhandled exception in callback:
***   variable not allowed to be undef where GtkTreeIter is wanted at
/usr/bin/../lib/gcstar/GCGraphicComponents.pm line 1765.
***  ignoring at /usr/bin/gcstar line 265.

I found that adding the following line into the file stops the pain.

bash% diff -u GCGraphicComponents.pm.orig GCGraphicComponents.pm
--- GCGraphicComponents.pm.orig 2007-04-07 12:38:38.000000000 -0400
+++ GCGraphicComponents.pm      2007-04-07 12:39:26.000000000 -0400
@@ -1762,6 +1762,7 @@
         my $self = shift;
+       return '' eq '' if not defined $self->get_active_iter; # XXX tck
         return ($self->{model}->get($self->get_active_iter))[1] eq '';
         my $idx = $self->get_history;
         $idx-- if $idx >= $self->{separatorPosition};

Doing a little more digging, I worked my way up to the GCSearchDialog package and the show subroutine.  In there I found that the "borrower" field when doing the isEmpty check was causing the exception.  Finding that, I then noticed on the search item wizard that the borrows pull down was empty.  (I have about 6 borrowers defined with a couple of movies currently being borrowed and a few more having a borrowing history).

This is where I stopped.  As I said, I don't know if this is user error or not.  I don't know if I have tried to do this since I moved over to gcstar.  I will try to dig deeper later, but I wanted to open the bug now.



#2 2007-04-07 18:05:34

Registered: 2007-02-27
Posts: 17

Re: find (item search) wizard generates error

So I went a little further.  I lend/returned an item.  I found that the XML formatting for the "borrowings" has changed.  The new borrowings looked looks like this.


But I have lines formatted like this.  Which I assume is from when I imported from gcfilms.

  <borrowings>Lisa and John;06/07/2005;09/12/2005</borrowings>
  <borrowings>Lon and Jenn;06/07/2005;09/07/2005</borrowings>

I fixed all the xml entries like the above to be the new format.  But that did not fix the problem with the borrows pull down in the item search wizard.



#3 2007-04-08 20:12:20

From: France
Registered: 2006-12-08
Posts: 1647

Re: find (item search) wizard generates error


The fix you suggested could be useful for other cases also. So I added it. Thanks for this.

The entries formatted with ; instead of XML tags should be managed correctly. So it should not be a problem.

Then the strange thing is why your borrower list is empty... Maybe it could be a problem of encoding in the borrowers name as mentioned in this topic : http://forums.gcstar.org/viewtopic.php?id=182



Should you have a problem using GCstar, you can open a bug report or request some support on GCstar forums.