[Question] Reading Error Logs

Started by Magikaas, July 14, 2014, 11:04:00 AM

Previous topic - Next topic

Magikaas

I am making a mod, but the game now crashes when I start it up. Now I don't mind this at all, since I've apparently done something wrong in either my code or my defs.

But I can't figure out exactly where I made a mistake.

Does anyone have any tips or information on how I should read this file?

I have tried to figure out where I should look at this file to find out where in code it crashed, what file was missing or what invalid value caused it.

superpirson

The game crashes when you start it, as in you never see the menue?
First off, what does your mod look like?  Are there many Assemblies, and do they add a lot? What I would recomend is downloading another mod as a reference, and looking at that mod's source code. As far as I know,  Def errors should never cause the game to fail loading into the main menu, though they can cause problems once you start a game.
Do you know about the in-game console?
specs: mid2009 MBP OSX 10.9.3 NVIDIA GeForce 9400M 256 MB

Magikaas

#2
Quote from: superpirson on July 14, 2014, 11:51:42 AM
The game crashes when you start it, as in you never see the menue?
First off, what does your mod look like?  Are there many Assemblies, and do they add a lot? What I would recomend is downloading another mod as a reference, and looking at that mod's source code. As far as I know,  Def errors should never cause the game to fail loading into the main menu, though they can cause problems once you start a game.
Do you know about the in-game console?
I have one dll. I have made my mod looking at other mods for information.

I have a few textures, I can see them all loaded in the log.

I do not get to the menu at all, it pops up a messagebox saying the game has crashed, referencing the error logs.

superpirson

Could you post the error log.
Also, again, do you know about the in-game console. It won't help you now, but it will be hugely important in a bit.
specs: mid2009 MBP OSX 10.9.3 NVIDIA GeForce 9400M 256 MB

Magikaas

Quote from: superpirson on July 14, 2014, 12:05:29 PM
Could you post the error log.
Also, again, do you know about the in-game console. It won't help you now, but it will be hugely important in a bit.

Ah, I know about it, I saw it when I first loaded my mod, in the top left, if we are on the same page.

Otherwise, probably not?

Output log file

Evul

Non platform assembly: data-0B935300 (this message is harmless)
Crash!!!

As i understand from your text you are writing a dll mod am i right?
And if so have you made the game files as assembly for your mod dll?

Magikaas

#6
Quote from: Evul on July 14, 2014, 12:20:47 PM
Non platform assembly: data-0B935300 (this message is harmless)
Crash!!!

As i understand from your text you are writing a dll mod am i right?
And if so have you made the game files as assembly for your mod dll?

Good point... I believe so? I added the files to my visual studio project to be able to use autocomplete, I guess I may have missed something then. Let me check that again.

Edit:
I have added the dlls as 'Reference' to the project in Visual Studio. Is that what you mean?

superpirson

I cannot read the log file. could you try and re-upload/paste as text?
what Evul is asking is what you are adding in your "assemblies" folder.
if that folder contains more than your assembly, such as things like system.dll, that could screw things up.

edit: actually, would you be ok with just uploading your entire working copy of the mod?
specs: mid2009 MBP OSX 10.9.3 NVIDIA GeForce 9400M 256 MB

Magikaas

Quote from: superpirson on July 14, 2014, 12:32:26 PM
I cannot read the log file. could you try and re-upload/paste as text?
what Evul is asking is what you are adding in your "assemblies" folder.
if that folder contains more than your assembly, such as things like system.dll, that could screw things up.

Well derp, I added the pdb file... I removed that and now it startd up.

Now I'm going to test if things work.

I feel stupid... Lol

Output Log anyway :P

superpirson

the .pdb file should NOT cause the game to crash, in fact, it should really help in debugging. (it's basically a list of where everything is in your code, so when you have a problem the game can tell you where that problem came from)
specs: mid2009 MBP OSX 10.9.3 NVIDIA GeForce 9400M 256 MB

Magikaas

Quote from: superpirson on July 14, 2014, 12:43:46 PM
the .pdb file should NOT cause the game to crash, in fact, it should really help in debugging. (it's basically a list of where everything is in your code, so when you have a problem the game can tell you where that problem came from)

If I add the file to the Assemblies folder, the game does not start, if I don't add it, it starts and I can start up a map. There are still some more messages, but at least now I sort of know where to look. With the ingame console.

Magikaas

My error message right now is that it can't find the method "get_CurrentManagedThreadId" (the __DynamicallyInvokable get-method)

It's throwing a MissingMethodException for this method.

The stackTrace is:

System.Environment.get_CurrentManagedThreadId
at Mod.BuildingName.AllSlotCells ()
at RimWorld.SlotGroup.get_Cells ()
at RimWorld.SlotGroup+<GetEnumerator>c__Iterator72.MoveNext ()
at RimWorld.SlotGroupManager.AddGroup (Rimworld.SlotGroup newGroup)
at RimWorld.SlotGroup..ctor (SlotGroupParent parent)
at Mod.BuildingName.SpawnSetup ()
at Verse.GenSpawn.Spawn (Verse.Thing newThing, IntVec3 loc, IntRot rot)
at RimWorld.Frame.CompleteConstruction ()
at RimWorldJobDriver_ConstructFinishFrame+<MakeNewToils>c__Iterator18.<>m__3D ()
at Verse.AI.JobDriver.DriverTick ()

The Trace it shows on the right when I click on the Console message:

Verse.Log:Error(String)
Verse.AI.JobDriver:DriverTick()
Verse.AI.Pawn_JobTracker:JobTrackerTick()
Verse.Pawn:Tick()
Verse.TickList.SingleTick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdated()
Verse.Map:MapUpdate()
VerseBase.RootMap:Update()

I've looked at the AllSlotCells function.

I yield this.position (an IntVec3) and then yield break, to break it out of the foreach, looping through the SlotGroup's cells.

RawCode

you shoud post your dll\defs or add debugging messages to your code and detect exact location of issue self.

also complete stacktrace will be usefull

ThreadID is NATIVE method, you can find it inside native classes or native assemblies.

actual issue triggered at spawn stage

Magikaas

#13
Quote from: RawCode on July 14, 2014, 09:18:34 PM
you shoud post your dll\defs or add debugging messages to your code and detect exact location of issue self.

also complete stacktrace will be usefull

ThreadID is NATIVE method, you can find it inside native classes or native assemblies.

actual issue triggered at spawn stage

I will type the 'full' stack trace when I try again this evening. But the only things I did not type from the console were filename and line number because it was al unknown file at line 0.

With it going wrong on spawn stage, do you mean at the SpawnSetup () method?

I can post my dll and defs this evening too. When I get home again. (In 11 ish hours)

superpirson

The filename and line number data is stored in the .pdb file, to see that, you need to load the pdb.
What is this enumeration code doing? Are you linking something? Are you using a hopper? Need more background.
specs: mid2009 MBP OSX 10.9.3 NVIDIA GeForce 9400M 256 MB