This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
1) Put breakpoint on line no. 4 2) Run Fast Debugger 3) Go to Local Variables, expand 'pdf' variable Debugger session silently ends up. This is very like bug in the backend. Simulating it with a telnet session, the client is disconnected without any visible reason, however server does not finish. require "rubygems" require 'pdf/writer' pdf = PDF::Writer.new p pdf Might be somehow related to issue 101625.
This was bug in the fast debugger backend. I've fixed that in the version ruby-debug-ide 0.1.5 and published on rubyforge.org. So one needs to upgrade to the latest IDE and latest gem.
I have tested debugging with NetBeans M9 (nb-m9) and ruby-ide-hudson build 1330 (ruby-ide) this is main.rb code require "rubygems" gem "pdf-writer" require 'pdf/writer' pdf = PDF::Writer.new() encoding = { :encoding => "WinAnsiEncoding" , :differences => { 214 => "Cacute", 215 => "cacute" } } <<BREAKPOINT_1>> pdf.select_font("BringOutBaTahomaMono2.afm", encoding) pdf.text "BringOutBaTahomaMono2: \xd6 \xd7 ", :font_size => 7, :justification => :left ... I have put breakpoint to position <<BREAKPOINT_1>>. When I try "step over": * nb-m9 debug session silently die * ruby-ide successfuly finish debug session session But there is another problem with ruby-ide. After passing <<BREAKPOINT_1>>, I move to variable pdf, and getting exception org.xmlpull.v1.XmlPullParserException As you can see It is some binary content. I suspect that there is problem (as I earlier sad) when an variable contain some binary content. note: ruby-debg-ide updated ruby-debug-ide-0.1.5
Created attachment 42787 [details] exception, pdf variable
Hi Ernad. Which version of pdf-writer are you using? I'm using 1.1.3 and it seems to does not work with the code you've attached. Should I use trunk branch of pdf-writer to reproduce? I'm getting exception: .../pdf-writer-1.1.3/lib/pdf/writer.rb:860:in `load_font': undefined local variable or method `firstchar' for #<PDF::Writer:0xb799363c> (NameError) from .../pdf-writer-1.1.3/lib/pdf/writer.rb:857:in `each' from .../pdf-writer-1.1.3/lib/pdf/writer.rb:857:in `load_font' from .../pdf-writer-1.1.3/lib/pdf/writer.rb:1039:in `select_font' from .../pdf/pdf.rb:18 from .../ruby-debug-ide-0.1.5/lib/ruby-debug.rb:79:in `debug_load' from .../ruby-debug-ide-0.1.5/lib/ruby-debug.rb:79:in `main' from .../ruby-debug-ide-0.1.5/bin/rdebug-ide:74 from ...rdebug-ide:16:in `load' from ...rdebug-ide:16
Otherwise I've successfully debugged few demos from the PDF::Writer homepage. You are using Linux, right?
Created attachment 43873 [details] my pdf-writer 1.1.3 patch
Sorry for delay, I am really busy these days. I have submitted my patch for pdf-writer-1.1.3 Apply patch with: hernad@desk-h8:/usr/lib/ruby/gems/1.8/gems/pdf-writer-1.1.3$ patch -p1 < pdf-writer-1.1.3.hernad.patch And yes, I am using Linux. Regards, Ernad
I already submitted these changes as files on ticket http://www.netbeans.org/issues/show_bug.cgi?id=101625 Meanwhile, I have change my font: http://www.netbeans.org/nonav/issues/showattachment.cgi/41229/BringOutBaTMono2.zip So please extract font in the main.rb, and use the old fontname in the example: ... pdf.select_font("BringOutBaTMono2.afm", encoding)
Great, I'm finally able to reproduce with the attached patch. Thanks.
Created attachment 43902 [details] ruby-ide-patch.diff
Ernad could try to reproduce with the attached patch: .../gems/ruby-debug-ide-0.1.5$ patch -p0 < ~/tmp/ruby-ide-patch.diff and let me know the result. Thanks.
i have applied patch to ruby-debug-ide, and tested with ruby-ide build 1945. When I point to pdf variable, I'm getting [Binary data]. No exception. It is working now. Thank you!
The same bug was in the classic(slow) debuggers. All should be fixed now. Note it requires ruby-debug-ide gem in version 0.1.6 which I've just released. So it might take some time until it is available through gem tool. Thanks for really helpful feedback. debug-commons-java/manifest.mf; new revision: 1.15; previous revision: 1.14 debugger/manifest.mf; new revision: 1.28; previous revision: 1.27 debugger/nbproject/project.properties; new revision: 1.12; previous revision: 1.11 debugger/nbproject/project.xml; new revision: 1.25; previous revision: 1.24 debugger/src/org/netbeans/modules/ruby/debugger/RubyDebugger.java; new revision: 1.34; previous revision: 1.33 debugger/src/org/netbeans/modules/ruby/debugger/Util.java; new revision: 1.20; previous revision: 1.19 debugger/test/unit/src/org/netbeans/modules/ruby/debugger/TestBase.java; new revision: 1.17; previous revision: 1.16 Removing external/debug-commons-0.9.3-license.txt; new revision: delete; previous revision: 1.1 Removing external/debug-commons-0.9.3.tar.gz; new revision: delete; previous revision: 1.1 external/debug-commons-0.9.4-license.txt; initial revision: 1.1 external/debug-commons-0.9.4.tar.gz; initial revision: 1.1
Reassigning this issue to newly created 'ruby' component.
Changing target milestone of all resolved Ruby issues from TBD to 6.0 Beta 1 build.