Here is a link to the code. The file you want is the Test.bas
I am using the latest Release (0.20.0b) on Windows XP SP3.
EDIT:
Link Removed. Se voodooattack's post for condensed code.
Compiler Segfaults when trying to compile
Compiler Segfaults when trying to compile
Last edited by Imortis on Aug 20, 2008 23:10, edited 1 time in total.
-
- Site Admin
- Posts: 6323
- Joined: Jul 05, 2005 17:32
- Location: Manchester, Lancs
I can't reproduce the segfault. I just get:
Can you be more specific? What command line did you use? What error do you get?
Code: Select all
Test.bas(21) error 68: Array access, index expected, before ')' in 'HandleObjectArray(tester)'
I'm sorry. I sent the wrong version of the file.
Line 21 should look like this:
Also, I'm using -s gui on the command line. That's it.
Line 21 should look like this:
Code: Select all
handleObjectArray(tester())
-
- Posts: 605
- Joined: Feb 18, 2006 13:30
- Location: Alexandria / Egypt
- Contact:
This is caused by your UDT having a destructor and no default constructor.
A temporary solution is to add an empty constructor to your type.
this is caused by rtlArrayClear, in rtl-array.bas
the first IF statement tries to access a null pointer.. I thought about fixing it by adding a local null pointer check at this point, but i'm not really sure if that is the way to handle it correctly.
but I managed to isolate the problem into a test case:
the problem doesn't occur with dynamic arrays though.
A temporary solution is to add an empty constructor to your type.
this is caused by rtlArrayClear, in rtl-array.bas
Code: Select all
if( dtor = NULL ) then
...
else
...
if( symbGetProcMode( ctor ) <> FB_FUNCMODE_CDECL ) then
errReport( FB_ERRMSG_REDIMCTORMUSTBECDEL )
end if
if( symbGetProcMode( dtor ) <> FB_FUNCMODE_CDECL ) then
errReport( FB_ERRMSG_REDIMCTORMUSTBECDEL )
end if
...
end if
but I managed to isolate the problem into a test case:
Code: Select all
type foo
as integer dummy
' declare constructor
declare destructor
end type
' constructor foo()
' ''
' end constructor
destructor foo()
''
end destructor
dim x(1) as foo