From lists at ruby-forum.com Thu Aug 4 07:16:57 2011 From: lists at ruby-forum.com (Tony Meier) Date: Thu, 04 Aug 2011 13:16:57 +0200 Subject: [wxruby-users] Reproducable FileDialog crashes on Win Message-ID: <243be0804da6eef0c16e7fadf97a2bd6@ruby-forum.com> Hi all, I'm seeing reproducable crashes in my wxruby application under circumstances: The application runs a WxGrid backed with my own subclass of TableBase. The application works fine. Trying to open a FileDialog I get a crash on Windows ONLY. There is no crash report, no segfault message, the application simply quits at the call to FileDialog#show_modal Here is something that I hope raises someone's suspicion: The crash happens ALWAYS after I scrolled through the WxGrid using a mouse wheel. I do not handle mousewheel events in the grid. The crash NEVER happens if I do not scroll through the grid before calling to open the FileDialog, everything works just fine. Looking at the windows event viewer, I find the following log: Faulting application name: ruby.exe, version: 1.8.7.0, time stamp: 0x4c698044 Faulting module name: ntdll.dll, version: 6.1.7601.17514, time stamp: 0x4ce7ba58 Exception code: 0xc0000374 Fault offset: 0x000ce653 Faulting process id: 0xb10 Faulting application start time: 0x01cc52945f2fb020 Faulting application path: C:\Ruby187\bin\ruby.exe Faulting module path: C:\Windows\SysWOW64\ntdll.dll I'm using wxruby 2.0.1 x86-mingw32 and wxwidgets 2.8.11 running on Windows 7 Ultimate x64 -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Thu Aug 4 08:17:22 2011 From: lists at ruby-forum.com (Tony Meier) Date: Thu, 04 Aug 2011 14:17:22 +0200 Subject: [wxruby-users] Reproducable FileDialog crashes on Win In-Reply-To: <243be0804da6eef0c16e7fadf97a2bd6@ruby-forum.com> References: <243be0804da6eef0c16e7fadf97a2bd6@ruby-forum.com> Message-ID: the really funky part is that I can replace the GridTableBase by a minimum/non functional implementation (see below) and the crash will still happen. However, when I use the built-in table (Grid#create_grid) the FileDialog will always open just fine. I also verified the crash with wxWidgets 2.8.12 ___ class ValueGrid < Wx::GridTableBase def initialize foo, data super() @rows = data.size end def get_number_cols 2 end def get_number_rows @rows end def get_value row, col "foobar" end def is_empty_cell row, col false end def get_attr row, col, kind Wx::GridCellAttr.new Wx::BLACK, Wx::WHITE, Wx::NULL_FONT, Wx::ALIGN_LEFT, Wx::ALIGN_TOP end end -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Thu Aug 4 13:00:32 2011 From: lists at ruby-forum.com (Rubyist Rohit) Date: Thu, 04 Aug 2011 19:00:32 +0200 Subject: [wxruby-users] How to integrate wxRuby to RubyMine? Message-ID: <270eedf74241d928eaea3d0d31314945@ruby-forum.com> I want to integrate wxRuby with RubyMine IDE so that I could write GUI apps. Please let me know how to integrate? -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Fri Aug 12 02:57:02 2011 From: lists at ruby-forum.com (Tony Meier) Date: Fri, 12 Aug 2011 08:57:02 +0200 Subject: [wxruby-users] Reproducable FileDialog crashes on Win In-Reply-To: <243be0804da6eef0c16e7fadf97a2bd6@ruby-forum.com> References: <243be0804da6eef0c16e7fadf97a2bd6@ruby-forum.com> Message-ID: <550018326e7b271022c76423f4924730@ruby-forum.com> Update: the crash seems to be connected to background threads. One background thread is listening on a serial interface (using hparra's serialport). A timer triggers a call to Thread.pass() every couple of milliseconds. When I kill the serial reception in the background, the crash seems to disappear. So the question becomes: how can I open a file dialog with a background thread running, that accesses the serial interface? Thanks, T -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Fri Aug 12 03:02:16 2011 From: lists at ruby-forum.com (Tony Meier) Date: Fri, 12 Aug 2011 09:02:16 +0200 Subject: [wxruby-users] problems installing with ruby 1.9 os x In-Reply-To: References: Message-ID: you can download the gem from here: http://rubyforge.org/frs/?group_id=35 there's more posts on this forum regarding the topic and how to get going with ruby, wxruby and OSX. Good luck T -- Posted via http://www.ruby-forum.com/. From mario at ruby-im.net Fri Aug 12 03:09:27 2011 From: mario at ruby-im.net (Mario Steele) Date: Fri, 12 Aug 2011 03:09:27 -0400 Subject: [wxruby-users] Reproducable FileDialog crashes on Win In-Reply-To: <550018326e7b271022c76423f4924730@ruby-forum.com> References: <243be0804da6eef0c16e7fadf97a2bd6@ruby-forum.com> <550018326e7b271022c76423f4924730@ruby-forum.com> Message-ID: Hello Tony, This sounds very much like a Re-entry kind of lockup, that occurs when trying to use more then one thread, in the Ruby Interpreter. And from the crashes, it very much looks like your running 1.8 line of the Ruby Interpreter. With that being the case, the 1.8 line, uses Software based Threads, or Faux threads. Meaning, that there is no secondary thread actually created on the Operating System, but instead is handled internally by the interpreter itself. We also call them Green Threads. Which is always an issue when it comes to Re-entry based code being executed. What is basically happening, is that when you run with Green Threads, the interpreter creates a stack for each green thread, that all runs on the Same Operating System thread. When the background thread is called, and some GUI Function is currently being ran (Such as a GUI Dialog, or population of a wxGrid), the program will crash, trying to handle this, cause a re-entry clause occurred when trying to execute the function, or rather, the method in question. The main thing that causes these re-entry errors, is trying to access a variable used between two different threads. Which is never a good thing. The only suggestion that I can make, is that when the GUI needs priority over the background worker threads, suspend the worker threads for the duration of the GUI execution. In other words, when showing a File Dialog, suspend the worker threads, show the dialog, once you get a response, and you can process the info in Ruby again, resume the Worker threads, then continue with processing the data. The other option, which isn't much of an option, is to use the Ruby 1.9 line of interpreter, as it uses Native OS Threads for Ruby Threads. But you will still need to be careful of worker threads, and GUI threads, just not as insanely. hth, Mario On Fri, Aug 12, 2011 at 2:57 AM, Tony Meier wrote: > Update: > > the crash seems to be connected to background threads. One background > thread is listening on a serial interface (using hparra's serialport). A > timer triggers a call to Thread.pass() every couple of milliseconds. > When I kill the serial reception in the background, the crash seems to > disappear. > > So the question becomes: how can I open a file dialog with a background > thread running, that accesses the serial interface? > > Thanks, > T > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > -- Mario Steele Commander 1st XO - Geo 99 XO - STO IFT Fleet http://www.trekfederation.com http://geo99.ruby-im.net -------------- next part -------------- An HTML attachment was scrubbed... URL: From wbparsons at cshore.com Sat Aug 13 16:33:14 2011 From: wbparsons at cshore.com (Will Parsons) Date: Sat, 13 Aug 2011 16:33:14 -0400 (EDT) Subject: [wxruby-users] help text display with wrapped text Message-ID: <20110813.163314.254659086.wbparsons@alum.mit.edu> Hi, I've been experimenting with wxruby for a bit, but am still a relative newcomer. I find myself wanting to do something that I think should be pretty staight- forward, but I can't quite figure out how do it from the documentation. I wish to create a simple help screen, i.e., a simple window that pops up in response to a menu selection or a hot-key and displays static text. As far as I can see, there doesn't seem to be a Dialog-derived class suitable for this. I did try using the MessageDialog class for this, but the problem is that the help text is rather long, so I want the user to be able to resize the help window as he (or she) wishes and have the displayed text wrap as appropriate to the size of the window. MessageDialog doesn't seem to allow this, so I get an oversized help window with each paragraph displayed as a single line. How can I achieve what I want? -- Will Parsons From wxruby at havic.be Tue Aug 23 14:44:30 2011 From: wxruby at havic.be (tom) Date: Tue, 23 Aug 2011 20:44:30 +0200 Subject: [wxruby-users] question concerning missing window id's after linux upgrade Message-ID: <4E53F50E.4000109@havic.be> Hi all, A while ago I wrote a mediacenter-app, which basically acts as a frontend to play mythtv-recordings, my entire dvd-library, and also does some other stuff, none of which really important. The playout-stuff is handled by mplayer, which connects to a Wx::Panel using the window-id (mplayer -wid etc). The window-id was hard to find - get_handle didn't appear to give me the right id (even though I've heard a wx-python guy say it works for him), so I just executed 'xwininfo -tree -name Media', ran some regexps on that, and found the id I was looking for. Everything worked! Skip to 2 days ago, when I finally upgraded my ubuntu from 8.04 to 10.04 (not because I want to stay on LTS, but I had issues getting wxruby to work on later versions). After some tweaks everything seems to work perfectly - except the tiny detail that I don't see anything being played by mplayer. I get sound, so mplayer is doing its best, but all I see is a red screen (red being the background-color for the panel mplayer should attach to, so it's not *that* abnormal). After some testing, I stumbled upon the following. On my old ubuntu (it's dual boot until everything works), running xwininfo gives me something like this: $ xwininfo -tree -name TestCase xwininfo: Window id: 0x32000a5 "TestCase" Root window id: 0x255 (the root window) (has no name) Parent window id: 0xc0011c (has no name) 2 children: 0x32000a8 (has no name): () 600x400+0+0 +3+797 1 child: 0x32000a9 (has no name): () 600x400+0+0 +3+797 1 child: 0x32000aa (has no name): () 600x400+0+0 +3+797 1 child: 0x32000ab (has no name): () 600x400+0+0 +3+797 1 child: 0x32000ac (has no name): () 600x400+0+0 +3+797 1 child: 0x32000ad (has no name): () 600x400+0+0 +3+797 1 child: 0x32000b5 (has no name): () 400x200+-1+-1 +2+796 1 child: 0x32000b6 (has no name): () 400x200+0+0 +2+796 0x32000a6 (has no name): () 1x1+-1+-1 +2+796 However, when I run the same command on the new ubuntu, with the exact same TestCase-app running, I get: $ xwininfo -tree -name TestCase xwininfo: Window id: 0x40000a8 "TestCase" Root window id: 0x102 (the root window) (has no name) Parent window id: 0x2a3bc3c (has no name) 1 child: 0x40000a9 (has no name): () 1x1+-1+-1 +0+50 The 'TestCase' application is a Wx::App in which a Wx::Frame is created, a Panel (p1) is created with said frame as parent, and another panel (p2) is created with p1 as parent. In the first xwininfo, I can attach mplayer to p2 using 0x32000b6, to p1 using 0x32000ad, and to the frame, using 0x32000a5. Why those and what all the other children etc. are? I have absolutely no idea. But it works. Using the second xwininfo, I only have 2 'viable' id's, the first one being of the frame (which works - I can attach mplayer to the frame and it will work, but that's not what I want to do), and the second one being the id my app tries to use, with aforementioned results. Long story short: something has changed in either wx or X/gnome/whatever, and I'm wondering whether there's another way to let mplayer connect with a Wx::Panel, or whether I should drop the upgrade-plan altogether and stick to 8.04? thanks in advance! tom From lists at ruby-forum.com Wed Aug 24 12:17:44 2011 From: lists at ruby-forum.com (T. N. T.) Date: Wed, 24 Aug 2011 18:17:44 +0200 Subject: [wxruby-users] wxruby is dead? In-Reply-To: <93bd3b430de4f0be66b323fd601da903@ruby-forum.com> References: <93bd3b430de4f0be66b323fd601da903@ruby-forum.com> Message-ID: <9bd3af3128268a9d7526b41da70bb7dc@ruby-forum.com> The answer seems to be yes. The 'current' wxruby for linux/GTK requires a libwx_gtk2u_media_2.8.so that isn't inluded in Ubuntu since years... FXRuby also doesn't work. -- Posted via http://www.ruby-forum.com/. From alex at pressure.to Thu Aug 25 07:01:11 2011 From: alex at pressure.to (Alex Fenton) Date: Thu, 25 Aug 2011 12:01:11 +0100 Subject: [wxruby-users] wxruby is dead? In-Reply-To: <9bd3af3128268a9d7526b41da70bb7dc@ruby-forum.com> References: <93bd3b430de4f0be66b323fd601da903@ruby-forum.com> <9bd3af3128268a9d7526b41da70bb7dc@ruby-forum.com> Message-ID: <4E562B77.40903@pressure.to> On 24/08/11 17:17, T. N. T. wrote: > The answer seems to be yes. The 'current' wxruby for linux/GTK requires > a libwx_gtk2u_media_2.8.so that isn't inluded in Ubuntu since years... No. There hasn't been a huge amount of new dev activity, but that package should work on 10.04 LTS Ubuntu, I think. Given the variation in distro structure, the expectation is that many people will need to compile for Linux anyway. a From oudeis at nodomain.invalid Thu Aug 25 17:56:52 2011 From: oudeis at nodomain.invalid (Will Parsons) Date: Thu, 25 Aug 2011 21:56:52 +0000 (UTC) Subject: [wxruby-users] compiling wxruby for FreeBSD Message-ID: The version of wxruby available in ports on my FreeBSD system is 0.6.0 so I'd like to compile a newer version. I've downloaded the 2.0.1 source tarball and tried to compile with the following result: % rake (in /home/william/src/wxruby-2.0.1) wx-config: not found rake aborted! wx-config error: () /home/william/src/wxruby-2.0.1/rakefile:70 (See full trace by running task with --trace) The INSTALL file is not helpful here. Is wx-config necessary? If so, why isn't it part of the package? If not, how do I proceed to compile? -- Will From dlbeswick at gmail.com Fri Aug 26 22:55:57 2011 From: dlbeswick at gmail.com (David Beswick) Date: Sat, 27 Aug 2011 12:55:57 +1000 Subject: [wxruby-users] compiling wxruby for FreeBSD In-Reply-To: References: Message-ID: Hi there Will, wx-config is part of wxwidgets, it sounds like you need to install that. That error message should be more helpful, shouldn't it? Try the wxwidgets-2.8 package. David On Fri, Aug 26, 2011 at 7:56 AM, Will Parsons wrote: > The version of wxruby available in ports on my FreeBSD system is 0.6.0 so > I'd > like to compile a newer version. I've downloaded the 2.0.1 source tarball > and > tried to compile with the following result: > > % rake > (in /home/william/src/wxruby-2.0.1) > wx-config: not found > rake aborted! > wx-config error: > () > /home/william/src/wxruby-2.0.1/rakefile:70 > (See full trace by running task with --trace) > > The INSTALL file is not helpful here. Is wx-config necessary? If so, why > isn't it part of the package? If not, how do I proceed to compile? > > -- > Will > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Wed Aug 31 07:54:42 2011 From: lists at ruby-forum.com (Grigory P.) Date: Wed, 31 Aug 2011 13:54:42 +0200 Subject: [wxruby-users] wxRuby 2.0.x on OS X In-Reply-To: <4DD564D2.1040403@pressure.to> References: <4DD564D2.1040403@pressure.to> Message-ID: <2584498e7d08c3714cb19e9d24c81988@ruby-forum.com> Hello. Any news on full support for OSX 10.6 and 10.7? "sudo gem install wxruby" is still installing 32-bit gem on both Snow Leopard and Lion and this is not very good for end-users :(. It seems that wxRuby is the only Ruby GUI available for OSX right now (no qtruby4 gem for OSX, ruby-gtk gem will not event compile on 10.6+, Tk is not included and very hard to install). -- Posted via http://www.ruby-forum.com/. From alex at pressure.to Wed Aug 31 09:53:14 2011 From: alex at pressure.to (Alex Fenton) Date: Wed, 31 Aug 2011 14:53:14 +0100 Subject: [wxruby-users] wxRuby 2.0.x on OS X In-Reply-To: <2584498e7d08c3714cb19e9d24c81988@ruby-forum.com> References: <4DD564D2.1040403@pressure.to> <2584498e7d08c3714cb19e9d24c81988@ruby-forum.com> Message-ID: <4E5E3CCA.4060401@pressure.to> On 31/08/11 12:54, Grigory P. wrote: > Any news on full support for OSX 10.6 and 10.7? "sudo gem install > wxruby" is still installing 32-bit gem on both Snow Leopard and Lion and > this is not very good for end-users The situation's roughly this: - wxRuby 2.0 targets wxWidgets 2.8 - wxWidgets 2.8 uses Carbon on OS X - OS X 10.6 and 10.7 are 64-bit based and Carbon is only 32-bit - wxWidget 3.0 will use Cocoa and 64-bit What would need to happen to improve support is for a next version of wxRuby (3.0?) to move to target wxWidgets 3.0, for which there is currently a pre-release version (2.9.2). But this is more work that anyone has taken on so far. > It seems that wxRuby is the only > Ruby GUI available for OSX right now (no qtruby4 gem for OSX, ruby-gtk > gem will not event compile on 10.6+, Tk is not included and very hard to > install). Blame Apple ;) How about MacRuby? alex