tejaswiyvs / fmsx

Automatically exported from code.google.com/p/fmsx
0 stars 1 forks source link

Issues editing FM 11.3 files #76

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Greetings!

You fixed the loader and the 11.3 files load but the editor cannot work with 
them (& scout crashes too - same issue).

What steps will reproduce the problem?

1. Open FMSX (compiled from latest source)
2. Load file (loads fine now - no longer crashes when loading people)
3. Open Editor
4. Crashes with the stack trace below (dereferencing surname)

Please describe the issue below.

Process:         FM11SX [18362]
Path:            /Users/mgouker/Documents/Sports Interactive/Football Manager 
2011/FM11SX-exp.app/Contents/MacOS/FM11SX
Identifier:      com.littleblue.FM11SX
Version:         0.9.5 (0.9.5)
Code Type:       X86-64 (Native)
Parent Process:  launchd [880]

Date/Time:       2011-03-18 23:27:14.423 -0400
OS Version:      Mac OS X 10.6.6 (10J567)
Report Version:  6

Interval Since Last Report:          434441 sec
Crashes Since Last Report:           3
Per-App Interval Since Last Report:  4989 sec
Per-App Crashes Since Last Report:   2
Anonymous UUID:                      744B722F-232E-4738-A115-BC958C62063C

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x00000000003a7965
Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x00000000003a7965
Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Thread 0 Crashed:  Dispatch queue: com.apple.main-thread
0   ???                             0x00000000003a7965 0 + 3832165
1   com.apple.CoreFoundation        0x00007fff85ef2dfd 
_CFStringAppendFormatAndArgumentsAux + 2877
2   com.apple.CoreFoundation        0x00007fff85ef227d 
_CFStringCreateWithFormatAndArgumentsAux + 109
3   com.apple.Foundation            0x00007fff860b9fc1 -[NSPlaceholderString 
initWithFormat:locale:arguments:] + 140
4   com.apple.Foundation            0x00007fff860bc3a3 +[NSString 
stringWithFormat:] + 187
5   com.littleblue.FM11SX           0x000000010004a7f2 -[Person name] + 1052 
(Person.m:69)
6   com.littleblue.FM11SX           0x000000010001d5e2 -[Database 
peopleStringInfos] + 424 (Database.m:2011)
7   com.apple.Foundation            0x00007fff860c65a8 
-[NSObject(NSKeyValueCoding) valueForKey:] + 420
8   com.apple.Foundation            0x00007fff860c9eec 
-[NSObject(NSKeyValueCoding) valueForKeyPath:] + 226
9   com.apple.Foundation            0x00007fff860c9f82 
-[NSObject(NSKeyValueCoding) valueForKeyPath:] + 376
10  com.apple.Foundation            0x00007fff860c9f82 
-[NSObject(NSKeyValueCoding) valueForKeyPath:] + 376
11  com.apple.Foundation            0x00007fff860c9f82 
-[NSObject(NSKeyValueCoding) valueForKeyPath:] + 376
12  com.apple.AppKit                0x00007fff81438b6f -[NSBinder 
valueForBinding:resolveMarkersToPlaceholders:] + 171
13  com.apple.AppKit                0x00007fff815fef80 -[NSArrayDetailBinder 
_refreshDetailContentInBackground:] + 368
14  com.apple.AppKit                0x00007fff8142ba33 
-[NSObject(NSKeyValueBindingCreation) bind:toObject:withKeyPath:options:] + 557
15  com.apple.AppKit                0x00007fff81408546 -[NSIBObjectData 
nibInstantiateWithOwner:topLevelObjects:] + 1172
16  com.apple.AppKit                0x00007fff814afc80 -[NSNib 
instantiateNibWithExternalNameTable:] + 564
17  com.apple.AppKit                0x00007fff814af9fe -[NSNib 
instantiateNibWithOwner:topLevelObjects:] + 233
18  com.apple.AppKit                0x00007fff814aefcf -[NSViewController 
loadView] + 180
19  com.apple.AppKit                0x00007fff8142b49b -[NSViewController view] 
+ 38
20  com.littleblue.FM11SX           0x0000000100045a7a -[ContentController 
selectEditorView:] + 344 (ContentController.m:215)
21  com.apple.AppKit                0x00007fff819dffbf -[NSToolbarButton 
sendAction:to:] + 75
22  com.apple.AppKit                0x00007fff81651135 -[NSToolbarItemViewer 
mouseDown:] + 5017
23  com.apple.AppKit                0x00007fff8153e34f -[NSWindow sendEvent:] + 
5409
24  com.apple.AppKit                0x00007fff81473a86 -[NSApplication 
sendEvent:] + 4719
25  com.apple.AppKit                0x00007fff8140a4da -[NSApplication run] + 474
26  com.apple.AppKit                0x00007fff814031a8 NSApplicationMain + 364
27  com.littleblue.FM11SX           0x0000000100000fb1 main + 33 (main.m:14)
28  com.littleblue.FM11SX           0x0000000100000f88 start + 52

What version of the editor are you using? On what version of OS X?

FMScout 0.9.5 r110
OSX: Mac OS X 10.6.6 (10J567)

Please provide any additional information below.

This also happens in xcode.  I am going to try to give you more info later on 
when I am debugging.  I want to close a few things down too.  I'm pretty sure 
that this will happen with any game file after the FM update, but I will double 
check.  It does happen with the file I posted before available here:

http://dl.dropbox.com/u/5137309/getting%20ready%20for%20santos.fm

P.S. Check your paypal because I'm sending you a donation for chocolate, wine, 
or beer (your choice!)  Thanks for all your hard work! It isn't working 100% 
but it is looking even better and I'm very excited about the prospects.

Original issue reported on code.google.com by michael....@gmail.com on 19 Mar 2011 at 3:51

