Upcoming Games

(UTC times)


Full list
Add a game

Upcoming Events

No events to display

Access violation in Wimbledon sim

You are here: Home > Forum > Simulations > Timetables > Wimbledon > Access violation in Wimbledon sim

Page 1 of 2

Access violation in Wimbledon sim 11/03/2015 at 17:13 #69952
northroad
Avatar
872 posts
Still plodding on with a Wimbledon timetable and occassionally getting an access violation message every now and then. I have the latest version of the Sim downloaded version 1.1 and am using loader version 4.3.2

This one reads "Access violation at address 00525343 in module 'SimSigLoader.exe' Read of address 00000020"

Any clues as to what this means. Is it me or is it the sim.

Geoff

Log in to reply
Access violation in Wimbledon sim 11/03/2015 at 19:46 #69954
clive
Avatar
2789 posts
It's the loader. I'll investigate when I have a moment.
Log in to reply
Access violation in Wimbledon sim 11/03/2015 at 22:48 #69956
clive
Avatar
2789 posts
" said:

This one reads "Access violation at address 00525343 in module 'SimSigLoader.exe' Read of address 00000020"
Can you please check the exact numbers in that message, because they aren't consistent with the loader code.

Log in to reply
Access violation in Wimbledon sim 12/03/2015 at 08:13 #69960
northroad
Avatar
872 posts
Clive,
The message was cut and paste from what was on the screen so it must be correct. As I said I have had access violation messages crop up previously whilst inputting details for this timetable that I am writing. I now have over a thousand movements inputted.
I don't think it right to just keep on accepting and ignoring the messages I am getting without having someone explore the reasons why, so when it happens again I will cut and paste that one and post in the forum for someone to look at.

Geoff

Log in to reply
Access violation in Wimbledon sim 12/03/2015 at 10:11 #69961
postal
Avatar
5264 posts
" said:
Clive,
The message was cut and paste from what was on the screen so it must be correct. As I said I have had access violation messages crop up previously whilst inputting details for this timetable that I am writing. I now have over a thousand movements inputted.
I don't think it right to just keep on accepting and ignoring the messages I am getting without having someone explore the reasons why, so when it happens again I will cut and paste that one and post in the forum for someone to look at.

Geoff
Clive

Is there some sort of underlying problem with the loader that is causing it to do things you are not expecting? In Mantis bug #12501 I did a cut and paste from another access violation message which again surprised you to the extent that you wrote "Curious: 00442C76 isn't a valid address in either 4.3 or 4.3.2" so it does appear to be something of a generic nature.

“In life, there is always someone out there, who won’t like you, for whatever reason, don’t let the insecurities in their lives affect yours.” – Rashida Rowe
Log in to reply
Access violation in Wimbledon sim 12/03/2015 at 10:51 #69962
Danny252
Avatar
1461 posts
What seems inconsistent, Clive? 0x00525343 is a valid instruction in V4.3.2 of SimsigLoader.exe. The attempt to access memory address 0x00000020 looks awfully like a memory pointer isn't being properly initialised (or is being unexpectedly overwritten).

(At that, 0x00442C76 also exists in V4.3.2)

Edit: I wonder if your debugger is showing addresses beginning at the same offset as mine is (and presumably the error messages)? The first instruction in mine is at address 0x00401000.

Last edited: 12/03/2015 at 10:58 by Danny252
Log in to reply
Access violation in Wimbledon sim 12/03/2015 at 17:32 #69980
northroad
Avatar
872 posts
How about this one Clive....just appeared on the screen......

"Access violation at address 400068A0 in module 'rtl60bpl'. Write of address 40341DFA"

This is getting a tad annoying having these messages keeping appearing on the screen. Perhaps I should forget about ever writing a timetable, but considering the amount of time I have put in on this one it does seems a terrible waste if I do. Did the problems/messages with Feltham that I reported get sorted and will the loader be updated sometime soon with the fixes for those messages.

Geoff.

Last edited: 12/03/2015 at 17:33 by northroad
Log in to reply
Access violation in Wimbledon sim 12/03/2015 at 21:14 #69990
clive
Avatar
2789 posts
" said:

Is there some sort of underlying problem with the loader that is causing it to do things you are not expecting?
No, but there may be a specific problem.

