I have no idea what to call this.... Error Initializing perhaps?

Developer
May 28, 2011 at 1:57 AM
Edited May 28, 2011 at 1:58 AM

For some reason, if I try to pass a variable that's being created in the calling of a method (aka. aMethod(new aType(int a, int b)); ), The first variable seems to be getting lost. this means that instead of calling:

s.DrawCircleOutline(new Vec2(50, 100), 20, (uint)30);

 

i have to do this:


Vec2 v = new Vec2(50, 100);
s.DrawCircleOutline(v, 20, (uint)30);

 

Now, as you can imagine, this get's rather annoying. Any ideas why it occurs?

 

btw, the constructor for my Vec2 class:

 

public Vec2(int x, int y)
{
this.X = x;
this.Y = y;
}

 

So I somehow doubt that's the problem XD

 

As a note, this problem didn't occur until the double rounding issue was fixed. (Changeset 78219)

Coordinator
May 28, 2011 at 9:01 PM

I have been tried following code, and could not find any issue, except a VS crash in new statment internal on shift f11.

 

class f {
public void s(Vec2 v, int i, uint u) { int d = v.X; int k = v.Y; long f = v.X; long fd = v.Y; }

}


class Vec2 { public int X; public int Y;
public Vec2(int x, int y) { this.X = x; this.Y = y; } }

 protected override void Run() { f k = new f(); k.s(new Vec2(2, 3), 4, (uint)5);}

Developer
May 28, 2011 at 9:27 PM
Edited May 28, 2011 at 9:38 PM

sorry, I should have stated this in the first post (i had thought i had changed it back to a class), but in fact, Vec2 is a struct not a class. I'm working to create a small examle kernel that demonstrates the problem (currently figuring out how to write to console; That's what I get for going directly to gui XD)

 

Btw, I build with debug off, because I'm debugging on a different machine than I'm building on.

 

And, created. (it's at http://iab-md.co.cc/Cosmos/CrashTest.zip) I'll remove that link when you have it.

Coordinator
May 29, 2011 at 5:53 PM

ok, for me are both situtations with and without inline new wrong. I will check it if i have time.

Coordinator
May 30, 2011 at 6:18 AM
Blah: what cosmos version are you using?

Trivalik: only thing i could think of going wrong, is that some instruction is pushing info in the wrong error (but that would just present with wrong field values)...

On Sun, May 29, 2011 at 7:53 PM, Trivalik <notifications@codeplex.com> wrote:

From: Trivalik

ok, for me are both situtations with and without inline new wrong. I will check it if i have time.

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Developer
May 30, 2011 at 2:30 PM

I'm working with the trunk version.

Coordinator
May 30, 2011 at 3:11 PM
Are you sure installing the trunk version goes ok? EACH time you change something, you need to rerun install.bat (with some exception, but complicated to explain).

On Mon, May 30, 2011 at 4:30 PM, blah38621 <notifications@codeplex.com> wrote:

From: blah38621

I'm working with the trunk version.

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Developer
May 30, 2011 at 3:21 PM

Yes, that I am sure of, as I've not made any changes to anything other than the guess kernel, which I'm using as the base project... Need to fix that at some point XD. And yes, I do understand the few exceptions, and that can be done by adding a reference to the local copy of a project (it must be one that il2cpu doesn't directly depend on, because it loads those when it starts), to the .cosmos project. This causes it to be loaded from there, rather than the installed copy, meaning that it uses the modified copy when building your os. (aka. yes, i do understand how the dependency searching works :P, though I agree, it is a difficult thing to explain (and I've probably failed miserably here))