<< | Index | >>
Debug video url saving.
Again, only production has this problem. (In my VM, It works fine.)
z.B.
This Cause was "Serie Position" field.
It's essential(require) field.
"Serie Position" was empty.
I found no model error in production log.
Then I updated to prevent this error. (I don't know Why this is solution. But it's oddb.org's way.)
This error happened sometimes. (not always)
And view output does not have any problem, although it has this error.
But I prevent this error.
2013-08-20 23:26:51.664246500 error in SBSM::Session#http_headers: /en/communication/shop_art_object/artgroup_id//artobject_id/1409 2013-08-20 23:26:51.664248500 NoMethodError 2013-08-20 23:26:51.664249500 undefined method `url' for nil:NilClass 2013-08-20 23:26:51.664250500 /var/www/new.davaz.com/src/view/art_object.rb:68:in `url' 2013-08-20 23:26:51.664250500 /usr/local/bin/ruby186/lib/ruby/gems/1.8/gems/htmlgrid-1.0.3/lib/htmlgrid/composite.rb:141:in `send' 2013-08-20 23:26:51.664251500 /usr/local/bin/ruby186/lib/ruby/gems/1.8/gems/htmlgrid-1.0.3/lib/htmlgrid/composite.rb:141:in `create' 2013-08-20 23:26:51.664261500 /usr/local/bin/ruby186/lib/ruby/gems/1.8/gems/htmlgrid-1.0.3/lib/htmlgrid/divcomposite.rb:33:in `compose' 2013-08-20 23:26:51.664262500 /usr/local/bin/ruby186/lib/ruby/gems/1.8/gems/htmlgrid-1.0.3/lib/htmlgrid/divcomposite.rb:13:in `each' 2013-08-20 23:26:51.664263500 error in SBSM::Session#to_html: /en/gallery/art_object/artgroup_id/PAI/search_query/artobject_id/567 2013-08-20 23:26:51.664265500 NoMethodError 2013-08-20 23:26:51.664266500 undefined method `url' for nil:NilClass 2013-08-20 23:26:51.664266500 /var/www/new.davaz.com/src/view/art_object.rb:68:in `url' 2013-08-20 23:26:51.664266500 /usr/local/bin/ruby186/lib/ruby/gems/1.8/gems/htmlgrid-1.0.3/lib/htmlgrid/composite.rb:141:in `send' 2013-08-20 23:26:51.664267500 /usr/local/bin/ruby186/lib/ruby/gems/1.8/gems/htmlgrid-1.0.3/lib/htmlgrid/composite.rb:141:in `create' 2013-08-20 23:26:51.664272500 /usr/local/bin/ruby186/lib/ruby/gems/1.8/gems/htmlgrid-1.0.3/lib/htmlgrid/divcomposite.rb:33:in `compose'
Solution is:
def url(model) text = model.url #=> undefined method `url' for nil:NilClass (why?) ... end
def url(model=@model) text = model.url #=> it works ... end
Same error is caused in shop.
z.B.
2013-08-21 04:46:16.443743500 error in SBSM::Session#to_html: /en/communication/shop_art_object/artgroup_id/MOV/artobject_id/308 2013-08-21 04:46:16.443744500 NoMethodError 2013-08-21 04:46:16.443745500 undefined method `empty?' for nil:NilClass 2013-08-21 04:46:16.443745500 /var/www/new.davaz.com/src/view/art_object.rb:68:in `url' 2013-08-21 04:46:16.443746500 /usr/local/bin/ruby186/lib/ruby/gems/1.8/gems/htmlgrid-1.0.3/lib/htmlgrid/composite.rb:141:in `send' 2013-08-21 04:46:16.443773500 /usr/local/bin/ruby186/lib/ruby/gems/1.8/gems/htmlgrid-1.0.3/lib/htmlgrid/composite.rb:141:in `create' 2013-08-21 04:46:16.443775500 /usr/local/bin/ruby186/lib/ruby/gems/1.8/gems/htmlgrid-1.0.3/lib/htmlgrid/divcomposite.rb:33:in `compose' ...
Then I update this part again for shop.
ZBarReaderViewController extends UIViewController.
@interface ZBarReaderViewController : UIViewController { ZBarImageScanner *scanner; id <ZBarReaderDelegate> readerDelegate; ZBarReaderView *readerView; UIView *cameraOverlayView; CGAffineTransform cameraView ...
Check subviews of ZBarReaderViewController#view
DLog(@"subviews #=> %@", self.reader.view.subviews); # DLog(@"subview with index 1 #=> %@", [self.reader.view.subviews objectAtIndexPath:1]);
2013-08-21 16:31:43.684 generika[5285:a0b] -[MasterViewController openReader] [Line 381] reader.view's subviews #=> ( "<ZBarReaderViewImpl: 0xa190790; frame = (0 0; 320 426); clipsToBounds = YES; autoresize = W+H+BM; gestureRecognizers = <NSArray: 0xa187540>; layer = <CALayer: 0xa186920>>", "<UIView: 0xa19deb0; frame = (0 426; 320 54); autoresize = W+TM+H; layer = <CALayer: 0xa19c910>>" )
I found toolbar! this UIView has UIToolbar.
check it like this:
UIView *thisIsBarOwner = [self.reader.view.subviews objectAtIndexPath:1]; [thisIsBarOwner removeFromSuperview]; #=> toolbar is gone.
ZBarReaderViewController does not have toolbar
, directly.
It use custom uiview It has UIToolbar
.
agaist strange "Cancel" button position.
This is strange ...
Then checked subviews of toolbar.
2013-08-22 02:05:29.919 generika[7977:a0b] -[MasterViewController layoutReaderToolbar] [Line 438] subviews ( "<_UIToolbarBackground: 0x96a0110; frame = (0 0; 320 598); autoresize = W; userInteractionEnabled = NO; layer = <CALayer: 0x96a01b0>>", "<UIImageView: 0x969cc50; frame = (0 -1; 320 1); autoresize = W+BM; userInteractionEnabled = NO; layer = <CALayer: 0x969ec40>>", "<UIToolbarTextButton: 0x96e4370; frame = (16 0; 54 54); opaque = NO; layer = <CALayer: 0x96f0220>>", "<UIButton: 0x96dcf90; frame = (278 16; 22 22); opaque = NO; layer = <CALayer: 0x96e7fa0>>" )
Finaly, I update "Cancel" Button position.
This is not perfect. (It moves in delay)
But there is no way without implementation file of ZBar.