Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 04-02-2010, 10:38 AM   #1
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
When do fixes/enhancements get added to source trunk?

Confusion has struck again. Normally, I upgrade Calibre shortly after a release. I download the binary and do a bazaar merge into my copy of the source.

I've done this for 20 versions or so and I've been under the impression that regardless of whether I run the binary, or the source I was running the same basic code. I assumed that there was another branch that Kovid maintains where incremental changes to the code are integrated, then the binary is built and the source for that binary is moved into the trunk that I get when I do a merge.

Today something happened in the 0.6.46 upgrade that makes me think that the bazaar merge brings in incremental changes added after the binary was built. It's possible I never saw this because I normally only merge just after the release of the binary. This time there was a longer delay

When running 0.6.46 binary, I do not see chaley's save search code. When running from source, I do. Part of the reason I'm confused is that I had planned to look at his code, and I had downloaded his bazaar patch file, but I could swear I didn't merge it in yet. Nonetheless, I see it when running from the source, but not when running from the binary.

This makes me think that the source has been incrementally updated to add his code after the binary was built.

Thus my question.

The related issue is that the save search code won't run:

Code:
ERROR: ERROR: Unhandled exception: <b>AttributeError</b>:'QString' object has no attribute 'decode'

Traceback (most recent call last):
  File "C:\Util\Calibre2\src\src\calibre\gui2\search_box.py", line 290, in save_search_button_clicked
  File "C:\Util\Calibre2\src\src\calibre\utils\search_query_parser.py", line 46, in add
  File "C:\Util\Calibre2\src\src\calibre\utils\search_query_parser.py", line 42, in force_unicode
AttributeError: 'QString' object has no attribute 'decode'
I just need to get my bearings as to what I should be seeing and what's coming in from the trunk source. The problem with this code not running could be interference with my code changes. I haven't brought in the unchanged source from the trunk (yet). Thanks for providing any light on this.
Starson17 is offline   Reply With Quote
Old 04-02-2010, 01:06 PM   #2
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by Starson17 View Post
This makes me think that the source has been incrementally updated
Having checked this out in greater detail, it does appear that Kovid incrementally updates the source between binary releases.

Quote:
The related issue is that the save search code won't run:

Code:
search_query_parser.py", line 42, in force_unicode
AttributeError: 'QString' object has no attribute 'decode'
FYI, as a temporary fix, I just forced x to be unicode "x = unicode(x)" at the point above, and the save search code works.
Starson17 is offline   Reply With Quote
Old 04-02-2010, 01:40 PM   #3
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,776
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
calibre development happens in trunk not in a separate branch. I keep merging changes into trunk between binary release. A binary release is just a snapshot of trunk when I feel trunk is stable and ready for release.

I broke trunk earlier today, should now be fixed (with chaley's saved search patches included).
kovidgoyal is offline   Reply With Quote
Old 04-02-2010, 02:58 PM   #4
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by kovidgoyal View Post
calibre development happens in trunk not in a separate branch. I keep merging changes into trunk between binary release. A binary release is just a snapshot of trunk when I feel trunk is stable and ready for release.
Thank you. That confirms what I thought was happening. It's amazing how long I had run without noticing this, but I suppose it's just that I grabbed the source at about the same time as you took the binary snapshot.

Quote:
I broke trunk earlier today, should now be fixed (with chaley's saved search patches included).
Yep. The save search code is fixed now.

I have to give you a big "Thank You" for optimizing the SQL code. It's a couple of orders of magnitude faster now to edit a record. I was getting desperate with my large library.

Edit .... I looked at bug #5158 regarding this and I see it's reopened. Whatever code is in the trunk now is fast for me. Do you need testing in Vista or is it resolved?
Starson17 is offline   Reply With Quote
Old 04-02-2010, 11:41 PM   #5
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,776
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Testing is always good I'm not yet convinced its the new SQL that's causing the problem. I suspect instead a GUI issue.
kovidgoyal is offline   Reply With Quote
Old 04-03-2010, 04:36 AM   #6
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,703
Karma: 6658935
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by kovidgoyal View Post
I'm not yet convinced its the new SQL that's causing the problem. I suspect instead a GUI issue.
I was the one who was having problems.

Seems that Kovid was correct (what a surprise), although the 'why' of it isn't obvious to me. The problem occurred when a new saved search was added, causing the main window GUI to ask the tags pane to update the list of saved searches. I used an existing method to do that, because the method went to some pains to preserve the screen position of tags. Apparently this caused the problem (calibre crashed). When I changed it to instead refresh the tags pane and lose the position, the crash went away.

My theory, based on ignorance and superstition, is that the position preservation somewhere preserves a pointer to a node. Unfortunately, refreshing the tags will rebuild the node list, leaving the pointer referring to an area of memory now used by something else. Nothing good can come of this. If I am right, then tags_view.recount() probably should not be used (it is used currently only when the database changes underneath the GUI, a rare event?). However, my theory is not far from waving wands and muttering incantations, and should be interpreted accordingly.
chaley is offline   Reply With Quote
Old 04-03-2010, 05:03 AM   #7
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,776
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You can check what thread is executing using the QThread class it has a static method to print the current thread id
kovidgoyal is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Book jacket enhancements in 0.7.19 GRiker Calibre 7 09-20-2010 09:19 PM
How to apply the enhancements/patches ? nubbol Calibre 2 09-04-2010 11:42 PM
Enhancements in progress??? crutledge Sigil 5 06-15-2010 02:14 PM
EZ-Reader fixes and enhancements list ekaser Astak EZReader 220 04-16-2010 09:49 PM
Kindle enhancements: calibre 0.6.46 GRiker Calibre 21 04-05-2010 05:27 AM


All times are GMT -4. The time now is 03:56 PM.


MobileRead.com is a privately owned, operated and funded community.