Join us at the Oolite Anniversary Party -- London, 7th July 2024, 1pm
More details in this thread.

Bug

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

Post Reply
David McMahon
Above Average
Above Average
Posts: 16
Joined: Thu Oct 15, 2009 3:07 am

Bug

Post by David McMahon »

Just got my third kill and was heading back to the planet and got a crash :((((

Image
Screet
---- E L I T E ----
---- E L I T E ----
Posts: 1883
Joined: Wed Dec 10, 2008 3:02 am
Location: Bremen, Germany

Re: Bug

Post by Screet »

David McMahon wrote:
Just got my third kill and was heading back to the planet and got a crash :((((
Uhhh...I've never seen anything like this! I was not even aware that there are assertions in - it's strange as for c++ (which this isn't!) assertions are only in debug builds.

Can you post the log (if you did start again, the one from the previous run is renamed, so you have always the current and previous logs) and does stderr reveal anything? For the devs it will also be important to know which version of Oolite you are running (that info is in the log, if you don't have it anymore, at least that info could help), as that file does change, thus someone would have to look at the exact revision that was used to compile your program in order to know which line is meant.

I think that happened somewhere around updateTargeting - did you just attempt to target something?

Screet
David McMahon
Above Average
Above Average
Posts: 16
Joined: Thu Oct 15, 2009 3:07 am

Post by David McMahon »

aww sorry already loaded and saved etc a few times since then :(

If it happens again I will save the entire Dir as not sure which files are important
Screet
---- E L I T E ----
---- E L I T E ----
Posts: 1883
Joined: Wed Dec 10, 2008 3:02 am
Location: Bremen, Germany

Post by Screet »

David McMahon wrote:
aww sorry already loaded and saved etc a few times since then :(

If it happens again I will save the entire Dir as not sure which files are important
Hmmm. Since you said that you just have made a kill prior to the crash (the laser heat looks like it's more than a few seconds since the kill), I do wonder if this is related to something which recently came up.

Would be interesting to know the following:
1) which oxp's do you use (listed in the beginning of the log)
2) which equipment you have in your ship
3) is Data Execution Prevention switched on for all applications on your computer?

Screet
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Post by Kaks »

Thanks!

Looking at the code,

Code: Select all

#if WORMHOLE_SCANNER
        // If our primary target is a wormhole, check to see if we have additional
        // information
        if ([[self primaryTarget] isWormhole])
        {
                WormholeEntity *wh = [self primaryTarget];
                switch ([wh scanInfo])
                {
                        case [code]WH_SCANINFO_NONE
:
OOLog(kOOLogInconsistentState, @"Internal Error - WH_SCANINFO_NONE reached in [PlayerEntity updateTargeting:]");
assert(NO);
break;
case WH_SCANINFO_SCANNED:
if ([self clockTimeAdjusted] > [wh scanTime] + 2)
{
[wh setScanInfo:WH_SCANINFO_COLLAPSE_TIME];
//[UNIVERSE addCommsMessage:[NSString stringWithFormat:DESC(@"wormhole-collapse-time-computed"),
// [UNIVERSE getSystemName:[wh destination]]] forCount:5.0];
}
break;[/code]

it looks like you targeted a wormhole with scanInfo WH_SCANINFO_NONE. (line 2043 is the assert(NO); line).

Micha is our resident wormhole expert, so he'll be around in a shortish while, to help clarify the situation for us all! :)
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
Micha
Commodore
Commodore
Posts: 815
Joined: Tue Sep 02, 2008 2:01 pm
Location: London, UK
Contact:

Post by Micha »

Looking at the various code paths; that should not be possible to happen hence the assert.
The only way that assert could be triggered is if a wormhole is added to the player's targeted entities list without invoking [PlayerEntity addTarget:] as that invokes [PlayerEntity addScannedWormhole:], which in turn sets the WH_SCAN_INFO for that wormhole. No exceptions.

In fact, holding that thought, I just checked the Scripting interface, but that is restricted to only assigning ship entities as targets - wormholes are not ships. And even then, it eventually calls addTarget: as well.. so I'm stumped.

David, could you please give as much information as possible about what occurred immediately before the crash? Which Equipment do you have? Do you have any OXPs installed? Anything interesting in the log file (if you still have that log)?
The glass is twice as big as it needs to be.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6570
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

Moved to Testing and Bug Reports.
User avatar
Micha
Commodore
Commodore
Posts: 815
Joined: Tue Sep 02, 2008 2:01 pm
Location: London, UK
Contact:

Post by Micha »

Hi David,

We've just added some more error logging into trunk (r2678) for this particular crash - could you try to reproduce the crash with that?

If you can't, what system are you playing on, and do you have the save-file from just prior to the crash?

Thanks,
- Micha.
The glass is twice as big as it needs to be.
David McMahon
Above Average
Above Average
Posts: 16
Joined: Thu Oct 15, 2009 3:07 am

Hi

Post by David McMahon »

Sorry about lack of comeback

Not been able to replicate the bug, maybe one off?

Anyway I will report back if it happens again :)
Post Reply