Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#709 closed defect (fixed)

[CRASHLOG] Compatibility Problem - Crashes whilst attempting to load maps.

Reported by: Luke Martinez Owned by: Jan Wassenberg
Priority: Release Blocker Milestone: Alpha 6
Component: Core engine Keywords:
Cc: Patch:

Description

Hello,

I am running 0AD alpha 3 on windows XP (really shouldnt be tho) and I can not get any maps to run.

When starting the game i encounter 3 errors, then the window loads and i get 4 more errors, then i can view the actual UI. and select a map, press start game and i get 40 more errors before the program gives up. (more info in errors.txt)

Please see attached the debugging / error files.

Thanks,
Luke Martinez

asmartgoat@…

Attachments (9)

Errors.txt (1.9 KB ) - added by Luke Martinez 13 years ago.
Errors, a detailed walkthrough of when and where the errors pop up
crashlog.txt (6.0 KB ) - added by Luke Martinez 13 years ago.
Crash log text file.
crashlog.dmp (41.1 KB ) - added by Luke Martinez 13 years ago.
The .dmp file
0ad.LOG (4.6 KB ) - added by Luke Martinez 13 years ago.
Log file from debugging tool
System Info.txt (30.4 KB ) - added by Luke Martinez 13 years ago.
System Information Dump
erroratbuildingobject.txt (604 bytes ) - added by Luke Martinez 13 years ago.
This is the set of errors i get when i sent a soldier to go and build something, I'm not getting any errors at the moment except for this and i'm not running with the argument.
Screenshot.JPG (339.6 KB ) - added by Luke Martinez 13 years ago.
Argh sorry for the mess of errors. o.O This is a screenshot of when 0ad finally loads on windows.
New Text Document (4).txt (56.6 KB ) - added by Luke Martinez 13 years ago.
VC++ Debug Output - Raw.
Second Try.txt (54.5 KB ) - added by Luke Martinez 13 years ago.
Woops, I forgot to remove the line out of GameSetup.cpp, this is the debug output without that line. Notable: HRT: activating HPET failed: Unknown error (-100021, 0xFFFE794B)

Download all attachments as: .zip

Change History (45)

by Luke Martinez, 13 years ago

Attachment: Errors.txt added

Errors, a detailed walkthrough of when and where the errors pop up

by Luke Martinez, 13 years ago

Attachment: crashlog.txt added

Crash log text file.

by Luke Martinez, 13 years ago

Attachment: crashlog.dmp added

The .dmp file

comment:1 by Luke Martinez, 13 years ago

Summary: Can not start maps[BUG] [Windows]Can not start maps, crashes whilst attempting to load maps on my installation.

comment:2 by Luke Martinez, 13 years ago

Summary: [BUG] [Windows]Can not start maps, crashes whilst attempting to load maps on my installation.Crashes whilst attempting to load maps on my installation.

by Luke Martinez, 13 years ago

Attachment: 0ad.LOG added

Log file from debugging tool

comment:3 by Luke Martinez, 13 years ago

It decided to load, it crashed, then i opened the game again, gave me the usual errors but now is playable..


Confused,

Luke Martinez

comment:4 by Philip Taylor, 13 years ago

Cc: Jan Wassenberg added

comment:5 by historic_bruno, 13 years ago

Cc: Jan Wassenberg removed
Summary: Crashes whilst attempting to load maps on my installation.[CRASHLOG] Crashes whilst attempting to load maps on my installation.

comment:6 by historic_bruno, 13 years ago

Are you still having this issue with the latest release?

comment:7 by Luke Martinez, 13 years ago

Yes, alpha 4. It runs fine on the same computer under fedora 13/14

I've updated all drivers maybe its just me.

comment:8 by Philip Taylor, 13 years ago

It's something to do with timers, which are pretty system-dependent and seem to be capable of breaking in multiple ways, and I don't think that code has changed recently, so I expect this is a legitimate compatibility bug (probably for Jan to look into).

comment:9 by Kieran P, 13 years ago

Owner: set to Jan Wassenberg

