Frequent crashes [7765]

Describe your experience with the latest version of FreeOrion to help us improve it.

Moderator: Oberlus

Forum rules
Always mention the exact version of FreeOrion you are testing.

When reporting an issue regarding the AI, if possible provide the relevant AI log file and a save game file that demonstrates the issue.
Post Reply
Message
Author
User avatar
mem359
Dyson Forest
Posts: 214
Joined: Sun Jun 08, 2014 1:18 am

Frequent crashes [7765]

#1 Post by mem359 »

I've had 3 crashes so far in the same game.
It isn't overly frequent (3 crashes over 125 turns), but since I didn't have any crashes in the last 3 weeks, I'm going to assume this is a recent bug. (I had been using 7751, and only used 7757 enough to notice the star lane color problem.)

All 3 crash reports show a graphics kernel error, but I don't know if this is a symptom or the real problem.
I've attached part of one of the (Mac) crash reports, if that helps.

Two crashes happened between turns (after hitting the "turn" button), probably as the screen is refreshed for a new turn.
The other time was during a turn. I had issued a bunch of planet builds, combined and moved a few fleets. I was moving the pointer up, when the screen froze, and the executable crashed.

Edit: I just noticed on line 9 of the crash report a call to Ogre::OSXCarbonWindow. This is suspicious, since I thought Carbon was depreciated a few years ago. If I get another crash, I'll check if the crash report shows the same list of routine calls, or not.

Edit2: Just had a fourth crash (on turn 145). Added a few items to the build queue, moved the pointer and it froze, followed by the crash. The report looks identical to the attached file.
Attachments
partial_crash_report.txt
Graphics kernel error (partial crash report)
(4.13 KiB) Downloaded 55 times

User avatar
Vezzra
Release Manager, Design
Posts: 6102
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Frequent crashes [7765]

#2 Post by Vezzra »

Hm, you're already on 10.10 Yosemite... when did you do the upgrade? Just to be sure that the crashes are not related to issues with the new version of OSX...

Can you provide freeorion.log and freeoriond.log from directly after a crash?

Have you found a way to reliably reproduce these crashes, or do they only happen randomly?

Wrt Carbon: AFAIK this is a legacy framework, but it is still provided to maintain backwards compatibility. So in theory that shouldn't be the problem here...

User avatar
mem359
Dyson Forest
Posts: 214
Joined: Sun Jun 08, 2014 1:18 am

Re: Frequent crashes [7765]

#3 Post by mem359 »

