Skip to content

Instantly share code, notes, and snippets.

@rdp
rdp / exception backtrace
Created November 19, 2010 22:32
another NPE in the constructor...
Java.java:724:in `call': java.lang.NullPointerException
from JavaMethod.java:642:in `call'
from CachingCallSite.java:269:in `cacheAndCall'
from CachingCallSite.java:77:in `callBlock'
from CachingCallSite.java:82:in `call'
from ConcreteJavaProxy.java:35:in `call'
from SuperCallSite.java:280:in `cacheAndCall'
from SuperCallSite.java:64:in `callBlock'
from SuperCallSite.java:69:in `call'
from recreate_odd.rb:6:in `method__1$RUBY$initialize'
@rdp
rdp / gist:707442
Created November 19, 2010 23:56
swing app jruby
Exception in thread "AWT-EventQueue-0" ./bin/../lib/swing_helpers.rb:38:in `go': did not choose one (RuntimeError)
from bin\sensible-cinema:63:in `do_copy_dvd_to_hard_drive'
from bin\sensible-cinema:36:in `initialize'
from ./bin/../lib/swing_helpers.rb:20:in `call'
from ./bin/../lib/swing_helpers.rb:20:in `on_clicked'
from :1
...internal jruby stack elided...
from Java::JavaxSwing::JFileChooser.go(bin\sensible-cinema:63)
from SensibleSwing::MainWindow.do_copy_dvd_to_hard_drive(bin\sensible-cinema:36)
from SensibleSwing::MainWindow.initialize(./bin/../lib/swing_helpers.rb:20)
@rdp
rdp / gist:710217
Created November 22, 2010 16:35
substruct unit failures, 1.8.6, windoww
1) Error:
test_nullify_orders_after_destroy(AffiliatePaymentTest):
ActiveRecord::StatementInvalid: Mysql::Error: Column 'affiliate_payment_id' cannot be null: UPDATE `orders` SET affiliate_payment_id = NULL WHERE ((affiliate_payment_id = 925836607))
/vendor/plugins/substruct/test/unit/affiliate_payment_test.rb:20:in `test_nullify_orders_after_destroy'
2) Error:
test_amount_paid(AffiliateTest):
ActiveRecord::StatementInvalid: Mysql::Error: Column 'affiliate_payment_id' cannot be null: UPDATE `orders` SET affiliate_payment_id = NULL WHERE ((affiliate_payment_id = 925836604))
/vendor/plugins/substruct/test/unit/affiliate_test.rb:182:in `test_amount_paid'
@rdp
rdp / gist:711985
Created November 23, 2010 15:58
mingw 1.9 substruct
C:\dev\ruby\musicformormons>rake test:plugins:all PLUGIN=substruct
(in C:/dev/ruby/musicformormons)
-~============== A Moste Polite Warninge ===========================~-
You may experience issues testing multiple plugins at once when using
the code-mixing features that the engines plugin provides. If you do
experience any problems, please test plugins individually, i.e.
$ rake test:plugins PLUGIN=my_plugin
C:\dev\ruby\sensible-cinema\spec>C:\installs\jruby-1.5.5\bin\jruby drive_info.spec.rb
F"got"
#<WIN32OLE:0x152643>
F
1)
'dvd_drive_info should be able to get an md5sum from the dvd' FAILED
expected: "187ef4436122d1cc2f40dc2b92f0eba0",
got: "d41d8cd98f00b204e9800998ecf8427e" (using ==)
drive_info.spec.rb:11:
@rdp
rdp / gist:718029
Created November 27, 2010 16:19
jump from minute 1 to 10 instead jumps to 23
main debug: auto hidding mouse
main debug: VoutDisplayEvent 'mouse button' 0 t=8
dvdnav debug: buttonUpdate not done b=1 t=1
main debug: VoutDisplayEvent 'mouse button' 0 t=9
main debug: control type=3
main warning: received buffer in the future
dvdnav debug: DVDNAV_HOP_CHANNEL
main debug: ES_OUT_RESET_PCR called
dvdnav debug: DVDNAV_CELL_CHANGE
dvdnav debug: - cellN=9
@rdp
rdp / gist:718030
Created November 27, 2010 16:21
seeking from minute 15 to 10 results in minute 13
main debug: control type=3
dvdnav debug: DVDNAV_HOP_CHANNEL
main debug: ES_OUT_RESET_PCR called
dvdnav debug: DVDNAV_CELL_CHANGE
dvdnav debug: - cellN=9
dvdnav debug: - pgN=5
dvdnav debug: - cell_length=33840000
dvdnav debug: - pg_length=67680000
dvdnav debug: - pgc_length=207375000
dvdnav debug: - cell_start=112500000
@rdp
rdp / gist:745567
Created December 17, 2010 19:39
google_hash crashing easily on 64 bit
irb(main):002:0> require 'rubygems'
=> true
irb(main):003:0> require 'google_hash'
=> true
irb(main):004:0> GoogleHashDenseIntToInt.new[0] = 0
: ./local_installed/include/google/sparsehash/densehashtable.h:835: std::pair<google::dense_hashtable_iterator<V, K, HF, ExK, SetK, EqK, A>,
bool> google::dense_hashtable<Value, Key, HashFcn, ExtractKey, SetKey, EqualKey, Alloc>::insert_noresize(const Value&) [with Value = std::pair<const int, int>, Key = int, HashFcn = __gnu_cxx::hash<int>, ExtractKey = google::dense_hash_map<int, int, __gnu_cxx::hash<int>, std::equal_to<int>, std::allocator<int> >::SelectKey, SetKey = google::dense_hash_map<int, int, __gnu_cxx::hash<int>, std::equal_to<int>, std::allocator<int> >::SetKey, EqualKey = std::equal_to<int>, Alloc = std::allocator<int>]: Assertion `!use_empty || !equals(get_key(obj), get_key(emptyval))' failed.
Aborted
wilkboar@wilkboardonline.com [~]# gem search google_hash -b
// enum.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <cstdio>
#include <cstring>
#include <windows.h>
#include <comcat.h>
@rdp
rdp / gist:834576
Created February 18, 2011 23:07
.bundle failures
gem now wants a description. With that, it builds:
sa-nc-common2-234:~/V/rs faisal$ rake
(in /Users/faisal/V/rs)
/usr/local/Cellar/ruby/1.9.2-p136/lib/ruby/gems/1.9.1/gems/rack-1.2.1/lib/rack/request.rb:94: warning: already initialized constant FORM_DATA_MEDIA_TYPES
/usr/local/Cellar/ruby/1.9.2-p136/lib/ruby/gems/1.9.1/gems/rack-1.2.1/lib/rack/request.rb:102: warning: already initialized constant PARSEABLE_DATA_MEDIA_TYPES
/usr/local/Cellar/ruby/1.9.2-p136/lib/ruby/gems/1.9.1/gems/actionpack-3.0.4/lib/action_dispatch/http/request.rb:19: warning: already initialized constant LOCALHOST
/usr/local/Cellar/ruby/1.9.2-p136/lib/ruby/gems/1.9.1/gems/actionpack-3.0.4/lib/action_dispatch/http/request.rb:56: warning: already initialized constant RFC2616
/usr/local/Cellar/ruby/1.9.2-p136/lib/ruby/gems/1.9.1/gems/actionpack-3.0.4/lib/action_dispatch/http/request.rb:57: warning: already initialized constant RFC2518
/usr/local/Cellar/ruby/1.9.2-p136/lib/ruby/gems/1.9.1/gems/actionpack-3.0.4/lib/action_dispatch/http/