Page 1 of 1

cannot start nigthly

Posted: 13 Mar 2008 12:25
by zero1000
Hi,

since some days I cannot start the TTDPatch nigthly anymore. It comes with the following error message. I have no idea what I have changed. No Crashlog. TTDLOADW.OVL was deleted manually by be and newly generated by the patch. The version is nightly-r1832.

Somebody any ideas what's wrong?

Thanks
zero1000

Re: cannot start nigthly

Posted: 13 Mar 2008 15:55
by DaleStan
zero1000 wrote:No Crashlog.
Then follow directions ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- vv

Re: cannot start nigthly

Posted: 14 Mar 2008 09:42
by zero1000
Hi Dale,

here is the screenshot of the olly debuger. Hopefully I catched the right exception, because the error occurs before the TTDLOADW.OVL is loaded completly, it happens before the title window comes up.

Thanks in advance for have a look on this.

regards
zero

Re: cannot start nigthly

Posted: 14 Mar 2008 15:36
by DaleStan
This is caused by one or more of your GRFs. I'd guess that your vehicle GRFs are probably not part of this problem, but I don't know for sure.

In any case, please find the smallest set of GRFs that produces it and post your newgrf.cfg.

Re: cannot start nigthly

Posted: 14 Mar 2008 16:52
by zero1000
Thanks Dale,

seems that I have reached some limit for station sprites. If I comment out some of the station grf's it works. And it doesn't matter which I delete from the list.

regards
zero

Re: cannot start nigthly

Posted: 14 Mar 2008 19:37
by acalex
zero1000 wrote:Thanks Dale,

seems that I have reached some limit for station sprites. If I comment out some of the station grf's it works. And it doesn't matter which I delete from the list.

regards
zero
Lucky one!
Since r1829 the game doesen't start for me either, no matter if I delete newgrf.cfg or not. So I assume, it's not a grf problem!?
Got a similar error message. Dale, can you have a look at it?

Re: cannot start nigthly

Posted: 14 Mar 2008 20:10
by DaleStan
Bloody stupid breakage. It works for me it works for me it works for me.

For some reason, on some machines, r1829/1830 broke loading the texts. Even having found another bug in that code, I still can't understand how. If I can't figure out why in the near future, I guess I'll have to take it back out. There is at least a chance that tonight's nightly will fix it, though.

Re: cannot start nigthly

Posted: 15 Mar 2008 11:37
by acalex
DaleStan wrote:There is at least a chance that tonight's nightly will fix it, though.
Unfortunately it doesn't! Just another crashlog ... X( Maybe this is more helpful for you!?
But I figured out that the crash is caused by "newcargos on". Switchin' it off, it works fine.
Any ideas?

Re: cannot start nigthly

Posted: 18 Mar 2008 16:57
by DaleStan
Is there anyone who can reproduce this bug and is interested in debugging it? Some programming knowledge will be helpful, but is not required. Ability to run OllyDBG is required. (The procedure is the same as the for debugging a crash with Olly, up to the point where you take the screenshot. I'll walk you through from there.)

If so, please find me on IRC, or reply here if it'll be a few days before you'll be available.

Re: cannot start nigthly

Posted: 20 Mar 2008 02:23
by DaleStan
After some thought and work, and assuming it's what Patchman guesses it is, and I hope it is, it should be possible to get the necessary information by following these instructions. Yes, this is long, but hopefully it will give me the information I need to fix the problem.

Proceed as for debugging with Olly, using the alternate instructions on the wiki. You will get a window that looks something like 1.png.
  1. Click in the red-outlined area. This is the dump, and will be referred to as such from now on.
  2. Type <ctrl-G>
  3. Confirm that the pop-up dialog box's title is "Enter expression to follow in Dump". If "in Dump" is missing, or it says "in Stack", go back to step 1 and try again.
  4. Type "esi-2", without the quotes, and click OK.
  5. Right-click on byte the in the upper left-hand corner of the dump, here marked with a blue outline.
  6. From the pop-up menu, select Breakpoint->Hardware, on write->Byte.
  7. Type <ctrl-F2>, click OK (the entry point warning again), press <F9>.

    You will now see a screen that looks like 2.png. Note that the status bar (all the way at the bottom) starts with "Hardware breakpoint".
  8. Find the address in white on black in the upper left (here, "00537B8E"), and make sure that the top of the next column is "F3:A4", as shown. If not, submit screenshot and hie yourself over to IRC.
  9. Click in the Dump panel, type <ctrl-G> As before, check the popup's title.
  10. Type "edi", again without the quotes, and click OK. (Note: It's eDi this time, not eSi.)
  11. Press <F8>.
  12. Right-click anywhere in the dump pane, and select Backup->Create backup.
  13. Press <F9>.
At this point, one of two things will happen. Look at the status bar to determine which happened.

If the status bar again starts with "Hardware breakpoint":
  1. Take a screenshot.
  2. Press <F9>. If the status bar still starts with "Hardware breakpoint", take another screenshot. Repeat this step until the status bar starts with "Illegal instruction".
  3. Submit all screenshot(s). Hopefully there will only be one.
--- ALTERNATIVELY ---

If the status bar instead starts with "Illegal instruction":
  1. Scroll up in the Dump until the "ASCII" column no longer appears to contain mostly readable text.
  2. Scroll down until you find something in red, instead of the usual grey.
  3. Right click on first (top-most, or left-most of any that are equally high) red byte, either in the "Hex dump" column or in the "ASCII" column, and proceed from step 6, above. When you submit the screenshot(s), mention that you had to do this.
There is one easy pitfall I foresee:
If, at any point, you get the message "TTDPatch not loaded properly", you pressed a key in the TTDPatch window, and caused TTDPatch to close. Close Olly and restart from the very beginning, being careful not to close TTDPatch until after you have collected all the screenshot(s).

Re: cannot start nigthly

Posted: 25 Mar 2008 19:56
by DaleStan
OK, scratch all that. This is fixed, as of r1852. TTDPatch was trying to store up to 2109 pieces of data in an array that could only hold 2048, so the custom texts got overwritten, and that made them quite exceedingly broken.

Re: cannot start nigthly

Posted: 31 Mar 2008 14:30
by acalex
@Dale: I'm sorry for the delayed reply on your detailed instructions.
As you said, the problem has been fixed by r1852. Thank you for your very good work!