Mono ( 2.4.2.3 ) bug? (this works OK on .net)

View: New views
10 Messages — Rating Filter:   Alert me  

Mono ( 2.4.2.3 ) bug? (this works OK on .net)

by psi-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


import System
struct s:
        pass
class c():
        public l as (s)
c1=c()
c1.l=(s(),)


/*
# Output @ Sat Oct 17 20:58:18 BST 2009
System.OutOfMemoryException: Out of memory
  at (wrapper managed-to-native)
object:__icall_wrapper_mono_array_new_specific (intptr,int)
  at Intersect3Module.Main (System.String[] argv) [0x00000]
  at (wrapper managed-to-native)
System.Reflection.MonoMethod:InternalInvoke (object,object
[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj,
BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object
[] parameters, System.Globalization.CultureInfo culture) [0x00000]
Command exited with non-zero status 127
# Used (interp) :  0:00.61 real,0.53 user,0.02 sys
*/



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Boo Programming Language" group.
To post to this group, send email to boolang@...
To unsubscribe from this group, send email to boolang+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/boolang?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Mono ( 2.4.2.3 ) bug? (this works OK on .net)

by Cedric Vivier :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hey!

Works on mono trunk.
Does it break too if the struct has at least one field?

Anyways I guess we should at least issue a warning about zero-size
structs, if not an error directly.

Cheers,


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Boo Programming Language" group.
To post to this group, send email to boolang@...
To unsubscribe from this group, send email to boolang+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/boolang?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Mono ( 2.4.2.3 ) bug? (this works OK on .net)

by psi-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


> Hey!
>
> Works on mono trunk.
> Does it break too if the struct has at least one field?

yes, see below;

import System
import System.Collections
import System.Collections.Generic

class vec3f(ValueType):
        X as double
        Y as double
        Z as double

class points():
        [Property(locations)]
        _locs as (vec3f)

p2=points(locations:(vec3f(),))
print p2

/*
# Output @ Mon Oct 19 14:12:12 BST 2009
System.OutOfMemoryException: Out of memory
  at (wrapper managed-to-native)
object:__icall_wrapper_mono_array_new_specific (intptr,int)
  at Intersect2Module.Main (System.String[] argv) [0x00000]
  at (wrapper managed-to-native)
System.Reflection.MonoMethod:InternalInvoke (object,object
[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj,
BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object
[] parameters, System.Globalization.CultureInfo culture) [0x00000]
Command exited with non-zero status 127
# Used (interp) :  0:01.04 real,0.78 user,0.03 sys
*/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Boo Programming Language" group.
To post to this group, send email to boolang@...
To unsubscribe from this group, send email to boolang+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/boolang?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Mono ( 2.4.2.3 ) bug? (this works OK on .net)

by psi-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


im now guessing there's something wrong with my Mono install

it works compiled but range is returning the wrong numbers!!


import System
import System.Collections
import System.Collections.Generic

class vec3f(ValueType):
        X as double
        Y as double
        Z as double

class points():
        [Property(locations)]
        _locs as (vec3f)

p2=points(locations:(vec3f(),vec3f(),vec3f()))
print p2

for i in range(0,len(p2.locations)):
        print i

/*
# Output @ Mon Oct 19 14:16:25 BST 2009
points
1
2
3
# Used (compiled) :  0:00.03 real,0.03 user,0.00 sys
*/


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Boo Programming Language" group.
To post to this group, send email to boolang@...
To unsubscribe from this group, send email to boolang+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/boolang?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Mono ( 2.4.2.3 ) bug? (this works OK on .net)

by psi-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


OK i've now tried a lot of old code, that all still works, and i've
found the problem is reproducible on another Linux machine with a
fresh install of Mono 2.4.2.3 ( the newest i can find in repositories,
i really don't want to have t build it, it sounds like it can be
tricky.) so its probably a real mono bug.

might have something to do with this bug, fixed last month, but not
really quite right; https://bugzilla.novell.com/show_bug.cgi?id=485446

can anyone let me if its working for them on Mono 2.4.x?, i'm a bit
stuck at the moment.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Boo Programming Language" group.
To post to this group, send email to boolang@...
To unsubscribe from this group, send email to boolang+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/boolang?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Mono ( 2.4.2.3 ) bug? (this works OK on .net)

by Cedric Vivier-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



On Oct 19, 9:21 pm, psi <simon.pl...@...> wrote:
> it works compiled but range is returning the wrong numbers!!

> p2=points(locations:(vec3f(),vec3f(),vec3f()))
> print p2
>
> for i in range(0,len(p2.locations)):
>         print i
>
> /*
> # Output @ Mon Oct 19 14:16:25 BST 2009
> points
> 1
> 2
> 3


Hmm... I might overlook something but the results look fine to me??


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Boo Programming Language" group.
To post to this group, send email to boolang@...
To unsubscribe from this group, send email to boolang+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/boolang?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Mono ( 2.4.2.3 ) bug? (this works OK on .net)

by Rodrigo B. de Oliveira :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Tue, Oct 20, 2009 at 3:39 AM, Cedric Vivier <neonux@...> wrote:
>
>
> On Oct 19, 9:21 pm, psi <simon.pl...@...> wrote:
>>
>> for i in range(0,len(p2.locations)):
>>         print i
>>

range(0, ...) should start at 0 but it outputs

>> 1
>> 2
>> 3

that's really odd indeed.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Boo Programming Language" group.
To post to this group, send email to boolang@...
To unsubscribe from this group, send email to boolang+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/boolang?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Mono ( 2.4.2.3 ) bug? (this works OK on .net)

by Cedric Vivier-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Oct 20, 7:35 pm, "Rodrigo B. de Oliveira" <rodrigobam...@...>
wrote:

> On Tue, Oct 20, 2009 at 3:39 AM, Cedric Vivier <neo...@...> wrote:
> > On Oct 19, 9:21 pm, psi <simon.pl...@...> wrote:
>
> >> for i in range(0,len(p2.locations)):
> >>         print i
>
> range(0, ...) should start at 0 but it outputs
>
> >> 1
> >> 2
> >> 3
>
> that's really odd indeed.


Hmm yeah didnt catch that heh :)
Well FWIW I confirm testcase above also works on Mono trunk.


Cheers,

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Boo Programming Language" group.
To post to this group, send email to boolang@...
To unsubscribe from this group, send email to boolang+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/boolang?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Mono ( 2.4.2.3 ) bug? (this works OK on .net)

by Cedric Vivier-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Oct 21, 4:01 pm, Cedric Vivier <neo...@...> wrote:
> Well FWIW I confirm testcase above also works on Mono trunk.

By that, I mean it correctly outputs 0,1,2

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Boo Programming Language" group.
To post to this group, send email to boolang@...
To unsubscribe from this group, send email to boolang+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/boolang?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Mono ( 2.4.2.3 ) bug? (this works OK on .net)

by psi-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


thanks for your efforts, when i understand this i'll post.

simon

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Boo Programming Language" group.
To post to this group, send email to boolang@...
To unsubscribe from this group, send email to boolang+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/boolang?hl=en
-~----------~----~----~----~------~----~------~--~---