comment:10 by Jan Wassenberg, 13 years ago

Thanks for this detailed information! Unfortunately there's a crucial bit missing due to a bug in our debug output (the timer is initialized before we indicate an interest in its output messages). Could you please change the '|' characters in lines 81 and 87 of whrt.cpp to something else such as ':'? (That is what prevents them from showing up)

Then please post the resulting line (should be the very first thing in the new debug output - your 0ad.LOG). I'll be on vacation starting tomorrow and unable to fix it within the next 2 weeks. However, you can probably work around this by running with -wNoMahaf on the command line. If not, another workaround would be to insert the line

return CreateCounterTGT(address, size);

as the very first thing inside ConstructCounterAt (counter.cpp, line 52).

comment:11 by Luke Martinez, 13 years ago

I've added a system info dump.

Hi, I'll get around to downloading and compiling the source soon.

the -wNoMahaf workaround does seem to get me past the first 20 error messages that i get, but then the game complains that it can't load alot of dds files, it crashes after a few seconds of getting into a game.

I'll download the source and put the fixes you suggested.

by Luke Martinez, 13 years ago

Attachment: System Info.txt added

System Information Dump

comment:12 by Jan Wassenberg, 13 years ago

Any progress on compiling yet?

comment:13 by Luke Martinez, 13 years ago

Resolution: invalid
Status: newclosed

I resit my video card today and now everything seems to be working.

Unless anyone else has had a problem similar, i think we can close this.

comment:14 by Kieran P, 13 years ago

Milestone: BacklogAlpha 5

comment:15 by Jan Wassenberg, 13 years ago

(In [9485]) ensure WHRT debug messages are always displayed (in case of compatibility trouble) refs #709

comment:16 by Jan Wassenberg, 13 years ago

Resolution: invalid
Status: closedreopened

I'm glad to hear the other errors no longer occur (more likely due to data file fixes). However, the first three won't go away by themselves, and I suspect you're still running with -wNoMahaf, which is not a good long-term solution. Since the HRT debug output is now always displayed (see above), could you please run without -wNoMahaf and post the line(s) starting with "HRT:"?

comment:17 by Luke Martinez, 13 years ago

Yes, I have been running with -wNoMahaf as a command line argument. 

With -wNoMahaf, i don't get critical errors, maps load, everything appears fine, game is playable. but it stills reports that some things (.dae files) have failed to load, but strangely enough it doesn't appear that anything is missing.

Without it, i get the error logs attached (errorset1.txt) then the program window appears, 2 more errors (errorset2.txt). Then I load a map (errorset3.txt) And I don't see anything but the ground textures. I then get the: Much to our regret we must report the program has encountered notice. (errorset4.txt, crashlog2.txt, crashlog2.dmp) Then i am forced to exit.

I'll capture and upload these files within the hour, so if you don't see anything it'll be there soon :)

Thanks,
Luke Martinez

me [@t] luke.asia

comment:18 by Luke Martinez, 13 years ago

Ok, so the errors have happened to me a few times, but now 0ad is running as if i had -wNoMahaf argument on, as in I am not getting any errors except that some .dae files fail to load.

Maybe it just is my computer being temperamental.

by Luke Martinez, 13 years ago

Attachment: erroratbuildingobject.txt added

This is the set of errors i get when i sent a soldier to go and build something, I'm not getting any errors at the moment except for this and i'm not running with the argument.

comment:19 by Jan Wassenberg, 13 years ago

huh. I have no idea why those timer errors would disappear after a while. The newest error is also a strange one. Any chance you could change the code in wfilesystem:wtruncate from ENSURE(hFile != INVALID_HANDLE_VALUE); to

if(hFile == INVALID_HANDLE_VALUE) {
  debug_printf(L"problem reopening %ls\n", OsString(pathname).c_str());
  return -1;
}

and post the resulting line?

comment:20 by Luke Martinez, 13 years ago

Alright, I'll grab the git and add that patch. I'm only grabbing git because its close to release and you've already implemented this patch.

