Hello all,

Damn, my program crashed Gambas this way :

1) Run the program
2) Plug in a usb drive
3) Click the mount button, mounts OK
4) Click the unmount button
Program crashes Aborted(6)
Console shows realloc error invalid old size

I'm writing a Udisks2 module that communicates with UDisks2 over dbus. It gathers drive info on existing drives and receives notifications when a new drive is plugged in, usb stick etc.
Two problems:
1) The crash above. Note that unmount works if the usb drive is already plugged in. Careful: the program defaults to unmounting /dev/sdb1. Make sure you use the right drive id. 2) The program intially sends some basic drive info to debug output. First, it prints the info item by item with no problems. Then it tries to print the same items in one print statement. Some of the output is garbage. What's worst, I've tried saving each info item to separate variables. If I step through the assignments one item at a time, the individual assignment is at first correct. However, after the next item is assigned, the previous item's value also changes. This looks like a buffer overrun or a stack overflow.

Attachment: gbUDisk2-0.0.1-crash-170806-114746.tar.bz2
Description: application/bzip

Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Gambas-user mailing list

Reply via email to