Bug 209994 - Debug fails on using parsing XML with REXML
Summary: Debug fails on using parsing XML with REXML
Status: RESOLVED FIXED
Alias: None
Product: DLTK
Classification: Technology
Component: Ruby-Debug (show other bugs)
Version: 0.95   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 1.0M4   Edit
Assignee: Andrey Platov CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2007-11-15 12:30 EST by Nikolay Kurtov CLA
Modified: 2010-06-11 07:06 EDT (History)
1 user (show)

See Also:


Attachments
Patch to fix the problem (6.75 KB, patch)
2007-11-19 01:43 EST, Timur Shipilov CLA
alex.panchenko: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nikolay Kurtov CLA 2007-11-15 12:30:17 EST
Tried to debug the script that parses an XML

script.rb:

require 'rexml/document'
include REXML

mainFileName = "test.xml"
mainXml = REXML::Document.new(File.open(mainFileName))
puts mainXml.root.name


test.xml:

<a/>


Fast debugger sometimes terminates just after start, without any output to the console
If I set a breakpoint on first lines and then trace it by steps debugger runs correctly

basic debugger fails on parsing the xml with the following error:

d:/scripts/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:92:in `load_specification': d:/scripts/ruby/lib/ruby/1.8/time.rb:184:in `local': argument out of range
	d:/scripts/ruby/lib/ruby/1.8/time.rb:184:in `make_time'
	d:/scripts/ruby/lib/ruby/1.8/time.rb:243:in `parse'
	d:/scripts/ruby/lib/ruby/site_ruby/1.8/rubygems/specification.rb:13:in `today'
	d:/scripts/ruby/lib/ruby/site_ruby/1.8/rubygems/specification.rb:314:in `date='
	d:/scripts/ruby/lib/ruby/site_ruby/1.8/rubygems/specification.rb:416:in `send'
	d:/scripts/ruby/lib/ruby/site_ruby/1.8/rubygems/specification.rb:416:in `initialize'
	d:/scripts/ruby/lib/ruby/site_ruby/1.8/rubygems/specification.rb:412:in `each'
	d:/scripts/ruby/lib/ruby/site_ruby/1.8/rubygems/specification.rb:412:in `initialize'
	(eval):1:in `new'
	(eval):1:in `load_specification'
	d:/scripts/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:128:in `eval'
	d:/scripts/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:92:in `load_specification'
	d:/scripts/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:128:in `load_gems_in'
	d:/scripts/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:127:in `each'
	d:/scripts/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:127:in `load_gems_in'
	d:/scripts/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:81:in `from_gems_in'
	d:/scripts/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:53:in `from_installed_gems'
	d:/scripts/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:126:in `source_index'
	d:/scripts/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:105:in `init_gemspecs'
	d:/scripts/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:54:in `initialize'
	d:/scripts/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:212:in `new'
	d:/scripts/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:212:in `searcher'
	d:/scripts/ruby/lib/ruby/1.8/thread.rb:135:in `synchronize'
	d:/scripts/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:211:in `searcher'
	d:/scripts/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:30:in `require'
	d:/scripts/ruby/lib/ruby/1.8/rexml/encoding.rb:38:in `encoding='
	d:/scripts/ruby/lib/ruby/1.8/rexml/source.rb:47:in `encoding='
	d:/scripts/ruby/lib/ruby/1.8/rexml/source.rb:40:in `initialize'
	d:/scripts/ruby/lib/ruby/1.8/rexml/source.rb:144:in `initialize'
	d:/scripts/ruby/lib/ruby/1.8/rexml/source.rb:16:in `new'
	d:/scripts/ruby/lib/ruby/1.8/rexml/source.rb:16:in `create_from'
	d:/scripts/ruby/lib/ruby/1.8/rexml/parsers/baseparser.rb:123:in `stream='
	d:/scripts/ruby/lib/ruby/1.8/rexml/parsers/baseparser.rb:100:in `initialize'
	d:/scripts/ruby/lib/ruby/1.8/rexml/parsers/treeparser.rb:8:in `new'
	d:/scripts/ruby/lib/ruby/1.8/rexml/parsers/treeparser.rb:8:in `initialize'
	d:/scripts/ruby/lib/ruby/1.8/rexml/document.rb:190:in `new'
	d:/scripts/ruby/lib/ruby/1.8/rexml/document.rb:190:in `build'
	d:/scripts/ruby/lib/ruby/1.8/rexml/document.rb:45:in `initialize'
	D:/dltk/ws/rg/script.rb:5:in `new'
	D:/dltk/ws/rg/script.rb:5
Comment 1 Nikolay Kurtov CLA 2007-11-15 12:47:35 EST
Tested on dltk-S-1.0M3-200711091536
Comment 2 Timur Shipilov CLA 2007-11-19 01:43:15 EST
Created attachment 83212 [details]
Patch to fix the problem
Comment 3 Timur Shipilov CLA 2007-11-19 03:45:21 EST
Andrey, please review and apply patch.
Comment 4 Andrey Platov CLA 2007-12-05 07:39:07 EST
done
Comment 5 Andrey Platov CLA 2008-05-26 02:50:31 EDT
bulk change: fixed in 0.95