comment:21 by Kieran P, 13 years ago

Priority: Should HaveRelease Blocker

comment:22 by Luke Martinez, 13 years ago

Hi I'm having the original errors again: 

Function call failed: return value was -1 (Unknown error (-1, 0xFFFFFFFF))

Location: wutil.cpp:168 (!LibError_from_GLE) Call stack: 00567D5F 005691C8 0053F27B 005625C7 005793E4 00579444 errno = 0 (?) OS error = 487 (Attempt to access invalid address. )

____ContinueFunction call failed: return value was -1 (Unknown error (-1, 0xFFFFFFFF))Location: wutil.cpp:168 (!LibError_from_GLE)Call stack:00567D5F005691C80053F27B005625C7005793E40057944400578DA0005625C7005793E4errno = 0 (?)OS error = 487 (Attempt to access invalid address.)__
CONTINUE
__Function call failed: return value was -1 (Unknown error (-1, 0xFFFFFFFF))Location: wutil.cpp:168 (!LibError_from_GLE)Call stack:00567D5F005691C80053F27B005625C7005793E40057944400578DA0005625C7005793E4errno = 0 (?)OS error = 487 (Attempt to access invalid address.)__
CONTINUE
_Assertion failed: "nominalFrequency >= 500.0-DBL_EPSILON"Location: whrt.cpp:118 (InitCounter)Call stack:00567D5F005691C80053F27B005625C7005793E40057944400578DA0005625C7005793E4errno = 0 (?)OS error = 487 (Attempt to access invalid address.)___
CONTINUE
___Assertion failed: "resolution <= 2e-3"Location: whrt.cpp:119 (InitCounter)Call stack:00567D5F005691C80053F27B005625C7005793E40057944400578DA0005625C7005793E4errno = 0 (?)OS error = 487 (Attempt to access invalid address.)__
CONTINUEWindow loads, first 50ms of Song loops.
__
Assertion failed: "TimeSinceLastFrame > 0.0f"Location: main.cpp:251 (Frame)Call stack:00567D5F005691C80053F27Berrno = 0 (?)OS error = 487 (Attempt to access invalid address.)____Location: main.cpp:251 (Frame)Same Call stack as above.Same error No.____Same error until I press suppress.____Assertion failed: "! m_Anim->m_ObjectBounds.IsEmpty()"Location: Model.cpp:138 (CModel::CalcBounds)Call stack:00567D5F005691C80053F27B0D6800EE003FBB10FF810000FFFE79544C8D1C755868102451005C65FFFEB4E808C483FF840FC084errno = 0 (?)OS error = 0 (no error code was set)

Once all that is done i am presented screen shown on the attached screenshot. :)

me@…


by Luke Martinez, 13 years ago

Attachment: Screenshot.JPG added

Argh sorry for the mess of errors. o.O This is a screenshot of when 0ad finally loads on windows.

comment:23 by Jan Wassenberg, 13 years ago

One important piece of info is still missing :) How about those "HRT" lines from the debug output?

