OK, I managed to isolate this problem!
This will crash Gambas 3 rev 3452 @ Ubuntu 10.10 64bit.


Public Sub Form_Open()
Dim hFile As File
Dim sho As Short
Dim sStr As String = "" '"abc" Crash only occurs if string is null.

hFile = Open "/tmp/test" For Create
Write #hFile, 123 As Short
Write #hFile, sStr As String
Close #hFile

hFile = Open "/tmp/test" For Read
sho = Read #hFile As Short
sStr = Read #hFile As String
Close #hFile

End

Ready made project is attached.

Jussi




On Wed, Jan 12, 2011 at 23:06, Jussi Lahtinen <jussi.lahti...@gmail.com>wrote:

> Forgot... Gambas 3 rev 3452 @ Ubuntu 10.10 64bit
>
> Jussi
>
>
>
> On Wed, Jan 12, 2011 at 23:05, Jussi Lahtinen <jussi.lahti...@gmail.com>wrote:
>
>> These valgrind logs are taken also without compiler optimizations.
>>
>> Jussi
>>
>>
>>
>>
>> On Sat, Jan 8, 2011 at 22:33, Jussi Lahtinen <jussi.lahti...@gmail.com>wrote:
>>
>>> With compiler optimizations removed:
>>>
>>>
>>> Starting program: /usr/local/bin/gbx3 -p
>>> [Thread debugging using libthread_db enabled]
>>> [New Thread 0x7fffef2ba700 (LWP 19548)]
>>>
>>> warning: unable to load Qt translation: en_GB.utf8
>>>
>>> Program received signal SIGSEGV, Segmentation fault.
>>> 0x000000000042420f in SUBR_leave (nparam=2) at gbx_subr.c:42
>>> 42      BORROW(RP);
>>> (gdb) f 1
>>> #1  0x000000000042600b in SUBR_read (code=32000) at gbx_subr_file.c:441
>>> 441        SUBR_LEAVE();
>>> (gdb) bt
>>> #0  0x000000000042420f in SUBR_leave (nparam=2) at gbx_subr.c:42
>>> #1  0x000000000042600b in SUBR_read (code=32000) at gbx_subr_file.c:441
>>> #2  0x00000000004513f7 in EXEC_loop () at gbx_exec_loop.c:480
>>> #3  0x000000000040f69e in EXEC_function_loop () at gbx_exec.c:861
>>> #4  0x000000000040f601 in EXEC_function_real () at gbx_exec.c:848
>>> #5  0x0000000000411f63 in EXEC_public_desc (class=0x731148, object=0x0,
>>>     desc=0x8faae8, nparam=0) at gbx_exec.c:1497
>>> #6  0x000000000043d428 in main (argc=1, argv=0x7fffffffe338) at gbx.c:362
>>>
>>> Jussi
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Thu, Jan 6, 2011 at 17:43, Jussi Lahtinen 
>>> <jussi.lahti...@gmail.com>wrote:
>>>
>>>> Hi!
>>>> I cannot really isolate my problem, but in this case it happens when
>>>> loading string data from file to object
>>>> (something like "someobject.sStr = Read #hFile As String").
>>>>
>>>> Gambas 3 rev 3447 @ Ubuntu 10.10 64bit
>>>>
>>>> $ gbc3 -agpmt
>>>> OK
>>>> $ gdb gbx3
>>>> GNU gdb (GDB) 7.2-ubuntu
>>>> Copyright (C) 2010 Free Software Foundation, Inc.
>>>> License GPLv3+: GNU GPL version 3 or later <
>>>> http://gnu.org/licenses/gpl.html>
>>>> This is free software: you are free to change and redistribute it.
>>>> There is NO WARRANTY, to the extent permitted by law.  Type "show
>>>> copying"
>>>> and "show warranty" for details.
>>>> This GDB was configured as "x86_64-linux-gnu".
>>>> For bug reporting instructions, please see:
>>>> <http://www.gnu.org/software/gdb/bugs/>...
>>>> Reading symbols from /usr/local/bin/gbx3...done.
>>>> (gdb) set args -p
>>>> (gdb) run
>>>> Starting program: /usr/local/bin/gbx3 -p
>>>> [Thread debugging using libthread_db enabled]
>>>> [New Thread 0x7fffef2ba700 (LWP 3790)]
>>>> warning: unable to load Qt translation: en_GB.utf8
>>>>
>>>> Program received signal SIGSEGV, Segmentation fault.
>>>> 0x0000000000414b91 in SUBR_leave (nparam=2) at gbx_subr.c:42
>>>> 42      BORROW(RP);
>>>> (gdb) bt
>>>> #0  0x0000000000414b91 in SUBR_leave (nparam=2) at gbx_subr.c:42
>>>> #1  0x0000000000430132 in EXEC_loop () at gbx_exec_loop.c:480
>>>> #2  0x0000000000409a75 in EXEC_function_loop () at gbx_exec.c:861
>>>> #3  0x000000000040a4c5 in EXEC_function_real () at gbx_exec.c:848
>>>> #4  0x00000000004227e5 in main (argc=1, argv=<value optimised out>)
>>>>     at gbx.c:362
>>>>
>>>> (gdb) f 1
>>>> #1  0x0000000000430132 in EXEC_loop () at gbx_exec_loop.c:480
>>>> 480      (*(EXEC_FUNC_CODE)SubrTable[(code >> 8) - 0x28])(code);
>>>>
>>>>
>>>> Also see attached valgrind log.
>>>>
>>>> Jussi
>>>>
>>>>
>>>
>>
>

Attachment: CrashBug-0.0.1.tar.gz
Description: GNU Zip compressed data

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to