[Gambas-user] Blob type and segmentation error

Benoît Minisini gambas at ...1...
Thu Dec 12 11:05:36 CET 2013


Le 12/12/2013 10:56, bill-lancaster a écrit :
> 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
>

Sorry, but please send a true project and a MySQL database dump so that 
I can reproduce the bug in the same conditions.

Thanks!

-- 
Benoît Minisini




More information about the User mailing list