Now you've asked that you're going to get a short lecture on debugging.

Let's start with something simple. Take the error you mentioned in Mantis 12501:

Quote:
Exception in OneSecondLo (EAccessViolation: Access violation at address 00442C76 in module 'SimSigLoader.exe'. Read of address 00000074)
Peter then reported that the address in Loader 4.3 was 0043BA60. I went to my disassembly of Loader 4.3 and found the instruction:

0043BA60 cmp dword ptr [eax+74],0

Note the +74 there; that matches the address 00000074 in the error message. Immediately I suspect a null pointer (any time I see a read of an address just above zero, I suspect a null pointer). I then looked at the source code corresponding to this instruction and I found that we're in the middle of the ARS logic and there's an object that should contain either a route or a berth, so the code assumes that if the route is a null pointer the berth is valid. But what we're finding here is that the berth is a null pointer as well.

This is consistent with the reported symptoms (e.g. stepping causes the problem, interposing doesn't; ARS stops working after the error). Since I'm not familiar with the ARS code, I've left it to Geoff to fix; presumably he'll get round to it at some point.

Now let's go back to the original address 00442C76 in Loader 4.3.2. When I look at the disassembly, I find:


00442C72 call 00442B34
00442C77 mov dword ptr [ebx+8],esi


Not only is 00442C76 not an instruction, but rather most of the way through one, but the code in question is in something unrelated to ARS or berths. So you can see why I'm skeptical about the quoted address. There are three possibilities I can think of.

1: The address has been reported wrongly. That's certainly happened in the past: I had a report of a problem at address (let's say) 00456789 with a read of address 00000048. When I look, that's not a valid instruction address. But if I look at address 00456987 instead, I find an instruction with a +48 in it, in the middle of code related to the reported symptoms. Therefore I assumed the original reporter had given the wrong address.

2: The Delphi error handling mechanism is giving the wrong address sometimes. If so, I don't know why, because it very often gives the right address.

3: The address is correct because the underlying problem caused a jump to an invalid address (e.g. by corrupting the stack) which happened to decode as an instruction that caused this symptom. If this is so, then looking at the code isn't going to point out the problem. What I need is instructions on how to consistently recreate the problem. I can then investigate the related code, run things under a debugger, and so on.

The same is the case with this latest problem.

If you have any suggestions as to how I proceed next, I'd appreciate them.

Log in to reply
The following user said thank you: postal
Access violation in Wimbledon sim 12/03/2015 at 21:15 #69991
clive
Avatar
2789 posts
" said:
Clive,
The message was cut and paste from what was on the screen so it must be correct.
See my comments in my previous posting.

Quote:

As I said I have had access violation messages crop up previously whilst inputting details for this timetable that I am writing. I now have over a thousand movements inputted.
I don't think it right to just keep on accepting and ignoring the messages I am getting without having someone explore the reasons why, so when it happens again I will cut and paste that one and post in the forum for someone to look at.
I'm always happy to see such reports (well, not precisely happy because they tend to indicate Geoff or I have broken something) and I do attempt to investigate them. But unless this one can be made reproducible, I don't know where to go from here.

Log in to reply
Access violation in Wimbledon sim 12/03/2015 at 21:22 #69992
clive
Avatar
2789 posts
" said:
What seems inconsistent, Clive? 0x00525343 is a valid instruction in V4.3.2 of SimsigLoader.exe.
Not according to my disassembly. 00525341 and 00525344 are valid instructions.

Can you email me a disassembly of the relevant function according to your debugger?

Quote:

The attempt to access memory address 0x00000020 looks awfully like a memory pointer isn't being properly initialised (or is being unexpectedly overwritten).
It looks to me like a null pointer dereference with an offset of 0x20, which isn't totally surprising.

Quote:

(At that, 0x00442C76 also exists in V4.3.2)
Same question.

Quote:

Edit: I wonder if your debugger is showing addresses beginning at the same offset as mine is (and presumably the error messages)? The first instruction in mine is at address 0x00401000.
Mine begins:

//import function kernel32.GetModuleHandleA(lpModuleName:PAnsiChar):HMODULE; stdcall;
00401498 jmp dword ptr ds:[568928]
//---------------------------------------------------------------------------
//procedure InitializeModule; stdcall;
004014A0 mov eax,55B000; Module:System.TLibModule
004014A5 call RegisterModule
004014AA ret


