minad / olelo

Wiki with git backend
MIT License
241 stars 43 forks source link

Gallery functionality not optimal... #32

Closed marvin2k closed 13 years ago

marvin2k commented 14 years ago

Using the Gallery Plugin with 10 files in a directory. Only a few htumbnails are generated, then most of the time something crashes. different error messages... Or no message and complete stall...

One (the most frequent) message: zlib(finalizer): Zlib::GzipWriter object must be closed explicitly. zlib(finalizer): the stream was freed prematurely.

Another (not often seen): Zlib::DataError: invalid stored block lengths

Tried some fiddling with caching and deflater... No success and no light... Resizing takes place in line 30, image.rb? Maybe take this into account: http://www.imagemagick.org/Usage/formats/#jpg_read

minad commented 14 years ago

Does the first message still appear if deflater is disabled? I observe this message only if you cancel the page loading in the browser. We should ask about the first issue on the rack tracker.

It is a good idea to switch to -thumbnail instead of -resize.

marvin2k commented 14 years ago

Yay, works faster now... But the problems still exist... it seems that this is more a problem of gitrb or in my git-repo. may it cause problems with gitrb, if i use a local instance of git, with editied PATH variable instead of system default?

Zlib::DataError: invalid distance too far back /home/mzenzes/.gem/gems/gitrb-0.2.4/lib/gitrb/repository.rb:233:in inflate' /home/mzenzes/.gem/gems/gitrb-0.2.4/lib/gitrb/repository.rb:233:inget' /home/mzenzes/.gem/gems/gitrb-0.2.4/lib/gitrb/reference.rb:23:in method_missing' /home/mzenzes/olelo/plugins/repository/git/repository.rb:95:inload_content'

Or:

Zlib::DataError: invalid code lengths set /home/mzenzes/.gem/gems/gitrb-0.2.4/lib/gitrb/repository.rb:233:in inflate' /home/mzenzes/.gem/gems/gitrb-0.2.4/lib/gitrb/repository.rb:233:inget' /home/mzenzes/.gem/gems/gitrb-0.2.4/lib/gitrb/reference.rb:23:in `method_missing'

NoMethodError: undefined method to_olelo' for nil:NilClass /home/mzenzes/olelo/plugins/repository/git/repository.rb:77:inload_version' /home/mzenzes/olelo/lib/olelo/page.rb:241:in init_versions' /home/mzenzes/olelo/lib/olelo/page.rb:97:inversion' /home/mzenzes/olelo/plugins/misc/sidebar.rb:8:in `HOOK layout 3'

Didn't observe zlib(finalize) error in the last "testing session" without deflater... and updated every dependency (there was an missing update in gitrb)

minad commented 14 years ago

this is a gitrb issue. I observed this on one of my installations (ruby 1.8, not ruby 1.9). I am currently debugging this.

marvin2k commented 14 years ago

that fits, i'm running ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]

minad commented 14 years ago

It only happens if you use heavily threaded servers, you could switch to unicorn to avoid it. There seem to be some race conditions in the ruby IO code of 1.8.7, I filed an issue on http://redmine.ruby-lang.org/issues/show/3853

minad commented 13 years ago

Not an issue under 1.9