[Gambas-user] Blob type and segmentation error

bill-lancaster bill-lancaster at ...2231...
Thu Dec 12 10:56:02 CET 2013


Thank you Tobias and sorry Benoit.

Here is a small programme:-


Public hConn As New Connection
Public hResult As Result

Public Sub _new()
     With hConn
          .Type = "MySQL"
          .Host = "localhost"
          .Login = "root"  
          .Port = "3306"    
          .Name = "xxx"
          .Password = "yyy" 
          .Open()            
     End With
     hResult = hConn.Find("maildata", "DeletedFlag IS NOT TRUE AND Type =
'Received' ORDER BY Date DESC")
     hResult.MoveFirst
End

Public Sub btnNext_Click()
Dim bTemp As Blob
     TextBox1.Text = hResult!Date  
     TextBox2.Text = hResult!Address 
     TextBox3.Text = hResult!Subject    
     bTemp = hResult!MsgBlob
     Print bTemp.Length
     CheckAttachments(bTemp)
     hResult.MoveNext
End

Private Function CheckAttachments(sBody As Blob)
     File.Save("~/aaa", hResult!MsgBlob)
End


This gives a segmenation error, in this case when bTemp.Length = 1246339
Other records with small values of bTemp don't cause a problem.

Gambas 3.5

[System]
OperatingSystem=Linux
Kernel=3.8.0-32-generic
Architecture=x86_64
Distribution=Ubuntu 13.04
Desktop=KDE4
Theme=Oxygen
Language=en_US.UTF-8
Memory=3821M
[Libraries]
Cairo=libcairo.so.2.11200.14
Curl=libcurl.so.4.3.0
DBus=libdbus-1.so.3.7.2
GStreamer=libgstreamer-0.10.so.0.30.0
GStreamer=libgstreamer-1.0.so.0.6.0
GTK+=libgtk-x11-2.0.so.0.2400.17
OpenGL=libGL.so.1.2.0
Poppler=libpoppler.so.28.0.0
Qt4=libQtCore.so.4.8.4
SDL=libSDL-1.2.so.0.11.4



--
View this message in context: http://gambas.8142.n7.nabble.com/Blob-type-and-segmentation-error-tp44631p44641.html
Sent from the gambas-user mailing list archive at Nabble.com.




More information about the User mailing list