It often gets the code right for an address, as I've described before. So I'm a little puzzled.

Log in to reply
Access violation in Wimbledon sim 12/03/2015 at 21:54 #69993
clive
Avatar
2789 posts
" said:
How about this one Clive....just appeared on the screen......

"Access violation at address 400068A0 in module 'rtl60bpl'. Write of address 40341DFA"
rtl60bpl is Delphi support stuff. If I track down that address it will be something like the code for joining two strings together. Unless it can be made repeatable I don't know how to investigate it.

I'm also not sure why only you are getting all these problems. What kind of system are you running? Have you tried uninstalling and reinstalling the system files? (Yes, I'm clutching at straws.)

Quote:

This is getting a tad annoying having these messages keeping appearing on the screen.
I'm not surprised you feel like that and I sympathise.

Quote:

Perhaps I should forget about ever writing a timetable, but considering the amount of time I have put in on this one it does seems a terrible waste if I do.
Please carry on. At best, perhaps you can come up with a pattern of actions that triggers the issues, so that Geoff and I can investigate.

Quote:

Did the problems/messages with Feltham that I reported get sorted and will the loader be updated sometime soon with the fixes for those messages.
Can you give me a Mantis number? Or failing that a pointer to the relevant thread?

Log in to reply
Access violation in Wimbledon sim 12/03/2015 at 22:04 #69994
postal
Avatar
5264 posts
Clive

Thanks for the explanation. In regard to the particular comments you make;

" said:
1: The address has been reported wrongly. That's certainly happened in the past: I had a report of a problem at address (let's say) 00456789 with a read of address 00000048. When I look, that's not a valid instruction address. But if I look at address 00456987 instead, I find an instruction with a +48 in it, in the middle of code related to the reported symptoms. Therefore I assumed the original reporter had given the wrong address.
In which case would it help if the reporter indicated whether the address was entered by copy and paste so unlikely to be incorrect or manually entered?

Quote:
2: The Delphi error handling mechanism is giving the wrong address sometimes. If so, I don't know why, because it very often gives the right address.
Would that suddenly give rise the number of times that this sort of problem has been reported recently where previously reports have been rare?

Quote:
3: The address is correct because the underlying problem caused a jump to an invalid address (e.g. by corrupting the stack) which happened to decode as an instruction that caused this symptom. If this is so, then looking at the code isn't going to point out the problem. What I need is instructions on how to consistently recreate the problem. I can then investigate the related code, run things under a debugger, and so on.
If you haven't already got that from me, I can let you have a saved game where the problem I reported occurs every time it is run. I can't speak for whether Geoff (Northroad) has identified any trigger for his problem.

At least after the explanation we can all understand a bit more about how bugs are tracked down and why there sometimes appears to be a lack of progress so thanks again for the dissertation.

“In life, there is always someone out there, who won’t like you, for whatever reason, don’t let the insecurities in their lives affect yours.” – Rashida Rowe
Last edited: 12/03/2015 at 22:05 by postal
Log in to reply
Access violation in Wimbledon sim 12/03/2015 at 22:04 #69995
headshot119
Avatar
4869 posts
#12375 was one of the bugs related to the Feltham issue Clive.
"Passengers for New Lane, should be seated in the rear coach of the train " - Opinions are my own and not those of my employer
Log in to reply
Access violation in Wimbledon sim 12/03/2015 at 22:27 #69996
clive
Avatar
2789 posts
12375 is fixed; the fix will be in the next loader release.
Log in to reply
Access violation in Wimbledon sim 13/03/2015 at 00:47 #69997
Muzer
Avatar
718 posts
When working on other projects, I found that errors such as this were often made to trigger register/stack dumps to a file and (in some cases) full memory dumps. If this is possible with Delphi, perhaps enabling this for a future release would be a really good idea, to make debugging much easier in cases where stack corruption has occurred.
Log in to reply
Access violation in Wimbledon sim 13/03/2015 at 08:50 #70000
northroad
Avatar
872 posts
" said:
" said:
How about this one Clive....just appeared on the screen......