(BTW, I wouldn't be surprised by any subsequent breakage, since all bets are off if the game is running without a functioning timer.)

comment:24 by Luke Martinez, 13 years ago

I've screwed trying to get git, i'm just gonna download source and add patch 9485 and your 

if(hFile == INVALID_HANDLE_VALUE) {
  debug_printf(L"problem reopening %ls\n", OsString(pathname).c_str());
  return -1;
}

I'm downloading now, should have results within an hour + compile time.

comment:25 by Luke Martinez, 13 years ago

I compiled with the HRT: change. 

Unhandled exception at 0x004bdf33 in pyrogenesis_dbg.exe: 0xC0000005: Access violation reading location 0xd386d04c.

I also got some Debug output which I'll upload in just a second.

by Luke Martinez, 13 years ago

Attachment: New Text Document (4).txt added

VC++ Debug Output - Raw.

comment:26 by Luke Martinez, 13 years ago

Which file do i put the 

if(hFile == INVALID_HANDLE_VALUE) {
  debug_printf(L"problem reopening %ls\n", OsString(pathname).c_str());
  return -1;
}

code in?

by Luke Martinez, 13 years ago

Attachment: Second Try.txt added

Woops, I forgot to remove the line out of GameSetup.cpp, this is the debug output without that line. Notable: HRT: activating HPET failed: Unknown error (-100021, 0xFFFE794B)

comment:27 by Jan Wassenberg, 13 years ago

Thanks for the debug info!

The first one looks decent enough; the HPET timer (dangerous but good) is not available, we fall back to the TSC. I assume you're running with -wNoMahaf there. The only actual problem is the warning that re-opening the file failed; all subsequent errors are from trying to display the current program state, which is hard+dangerous. You're wanting to insert the debug_printf/return -1 in wfilesystem.cpp to replace the line "ENSURE(hFile != INVALID_HANDLE_VALUE);".

The second run looks to be the same. Could you also post debug info when running without -wNoMahaf? Is anything else different to when you had the actual in-your-face error with nominalFrequency, such as admin permission or special Windows boot options?

I see the code is not up-to-date, though. The error "-100021" is no longer in use as of ~1 week ago, and the line number in the wfilesystem.cpp warning has also changed. I would recommend grabbing the whole SVN repository - that is sure to be up to date.

comment:28 by Luke Martinez, 13 years ago

Summary: [CRASHLOG] Crashes whilst attempting to load maps on my installation.[CRASHLOG] Compatibility Problem - Crashes whilst attempting to load maps.

Hi, 
I'm not running with -wNoMahaf, i was running it with the VC debugger. So that seems very strange.

I've been trying to grab the SVN but It seems to keep giving up on me. Is there a way i could download it in a package?

comment:29 by Jan Wassenberg, 13 years ago

Once you've done an SVN checkout, even if that aborts, you should be able to "update" the working copy and get the rest of the files.

Very strange indeed about not running with the workaround, yet the error not coming up. Cases like this are a good reason to endure the annoyance of always having that debug output in the log, just in case something comes up and we need to know what's happening.

comment:30 by Erik Johansson, 13 years ago

Just want to add that SVN checkouts (or really large updates) seems to give up fairly often (or rather, often enough that we're aware of them, we haven't been able to find the cause though), but as Jan said it should just be to update one or more times until all is downloaded.

comment:31 by Kieran P, 13 years ago

Milestone: Alpha 5Alpha 6

comment:32 by Jan Wassenberg, 13 years ago

Have you been able to check out the SVN repository and give it another go?

comment:33 by Luke Martinez, 13 years ago

Excellent, I've just finished downloading the source from svn, It has compiled.

I get no errors when i start it up, but i notice that the images loading is lagging behind the program.

The first 10 seconds of gameplay are at 1-3FPS while it is loading the textures for some reason? The next seconds gameplay are at around 7 - 12FPS.

This is unusually slow, Since I get 60+ FPS when running this program in Fedora.

Is there any tests you would like me to do with the code, or with the debugger?

comment:34 by Jan Wassenberg, 13 years ago

Resolution: fixed
Status: reopenedclosed

Glad to hear these errors are no more. I'll close this one, then :) Yes, the first seconds are slow due to conversion and loading of texture files. (We figure this is better than a longer loading screen.)

hrm, 60 vs 12 is a big difference. Is everything else really the same? (Map, settings, number of players/AIs) I can see windowed mode differing depending on the other programs that are running. When using Alt+Enter to toggle into fullscreen, you should see comparable performance on both OSes. If not, it would be good to post another ticket describing the exact test conditions.

comment:35 by Luke Martinez, 13 years ago

Would running it in the debugger have any impact on it?

Really strange. I ran it today with FRAPS and i got 30FPS on the menu, but the second it went into the map it slowed down to 2FPS then climbed to 5FPS and stayed there.

I was using Jubot on "death canyon".

comment:36 by Philip Taylor, 13 years ago

If you're compiling it yourself, did you change it from Debug mode (the default, which is slow) to Release mode?

Note: See TracTickets for help on using tickets.