GoogleCodeExporter commented 8 years ago
I was actually using r212 of 0.9.5 FMScout - not r110 as stated in the problem 
description.

Original comment by michael....@gmail.com on 19 Mar 2011 at 7:18

GoogleCodeExporter commented 8 years ago
aww thanks for the donation - Ill look into the issue now :)

Original comment by aoumi83@gmail.com on 19 Mar 2011 at 12:33

GoogleCodeExporter commented 8 years ago
hasnt happened with the games ive tried - re-downloading the one above to try.  
do you just click on editor/scout or do you search/ go into sections/ etc?

Original comment by aoumi83@gmail.com on 19 Mar 2011 at 12:38

GoogleCodeExporter commented 8 years ago
It happens after the game is loaded and I press the editor button.  With the 
Scout feature it happened after I did a search.  I'm going to do some further 
testing and post results here.

Original comment by michael....@gmail.com on 19 Mar 2011 at 1:27

GoogleCodeExporter commented 8 years ago
I should mention that I also get the "Error Loading LangDB - Please report this 
as a bug" before loading the file. I noticed that my app that is generated is 
much smaller than the one you build for release too.  I think the problem is 
that the surname doesn't exist in the db so it has uninitialized data.  I don't 
know why it would have a surNameID > -1 and be bad data though:

        else if ([personData firstNameID]>-1 || [personData surnameID]>-1) {
            NSString *firstName, *surname;

            if ([personData firstNameID]>-1 && [personData firstNameID]<[[[NSApp delegate] valueForKeyPath:@"gameDB.database.firstNames"] count]) {
                firstName = [[[[NSApp delegate] valueForKeyPath:@"gameDB.database.firstNames"] objectAtIndex:[personData firstNameID]] name];
            }
            if ([personData surnameID]>-1 && [personData surnameID]<[[[NSApp delegate] valueForKeyPath:@"gameDB.database.surnames"] count]) {
                surname = [[[[NSApp delegate] valueForKeyPath:@"gameDB.database.surnames"] objectAtIndex:[personData surnameID]] name];
            }

            return [NSString stringWithFormat:@"%@ %@",firstName, surname];

Possibly a hint?   The IDE says there are multiple versions of count defined.

Original comment by michael....@gmail.com on 19 Mar 2011 at 1:38

GoogleCodeExporter commented 8 years ago
This works but I'm not sure if I lost some data:

    if (personData) {
        if ([personData commonNameID]>-1 && [personData commonNameID]<[[[NSApp delegate] valueForKeyPath:@"gameDB.database.commonNames"] count]) {
            return [[[[NSApp delegate] valueForKeyPath:@"gameDB.database.commonNames"] objectAtIndex:[personData commonNameID]] name];
        }
        else if ([personData firstNameID]>-1 || [personData surnameID]>-1) {
            NSString *firstName, *surname;
            surname = nil;
            firstName = nil;
            if ([personData firstNameID]>-1 && [personData firstNameID]<[[[NSApp delegate] valueForKeyPath:@"gameDB.database.firstNames"] count]) {
                firstName = [[[[NSApp delegate] valueForKeyPath:@"gameDB.database.firstNames"] objectAtIndex:[personData firstNameID]] name];
            }
            if ([personData surnameID]>-1 && [personData surnameID]<[[[NSApp delegate] valueForKeyPath:@"gameDB.database.surnames"] count]) {
                surname = [[[[NSApp delegate] valueForKeyPath:@"gameDB.database.surnames"] objectAtIndex:[personData surnameID]] name];
            }

            return [NSString stringWithFormat:@"%@ %@",(firstName==nil) ? @"" : firstName, (surname==nil) ? @"" : surname];
        }
    }

Original comment by michael....@gmail.com on 19 Mar 2011 at 1:58

GoogleCodeExporter commented 8 years ago
i have noticed too that it only happens on that game of all the ones ive got.  
very strange that it happens even though the ID is >-1  I will put a bit more 
error checkng in then to catch that.

Original comment by aoumi83@gmail.com on 19 Mar 2011 at 2:31

GoogleCodeExporter commented 8 years ago
ok what ive done is this.  the fact that the ID is valid means there IS a Name 
entity associated to it. for some reason or another the name string has been 
removed / invalidated so instead of error checking in the person name function 
which I think is inappropriate considering the cause, a placeholder name string 
is created on initialisation of Name entities which means the returned value 
will never be nil - hence problem solved :)

Original comment by aoumi83@gmail.com on 19 Mar 2011 at 2:58

GoogleCodeExporter commented 8 years ago
I admit that I have no experience with Xcode. But how is it possible that I get 
16 errors (mainly 'Unable to resolve plugin-dependency for "X"'. while others 
are able to compile it? :/

Original comment by Buis.C...@gmail.com on 19 Mar 2011 at 3:15

GoogleCodeExporter commented 8 years ago
I don't get any errors building in xCode.  Probably you don't have a plugin in 
the project?  Thanks, Amy, for the fix!  :-)

Original comment by michael....@gmail.com on 19 Mar 2011 at 3:54

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Restate that... ;-)

The editor now loads this file fine.  I cannot activate the player & club tabs, 
but I suspect they are disabled for a good reason (still under dev maybe?)  So, 
consider this issue 76 fixed!  THANKS!

Original comment by michael....@gmail.com on 19 Mar 2011 at 4:42

GoogleCodeExporter commented 8 years ago
yep - re-adding stuff in stages, tweaking, changing, updating and bug-fixing 
every section so that is deliberate :)

Original comment by aoumi83@gmail.com on 19 Mar 2011 at 5:26

GoogleCodeExporter commented 8 years ago

Original comment by aoumi83@gmail.com on 19 Mar 2011 at 5:26