"Access violation at address 400068A0 in module 'rtl60bpl'. Write of address 40341DFA"
rtl60bpl is Delphi support stuff. If I track down that address it will be something like the code for joining two strings together. Unless it can be made repeatable I don't know how to investigate it.

I'm also not sure why only you are getting all these problems. What kind of system are you running? Have you tried uninstalling and reinstalling the system files? (Yes, I'm clutching at straws.)

Quote:

This is getting a tad annoying having these messages keeping appearing on the screen.






I'm not surprised you feel like that and I sympathise.

Quote:

Perhaps I should forget about ever writing a timetable, but considering the amount of time I have put in on this one it does seems a terrible waste if I do.
Please carry on. At best, perhaps you can come up with a pattern of actions that triggers the issues, so that Geoff and I can investigate.

Quote:

Did the problems/messages with Feltham that I reported get sorted and will the loader be updated sometime soon with the fixes for those messages.
Can you give me a Mantis number? Or failing that a pointer to the relevant thread?
Guys,
I am not sure if I am being treated as the lone soldier here. The comment above about me being the only one having these problems is totally without foundation. I can see at least three other persons in this thread alone that have chosen to comment and admit that they have had similar problems and reported them. What is better, to get the error message or warning and just click and accept it and then carry on as though nothing had happened, or try and seek out a reason as to why it is happening and thus eliminate the chances of it happening again. I fancy that if other people who have attempted to write timetables for the various loader sims were to be truthful and admit that some of them had experienced similar problems then you might get the full story. I think it might be true that some of them have just pressed accept and carried on. Not really a good thing to do if it is affecting what the end user may get.

As reported in my query/similar problems with the Feltham sim I am using a HP Envy computer with the supplied Windows 8 operating system. Nothing fancy with additional screens or non paid for software, just what came off the shelf from the local John Lewis at Brent Cross.

I will now sit back and let this thread take it's course and hope that the people in the know can resolve what is happening. Not just for my benefit but for others who have similar problems and choose not to say anything or do say something and possibly not get resolution. Must admit that the information contained in the lecture post went completely over my head and I freely admit that I have not got the faintest idea what the messages mean, but I do know how to cut and paste.
I will carry on with my timetable writing attempts and it may not be today or tomorrow or even next month that I finish what I set out to do but this time and not like previous abortive attempts I intend to finish it. Mean while any help that I may get will be more than gratefully received.... oh and in case anyone wants to know if I like sim sig you bet I do.

Geoff.

Last edited: 13/03/2015 at 09:25 by northroad
Log in to reply
Access violation in Wimbledon sim 13/03/2015 at 13:53 #70004
Danny252
Avatar
1461 posts
" said:

Quote:

Edit: I wonder if your debugger is showing addresses beginning at the same offset as mine is (and presumably the error messages)? The first instruction in mine is at address 0x00401000.
Mine begins:

//import function kernel32.GetModuleHandleA(lpModuleName:PAnsiChar):HMODULE; stdcall;
00401498 jmp dword ptr ds:[568928]
//---------------------------------------------------------------------------
//procedure InitializeModule; stdcall;
004014A0 mov eax,55B000; Module:System.TLibModule
004014A5 call RegisterModule
004014AA ret


It often gets the code right for an address, as I've described before. So I'm a little puzzled.
Curious indeed! Those instructions start at 004014C8 for me, with the preceding lines being a large list of pointers to rtl60 functions, which are called from various locations in the code later on.

I wonder if this differing behaviour might be caused by how the program and the relevant libraries are loaded by different operating systems, versions of the Delphi libraries, and so on?

Log in to reply
Access violation in Wimbledon sim 13/03/2015 at 22:16 #70010
clive
Avatar
2789 posts
" said:

In which case would it help if the reporter indicated whether the address was entered by copy and paste so unlikely to be incorrect or manually entered?
Yes, it probably would.

Quote:
Quote:
2: The Delphi error handling mechanism is giving the wrong address sometimes. If so, I don't know why, because it very often gives the right address.
Would that suddenly give rise the number of times that this sort of problem has been reported recently where previously reports have been rare?
I've no idea. I can't see why it should, but that doesn't prove anything.



Quote:

If you haven't already got that from me, I can let you have a saved game where the problem I reported occurs every time it is run.
Please put it in Mantis (as a core code issue) and assign it to me.

