[Gambas-user] Weird Timer Problem
Gareth Bult
gareth at ...1689...
Sun Jan 20 20:11:55 CET 2008
Ok, I finally managed to reproduce my problem in a code snippet.
Essentially this is a new project, stock V2 gambas, with a blank form and one element, a timer called "killer".
If I run the code, it works fine.
If I insert the killer.stop and killer.start lines, the program crashes with a signal #11 after about 5 to 10 iterations.
Help!
----
' Gambas class file
PUBLIC EXTERN virConnectOpenReadOnly(host AS String) AS Pointer IN "libvirt"
PUBLIC EXTERN virDomainLookupByID(con AS Pointer, id AS Integer) AS Pointer IN "libvirt"
PUBLIC EXTERN virDomainGetInfo(dom AS Pointer, inf AS Pointer) AS Integer IN "libvirt"
PUBLIC SUB killer_Timer()
'killer.Stop() 'Adding these lines causes Sig#11 after 5-10 iterations
PRINT "Help me!"
DoIt()
'killer.Start() 'Adding these lines causes Sig#11 after 5-1- iterations
END
PUBLIC SUB DoIt()
DIM node AS Pointer
DIM domain AS Pointer
DIM info AS Pointer = Alloc(24)
node = virConnectOpenReadOnly("xen+tls://nodeb/default")
domain = virDomainLookupByID(node, 0)
virDomainGetInfo(domain, info)
END
More information about the User
mailing list