473,326 Members | 2,655 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

.NET/C#/MSIL Bug report

...or where should I post it if this is not the right place?

Goes like this: I've got a following method in a class DataSource:

public IHeightmapSampler GetSampler(ushort maxSmpX, ushort maxSmpY)

{

if (maxSmpX == data.GetLength(0) && maxSmpY == data.GetLength(1))

return new DirectSampler(data);

throw new Exception("Map size is different than heightmap data size

but no other than DirectSampler avaliable.");

}

When I do DataSource.GetSampler() some other random method get's called
(both std debug/release build, with many variations).

I was surprised when, while debugging, I stepped into
DataSource.GetSampler() call but finished in some other property get_xx
method :)

Afther many variations I returned the 'return null; ' line (that I removed
to avoid unreachable code warning) and surprise - it works properly.

public IHeightmapSampler GetSampler(ushort maxSmpX, ushort maxSmpY)

{

if (maxSmpX == data.GetLength(0) && maxSmpY == data.GetLength(1))

return new DirectSampler(data);

throw new Exception("Map size is different than heightmap data size

but no other than DirectSampler avaliable.");

return null;

}

I'm using VS.NET 2003.

By the way, that's the second bug of that sort, I had a method that refused
to execute (access violation) unless some random code was added to it.
(VS.NET) Can't find it now :(
Nov 15 '05 #1
3 1354
What kind of program is this by chance? Is it a DLL or maybe a service or
something unusual, or is it just a plain executeable?

There have been times I've debugged a DLL and without realizing it, I was
debugging a copy located somewhere else and not the one I was actually
building, so while trying to trace, there were times when the debugger would
seem to be at wrong lines of code, or it would jump over pieces of code when
in fact, it was because the debug info and source didn't match the binary
DLL that was being debugged.

Anyway, just a thought.

Pete

"Filip Strugar" <fi**@sezampro.yu> wrote in message
news:O4**************@tk2msftngp13.phx.gbl...
..or where should I post it if this is not the right place?

Goes like this: I've got a following method in a class DataSource:

public IHeightmapSampler GetSampler(ushort maxSmpX, ushort maxSmpY)

{

if (maxSmpX == data.GetLength(0) && maxSmpY == data.GetLength(1))

return new DirectSampler(data);

throw new Exception("Map size is different than heightmap data size

but no other than DirectSampler avaliable.");

}

When I do DataSource.GetSampler() some other random method get's called
(both std debug/release build, with many variations).

I was surprised when, while debugging, I stepped into
DataSource.GetSampler() call but finished in some other property get_xx
method :)

Afther many variations I returned the 'return null; ' line (that I removed
to avoid unreachable code warning) and surprise - it works properly.

public IHeightmapSampler GetSampler(ushort maxSmpX, ushort maxSmpY)

{

if (maxSmpX == data.GetLength(0) && maxSmpY == data.GetLength(1))

return new DirectSampler(data);

throw new Exception("Map size is different than heightmap data size

but no other than DirectSampler avaliable.");

return null;

}

I'm using VS.NET 2003.

By the way, that's the second bug of that sort, I had a method that refused to execute (access violation) unless some random code was added to it.
(VS.NET) Can't find it now :(

Nov 15 '05 #2

"Filip Strugar" <fi**@sezampro.yu> wrote in message
news:O4**************@tk2msftngp13.phx.gbl...
..or where should I post it if this is not the right place?

Goes like this: I've got a following method in a class DataSource:


My working assumption is that you are simply confused.

You would need to post a working sample of your problem for any other
conclusion to be reasonable.

David
Nov 15 '05 #3
I think you're right.
Now I can't reproduce the problem again. Sorry... :)

"David Browne" <davidbaxterbrowne no potted me**@hotmail.com> wrote in
message news:u7**************@tk2msftngp13.phx.gbl...

"Filip Strugar" <fi**@sezampro.yu> wrote in message
news:O4**************@tk2msftngp13.phx.gbl...
..or where should I post it if this is not the right place?

Goes like this: I've got a following method in a class DataSource:


My working assumption is that you are simply confused.

You would need to post a working sample of your problem for any other
conclusion to be reasonable.

David

Nov 15 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Raymond Lewallen | last post by:
Is there some article out there that helps in reading MSIL? I've been looking but can't find anything, and I'm probably just looking in the wrong spots for the wrong keywords. I understand mov,...
7
by: Raymond Lewallen | last post by:
Microsoft, Can I make a request for a newsgroup specific to MSIL? I have taken great interest in MSIL and have done a lot of reading into MSIL, and written, compiled and tested with success a...
6
by: TrickyDicky | last post by:
Hi all, I'm just starting to experiment with MSIL but am getting confused about c# and MSIL integration. I understand that c# is compiled into MSIL before it is JIT'ed and then executed. I...
6
by: Pawel | last post by:
Ary you know tools to convert MSIL code (Assembly) to Win32 (not Just In Time)?
7
by: carl.manaster | last post by:
Hi, I'd like to take a string containing MSIL code, assemble it, execute it, and receive the result all from my running C# application. So far I've managed to manually create some MSIL code...
4
by: James dean | last post by:
My understanding is the MSIL runs on the CLR and the CLR is basically the JIT compiler plus Garbage collection. This part "MSIL runs on the CLR" is a bit vague to me can anyone give me a clearer...
3
by: NigelW | last post by:
Clarification needed please. If I compile a C++ program with the /clr option inpsection of the resulting assembly with ILDASM shows MSIL even for methods in classes for which I have not...
1
by: John Doe | last post by:
Hi all, I have a lot of confusion about what this runtime environment is. When I write an application with unmanaged code and unmanaged data, can I compile it to the MSIL, or it will compile...
3
by: Mark Fox | last post by:
Hello, I have read a lot about how the .NET Framework uses MSIL as its intermediate language. If I have a project in C# in VS.NET 2003, how do I get the MSIL for it so I could look at it? ...
10
by: Number 11950 - GPEMC! Replace number with 11950 | last post by:
Hi all, Playing VS2005 was more fun than Doom III, and I do enjoy my games. Anyway, it's back to work for me and I'm bogged down in my familiar VB6 stomping grounds because I don't want my...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.