Ticket #1221 (new defect)
Opened 2 years ago
Interaction between file monitoring and listStore (probably a memory bug)
| Reported by: | guest | Owned by: | somebody |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | general (Gtk+, Glib) | Version: | 0.11.0 |
| Keywords: | Cc: | jeanphilippe.bernardy@… |
Description
In the following code, file monitoring stops working when the size of the list store is increased to a suitably big value.
This occurs with
- gtk2hs 0.12.0 release
- The Glorious Glasgow Haskell Compilation System, version 6.12.3
- Whatever version of gtk is in Ubuntu Natty
import System.GIO.File.File
import System.GIO.File.FileMonitor
import qualified Graphics.UI.Gtk as Gtk
main = do
Gtk.initGUI
let gfile = fileFromURI "file:///some file to monitor"
monitor <- fileMonitorFile gfile [] Nothing
Gtk.on monitor fileMonitorChanged $ \childFile otherFile evType -> do
putStrLn $ "Changed: " ++ show evType
model <- Gtk.listStoreNew [0..1000::Int]
--- file monitoring works works with 100, fails with 1000
filt <- Gtk.treeModelFilterNew model []
view <- Gtk.treeViewNewWithModel filt
Gtk.mainGUI
Note: See
TracTickets for help on using
tickets.