Log in to reply
Access violation in Wimbledon sim 13/03/2015 at 22:38 #70011
clive
Avatar
2789 posts
" said:
When working on other projects, I found that errors such as this were often made to trigger register/stack dumps to a file and (in some cases) full memory dumps. If this is possible with Delphi, perhaps enabling this for a future release would be a really good idea, to make debugging much easier in cases where stack corruption has occurred.
It appears that the Delphi compiler we use doesn't provide this as a facility. But there's a couple of ideas I'm looking into.

Log in to reply
Access violation in Wimbledon sim 13/03/2015 at 22:51 #70012
clive
Avatar
2789 posts
" said:

I am not sure if I am being treated as the lone soldier here. The comment above about me being the only one having these problems is totally without foundation. I can see at least three other persons in this thread alone that have chosen to comment and admit that they have had similar problems and reported them.
Sorry, for some reason I got the idea that you were having particularly bad problems. I'm not picking on you in any way.

Quote:

What is better, to get the error message or warning and just click and accept it and then carry on as though nothing had happened, or try and seek out a reason as to why it is happening and thus eliminate the chances of it happening again. I fancy that if other people who have attempted to write timetables for the various loader sims were to be truthful and admit that some of them had experienced similar problems then you might get the full story. I think it might be true that some of them have just pressed accept and carried on. Not really a good thing to do if it is affecting what the end user may get.
I think you've misunderstood me. I consider *EVERY* *SINGLE* "Internal error" report to be serious and need fixing. To do so I need either to have enough information to track down the cause, or enough information to be able to repeat the problem for myself and therefore invoke it under a debugger or something like that.

I'm not ignoring your problem, but without one or the other of these I don't know what to do next. There's something wrong/confusing/unexplained about the numbers in your report, so I can't attack it that way. That leaves knowing how to reproduce it. If you can't tell me how (perhaps because you don't know), I'm stuck.

Quote:

As reported in my query/similar problems with the Feltham sim I am using a HP Envy computer with the supplied Windows 8 operating system. Nothing fancy with additional screens or non paid for software, just what came off the shelf from the local John Lewis at Brent Cross.
Okay, then it's not something like WINE playing up. That's good to know.

I'm not giving up, but I'm struggling.

Log in to reply
Access violation in Wimbledon sim 13/03/2015 at 22:54 #70013
clive
Avatar
2789 posts
" said:

Curious indeed! Those instructions start at 004014C8 for me, with the preceding lines being a large list of pointers to rtl60 functions, which are called from various locations in the code later on.

I wonder if this differing behaviour might be caused by how the program and the relevant libraries are loaded by different operating systems, versions of the Delphi libraries, and so on?
Hmm. I wonder if that's the difference between Windows 7 and Windows 8? That's something to look into.

Log in to reply
Access violation in Wimbledon sim 13/03/2015 at 23:46 #70014
postal
Avatar
5264 posts
" said:


Please put it in Mantis (as a core code issue) and assign it to me.
As usual I shot from the lip rather than checking the background first. It is #12501 and you've already passed it on to Geoff

“In life, there is always someone out there, who won’t like you, for whatever reason, don’t let the insecurities in their lives affect yours.” – Rashida Rowe
Last edited: 13/03/2015 at 23:49 by postal
Log in to reply
Access violation in Wimbledon sim 14/03/2015 at 12:01 #70019
Danny252
Avatar
1461 posts
" said:
" said:
I wonder if this differing behaviour might be caused by how the program and the relevant libraries are loaded by different operating systems, versions of the Delphi libraries, and so on?
Hmm. I wonder if that's the difference between Windows 7 and Windows 8? That's something to look into.
For reference, I'm on Win 7, using OllyDbg to decompile.

Log in to reply
Access violation in Wimbledon sim 16/03/2015 at 14:05 #70053
northroad
Avatar
872 posts
Clive,
Perhaps this screenshot of yet another error message will help.I can see there is a problem with the loader on this one.

Geoff

Post has attachments. Log in to view them.
Log in to reply
Access violation in Wimbledon sim 16/03/2015 at 17:01 #70055
GW43125
Avatar
495 posts
Oh no... is that exactly the same TT as I'm making I see?...
Log in to reply