Vezzra wrote:Hm, you're already on 10.10 Yosemite... when did you do the upgrade? Just to be sure that the crashes are not related to issues with the new version of OSX...
I upgraded a few days after it came out, so I would guess that OS related problems would have affected [7751] (from Oct 20th).
But that version was stable for me.
Part of the reason I posted this was to see if other Mac users were seeing this, or just me. :(
Vezzra wrote:Can you provide freeorion.log and freeoriond.log from directly after a crash?
I'll try that next time.
Vezzra wrote:Have you found a way to reliably reproduce these crashes, or do they only happen randomly?
They seem to happen randomly. So far, 2 times between turns, 1 time while changing the build queue, 1 time in the main window.
It does seem to be somewhere in the 30-40 turn range between events, so I should probably run Activity Monitor to see if the memory usage is going up.

I'll start a new game, and keep better track of turns between crashes, what was going on at the time, crash reports, and the log files.
But it may be a few days before I get around to this.
Vezzra wrote:Wrt Carbon: AFAIK this is a legacy framework, but it is still provided to maintain backwards compatibility. So in theory that shouldn't be the problem here...
I agree, but in the 2 cases I looked, it was in the crash report. (But that could be a coincidence.)
I mentioned it, in case someone else is also getting crashes and sees something similar.

User avatar
mem359
Dyson Forest
Posts: 214
Joined: Sun Jun 08, 2014 1:18 am

Re: Frequent crashes [7765]

#4 Post by mem359 »

Started a new game, and had crashes on turns 78 and 127.
The freeorion.log and freeoriond.log files are 1-3 MB in size, around 15K lines of text, which makes "upload attachments" unhappy.
Do you want the entire file, or would the first & last 100 (?) lines do?


I don't know if this is related, but I was running Activity Monitor and noticed how much memory the program uses.
After loading a saved game, the FreeOrion memory usage was about 100 MB.
After 50 turns, memory usage was 620 MB.
(And the kernel_task went from around 500 MB to 1000 MB. After the crash, kernel_task went back to 500 MB.)

Has the program always behaved that way?
Memory leak? Design choice?

AndrewW
Juggernaut
Posts: 791
Joined: Mon Feb 04, 2013 10:15 pm

Re: Frequent crashes [7765]

#5 Post by AndrewW »

mem359 wrote:Started a new game, and had crashes on turns 78 and 127.
The freeorion.log and freeoriond.log files are 1-3 MB in size, around 15K lines of text, which makes "upload attachments" unhappy.
Do you want the entire file, or would the first & last 100 (?) lines do?
You can compress the file.

User avatar
mem359
Dyson Forest
Posts: 214
Joined: Sun Jun 08, 2014 1:18 am

Re: Frequent crashes [7765]

#6 Post by mem359 »

AndrewW wrote:You can compress the file.
Good suggestion.

Turn 78 files.
Attachments
freeorion078.log.gz
turn 78 freeorion.log gzipped
(128.73 KiB) Downloaded 44 times
freeoriond078.log.gz
turn 78 freeoriond.log gzipped
(184.02 KiB) Downloaded 48 times
crash_report078.txt
turn 78 (edited) crash report
(4.13 KiB) Downloaded 48 times

User avatar
mem359
Dyson Forest
Posts: 214
Joined: Sun Jun 08, 2014 1:18 am

Re: Frequent crashes [7765]

#7 Post by mem359 »

Three attachment limit, so posting turn 127 files here.
Attachments
freeorion127.log.gz
turn 127 freeorion.log gzipped
(85.95 KiB) Downloaded 43 times
freeoriond127.log.gz
turn 127 freeoriond.log gzipped
(98.59 KiB) Downloaded 56 times
crash_report127.txt
turn 127 (edited) crash report
(4.13 KiB) Downloaded 50 times

User avatar
mem359
Dyson Forest
Posts: 214
Joined: Sun Jun 08, 2014 1:18 am

Re: Frequent crashes [7765]

#8 Post by mem359 »

Some design feature or memory leak between [7751] and [7765] is causing the the program to become a memory hog, and seems like a possible suspect for the crashes I am seeing.

Yesterday I was running the latest build [7765] on my Mac.
After loading turn 78, Activity Monitor showed that FreeOrion was using about 110 MB of memory.
(And among the other processes, kern_task was at 460 MB).
On turn 126 (before the crash on turn 127), FreeOrion was using 620 MB of memory.
kern_task was over 1000 MB of memory usage, which went back to 460 after the crash.

The build from Oct 20th [7751] is compatible with the saved games, so I switched to that version.
After loading turn 126, Activity Monitor showed that FreeOrion was using about 115 MB of memory, kern_task at 450 MB.
On turn 174, FreeOrion was using 138 MB of memory, kern_task was still at 450 MB.

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: Frequent crashes [7765]

#9 Post by Dilvish »

in r[7767] I just fixed a leak that had come up in r[7756]. I'm not sure if it would account for all of what you ran into, but it should help.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
Vezzra
Release Manager, Design
Posts: 6102
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Frequent crashes [7765]

#10 Post by Vezzra »

mem359 wrote:
Vezzra wrote:Hm, you're already on 10.10 Yosemite... when did you do the upgrade? Just to be sure that the crashes are not related to issues with the new version of OSX...
I upgraded a few days after it came out, so I would guess that OS related problems would have affected [7751] (from Oct 20th).
But that version was stable for me.
Ok, that should rule out issues with Yosemite.
Part of the reason I posted this was to see if other Mac users were seeing this, or just me. :(
Well, there aren't many Mac users around here doing playtesting, unfortunately. I've been playing a test game to see if your issues also turn up on my system, but I've not been able to reproduce your crashes, although I've been playing almost 100 turns in one session. However, I did experience strange drops in frame rate - occasionally the frame rate would drop below 10, with the mouse cursor lagging and all. Usually triggered by going to the research or production screen, or enqueuing a tech or something like that. Most of the time going to another screen (e.g. to production if I had been in research) caused the frame rate to go up again, only one time I had to quit and restart. I've never had that issue before.

I took a look at the logs you posted, but didn't find anything that would shed light on the matter. No errors prior to the crashes, at least not in the logs. Apparently the crashes happened in MapWnd::InitTurn().

Maybe the memory leak Dilvish discovered and fixed was the (or a) cause for this. Next weeks test builds will already contain the fix, please report back if those builds changed anything for you.

User avatar
mem359
Dyson Forest
Posts: 214
Joined: Sun Jun 08, 2014 1:18 am

Re: Frequent crashes [7765]

#11 Post by mem359 »

Dilvish wrote:in r[7767] I just fixed a leak that had come up in r[7756]. I'm not sure if it would account for all of what you ran into, but it should help.
The latest build [7768] is good so far.
No crashes or excessive memory bloat after 70 consecutive turns. I'm guessing the memory leak fix works.

Post Reply