我目前在Windows机器上使用ruby 1.9.3,我创建了一个从oracle数据库中提取记录并对这些记录进行处理的工具。
我正在使用dbi进行连接。在某些表的情况下,它工作正常但在某些情况下它只是失败,出现以下错误消息:
C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/gems/1.9.1/gems/dbd-odbc
-0.2.5/lib/dbd/odbc/statement.rb:41: [BUG] Segmentation fault
ruby 1.9.3p125 (2012-02-16) [i386-mingw32]
-- Control frame information -----------------------------------------------
c:0013 p:---- s:0079 b:0079 l:000078 d:000078 CFUNC :fetch
c:0012 p:0014 s:0076 b:0075 l:000074 d:000074 METHOD C:/DOCUME~1/ADMINI~1/LOCALS
~1/Temp/1/ocr21.tmp/lib/ruby/gems/1.9.1/gems/dbd-odbc-0.2.5/lib/dbd/odbc/stateme
nt.rb:41
c:0011 p:0093 s:0071 b:0071 l:000070 d:000070 METHOD C:/DOCUME~1/ADMINI~1/LOCALS
~1/Temp/1/ocr21.tmp/lib/ruby/gems/1.9.1/gems/dbi-0.4.5/lib/dbi/handles/statement
.rb:211
c:0010 p:0065 s:0066 b:0066 l:000065 d:000065 METHOD C:/DOCUME~1/ADMINI~1/LOCALS
~1/Temp/1/ocr21.tmp/lib/ruby/gems/1.9.1/gems/dbi-0.4.5/lib/dbi/handles/statement
.rb:240
c:0009 p:0194 s:0062 b:0062 l:000f0c d:00142c BLOCK C:/DOCUME~1/ADMINI~1/LOCALS
~1/Temp/1/ocr21.tmp/src/Oracle/Oracle_Data_Extractor_3.0.rb:349
c:0008 p:---- s:0058 b:0058 l:000057 d:000057 FINISH
c:0007 p:---- s:0056 b:0056 l:000055 d:000055 CFUNC :each
c:0006 p:0289 s:0053 b:0053 l:000f0c d:0009dc BLOCK C:/DOCUME~1/ADMINI~1/LOCALS
~1/Temp/1/ocr21.tmp/src/Oracle/Oracle_Data_Extractor_3.0.rb:337
c:0005 p:---- s:0047 b:0047 l:000046 d:000046 FINISH
c:0004 p:---- s:0045 b:0045 l:000044 d:000044 CFUNC :each
c:0003 p:1373 s:0042 b:0042 l:000f0c d:00267c EVAL C:/DOCUME~1/ADMINI~1/LOCALS
~1/Temp/1/ocr21.tmp/src/Oracle/Oracle_Data_Extractor_3.0.rb:304
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:000f0c d:000f0c TOP
-- Ruby level backtrace information ----------------------------------------
C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/src/Oracle/Oracle_Data_Extractor_
3.0.rb:304:in `<main>'
C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/src/Oracle/Oracle_Data_Extractor_
3.0.rb:304:in `each'
C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/src/Oracle/Oracle_Data_Extractor_
3.0.rb:337:in `block in <main>'
C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/src/Oracle/Oracle_Data_Extractor_
3.0.rb:337:in `each'
C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/src/Oracle/Oracle_Data_Extractor_
3.0.rb:349:in `block (2 levels) in <main>'
C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/gems/1.9.1/gems/dbi-0.4.
5/lib/dbi/handles/statement.rb:240:in `each'
C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/gems/1.9.1/gems/dbi-0.4.
5/lib/dbi/handles/statement.rb:211:in `fetch'
C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/gems/1.9.1/gems/dbd-odbc
-0.2.5/lib/dbd/odbc/statement.rb:41:in `fetch'
C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/gems/1.9.1/gems/dbd-odbc
-0.2.5/lib/dbd/odbc/statement.rb:41:in `fetch'
-- C level backtrace information -------------------------------------------
C:\WINDOWS\system32\ntdll.dll(KiFastSystemCallRet+0x0) [0x7c82845c]
C:\WINDOWS\system32\kernel32.dll(WaitForSingleObject+0x12) [0x77e61c8d]
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\1\ocr21.tmp\bin\msvcrt-ruby191.dll(rb_vm_bugr
eport+0xf9) [0x62e5c61d]
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\1\ocr21.tmp\bin\msvcrt-ruby191.dll(rb_name_er
r_mesg_new+0x17a) [0x62d3a6fa]
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\1\ocr21.tmp\bin\msvcrt-ruby191.dll(rb_bug+0x2
f) [0x62d3b45b]
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\1\ocr21.tmp\bin\msvcrt-ruby191.dll(rb_check_s
afe_str+0x1a4) [0x62dee1a0]
[0x004011e6]
C:\oracle\product\10.2.0\db_1\BIN\MSVCR71.dll(_unDNameEx+0x764) [0x7c35f0c3]
-- Other runtime information -----------------------------------------------
* Loaded script: C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/src/Oracle/Oracl
e_Data_Extractor_3.0.rb
* Loaded features:
0 enumerator.so
1 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/1.9.1/i386-mingw32
/enc/encdb.so
2 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/1.9.1/i386-mingw32
/enc/iso_8859_1.so
3 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/1.9.1/i386-mingw32
/enc/trans/transdb.so
4 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/site_ruby/1.9.1/ru
bygems/defaults.rb
5 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/1.9.1/i386-mingw32
/rbconfig.rb
6 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/site_ruby/1.9.1/ru
bygems/deprecate.rb
7 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/site_ruby/1.9.1/ru
bygems/exceptions.rb
8 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/site_ruby/1.9.1/ru
bygems/defaults/operating_system.rb
9 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/site_ruby/1.9.1/ru
bygems/custom_require.rb
10 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/site_ruby/1.9.1/ru
bygems.rb
11 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/site_ruby/1.9.1/ru
bygems/version.rb
12 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/site_ruby/1.9.1/ru
bygems/requirement.rb
13 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/site_ruby/1.9.1/ru
bygems/platform.rb
14 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/site_ruby/1.9.1/ru
bygems/specification.rb
15 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/site_ruby/1.9.1/ru
bygems/path_support.rb
16 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/site_ruby/1.9.1/ru
bygems/dependency.rb
17 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/gems/1.9.1/gems/de
precated-2.0.1/lib/deprecated.rb
18 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/1.9.1/delegate.rb
19 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/gems/1.9.1/gems/db
i-0.4.5/lib/dbi/row.rb
20 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/gems/1.9.1/gems/db
i-0.4.5/lib/dbi/utils/date.rb
21 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/gems/1.9.1/gems/db
i-0.4.5/lib/dbi/utils/time.rb
22 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/gems/1.9.1/gems/db
i-0.4.5/lib/dbi/utils/timestamp.rb
23 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/gems/1.9.1/gems/db
i-0.4.5/lib/dbi/utils/xmlformatter.rb
24 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/gems/1.9.1/gems/db
i-0.4.5/lib/dbi/utils/tableformatter.rb
25 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/gems/1.9.1/gems/db
i-0.4.5/lib/dbi/utils.rb
26 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/1.9.1/i386-mingw32
/date_core.so
27 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/1.9.1/date/format.
rb
28 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/1.9.1/date.rb
29 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/1.9.1/time.rb
30 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/gems/1.9.1/gems/db
i-0.4.5/lib/dbi/sql/preparedstatement.rb
31 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/gems/1.9.1/gems/db
i-0.4.5/lib/dbi/sql.rb
32 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/gems/1.9.1/gems/db
i-0.4.5/lib/dbi/columninfo.rb
33 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/1.9.1/i386-mingw32
/bigdecimal.so
34 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/1.9.1/rational.rb
35 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/gems/1.9.1/gems/db
i-0.4.5/lib/dbi/types.rb
36 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/gems/1.9.1/gems/db
i-0.4.5/lib/dbi/typeutil.rb
37 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/gems/1.9.1/gems/db
i-0.4.5/lib/dbi/sql_type_constants.rb
38 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/gems/1.9.1/gems/db
i-0.4.5/lib/dbi/exceptions.rb
39 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/gems/1.9.1/gems/db
i-0.4.5/lib/dbi/binary.rb
40 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/gems/1.9.1/gems/db
i-0.4.5/lib/dbi/handles/driver.rb
41 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/gems/1.9.1/gems/db
i-0.4.5/lib/dbi/handles/database.rb
42 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/gems/1.9.1/gems/db
i-0.4.5/lib/dbi/handles/statement.rb
43 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/gems/1.9.1/gems/db
i-0.4.5/lib/dbi/handles.rb
44 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/gems/1.9.1/gems/db
i-0.4.5/lib/dbi/base_classes/driver.rb
45 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/gems/1.9.1/gems/db
i-0.4.5/lib/dbi/base_classes/database.rb
46 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/gems/1.9.1/gems/db
i-0.4.5/lib/dbi/base_classes/statement.rb
47 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/gems/1.9.1/gems/db
i-0.4.5/lib/dbi/base_classes.rb
48 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/1.9.1/thread.rb
49 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/1.9.1/monitor.rb
50 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/gems/1.9.1/gems/db
i-0.4.5/lib/dbi.rb
51 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/gems/1.9.1/gems/ru
by-odbc-0.99994/lib/odbc.so
52 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/gems/1.9.1/gems/db
d-odbc-0.2.5/lib/dbd/odbc/driver.rb
53 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/gems/1.9.1/gems/db
d-odbc-0.2.5/lib/dbd/odbc/database.rb
54 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/gems/1.9.1/gems/db
d-odbc-0.2.5/lib/dbd/odbc/statement.rb
55 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/gems/1.9.1/gems/db
d-odbc-0.2.5/lib/dbd/ODBC.rb
56 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/1.9.1/getoptlong.r
b
57 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/src/User Library/Ruby/credi
t_card_data.rb
58 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/src/User Library/Ruby/custo
m_data.rb
59 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/1.9.1/i386-mingw32
/enc/utf_16le.so
60 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/1.9.1/i386-mingw32
/enc/trans/single_byte.so
61 C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/ocr21.tmp/lib/ruby/1.9.1/i386-mingw32
/enc/trans/utf_16_32.so
[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
记录内容存在问题,即编码还是其他问题?
答案 0 :(得分:0)
Ruby 1.9.3p125在运行nanoc compile命令的同时,Windows下的Segfaults也是如此。我最好的建议是至少暂时回到1.9.3p0。我试图在跟踪系统上提出一个问题。相信我,当我说,这不是你的错,没有什么可以解决,只报告问题,这对开发者有很大的帮助。