RELEASED [SMAPI] Extended Minecart 1.8.1

Minecarts on your farm and in the desert!

  1. Entoarox

    Entoarox Oxygen Tank

    System.IO.FileNotFoundException: Could not load file or assembly 'EntoaroxFramework, Version=1.7.9.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

    See that there? That is a message telling you to install Entoarox Framework, since you know... this mod requires that? :zzz:
     
    • chosenbyfew

      chosenbyfew Void-Bound Voyager

      Hey Entoarox,

      First of all, love your work. Big kudos. Can't even play the game without Extended Minecart.

      I've been having the same null reference exception on MenuEvents.MenuChanged events that copperhamster has been having. Running Extended Minecart 1.6.5 with Entoarox Framework 1.7.9 and SMAPI 1.13.1 on SDV 1.2.30. Log attached. There's a ton of BS in there because I have 23 mods and some print to the console way too much, but there's two key points I want to focus on:

      1) This section: (clipped) resulting in, obviously, not changing the Desert map or the Beach map.
      [21:25:20 ERROR Extended Minecart] Could not patch the Desert due to a unknown error
      An item with the same key has already been added.
      [21:25:21 ERROR Extended Minecart] Could not patch the Beach due to a unknown error
      An item with the same key has already been added.​
      I couldn't tell you what causes it, since it's the first time I've seen it, but I definitely know I have no other mods affecting the Desert map or the Beach map, not even xnb edits. (Unless modding the skull cavern counts toward editing the Desert, or placing items affected by Pathoschild's Automate on the Beach map counts toward editing it.)
      -Case in point: when I loaded the game back up while writing this to test and see when error #2 actually proc'd, this error didn't happen. Don't you love intermittent bugs?

      2) The same one copperhamster called out:
      [21:31:32 ERROR SMAPI] A mod failed handling the MenuEvents.MenuChanged event:
      System.NullReferenceException: Object reference not set to an instance of an object.
      at Entoarox.ExtendedMinecart.ExtendedMinecart.MenuEvents_MenuChanged(Object s, EventArgs e)
      at StardewModdingAPI.Framework.InternalExtensions.SafelyRaiseGenericEvent[TEventArgs](IMonitor monitor, String name, IEnumerable`1 handlers, Object sender, TEventArgs args) in D:\source\_Stardew\SMAPI\src\StardewModdingAPI\Framework\InternalExtensions.cs:line 81​
      Because having two monitors helps for checking terminals while fullscreened, I can pinpoint a few things that cause this:
      a) Activating the TV in your farmhouse.
      b) Clicking the Queen of Sauce show option.
      c) Advancing to the next dialog of the Queen of Sauce show.
      b/c caveat: The dialog the pops up showing you got a new recipe does NOT cause a failed handling.
      d) Milking an animal that has no milk/does not produce milk.
      e) Talking to a villager. (Whenever you open a dialog with them, not just the first time in a day)
      f) Inspecting an object.
      There are plenty of interactions that I haven't tested, but as far as I can tell, it's the main dialog windows that pop up, the ones that pause gameplay - whether they have choices or not.
      An initial idea I have is that maybe it's how you made the check to see if the dialog being opened is the minecart one, so that you could instead your custom minecart dialog? I might be way off, but your custom minecart dialog is one of only two dialog windows I've found that doesn't cause that error. (The other being the dialog that tells you you learned a recipe when you're watching the Queen of Sauce show.)
      EDIT: The dialog that pops up when you try to eat something doesn't proc the error either.
      EDIT2: Any dialogs that happen during festivals do not proc the error. (In point of fact, they don't proc anything from any mod I have installed, particularly Part of the Community...?)
       

        Attached Files:

        Last edited: May 30, 2017
      • Oblitus

        Oblitus Scruffy Nerf-Herder

        Let's see...


        Code:
          if (Game1.activeClickableMenu == null || !(Game1.activeClickableMenu is DialogueBox) || !Game1.currentLocation.lastQuestionKey.Equals("Minecart"))
          return;
        
        Specifically, this:
        Game1.currentLocation.lastQuestionKey.Equals("Minecart")

        Later on, you are doing this:
        Code:
              if (Game1.currentLocation != null)
                Game1.currentLocation.lastQuestionKey = (string) null;
        
        So both Game1.currentLocation and Game1.currentLocation.lastQuestionKey can be null. Here we go, two possible NPEs for the price of one. This is more than a real problem since there is a drawObjectDialogue function for non-question dialogues, which creates the same DialogueBox, but without setting lastQuestionKey.
         
        • Foxy Boxes

          Foxy Boxes Big Damn Hero

          EDIT: After trawling through the updates, it appears the mod requires EntoFramework (thanks for making that clear :/ ). Installing that fixed it.

          See that there? That is a message telling you I figured that out and it fixed it, although it isn't clearly spelled out it's required (except in the error message) :p
           
          • Foxy Boxes

            Foxy Boxes Big Damn Hero

            Still having the problem with nothing responding until I click after using the menu (even if you back out rather than travel). Console keeps screaming:
             
            • kaori123

              kaori123 Space Hobo

              Yes Sir!!! Its happening to me too , I got all the requirements etc, but in smapi it telling me errors like foxy boxes having :
              [09:09:34 ERROR SMAPI] A mod failed handling the MenuEvents.MenuChanged event:
              System.NullReferenceException: Object reference not set to an instance of an object.
              at Entoarox.ExtendedMinecart.ExtendedMinecart.MenuEvents_MenuChanged(Object s, EventArgs e)
              at StardewModdingAPI.Framework.InternalExtensions.SafelyRaiseGenericEvent[TEventArgs](IMonitor monitor, String name, IEnumerable`1 handlers, Object sender, TEventArgs args) in D:\source\_Stardew\SMAPI\src\StardewModdingAPI\Framework\InternalExtensions.cs:line 79


              Help is really needed , now i think my game is glitchy because of that error.
               
              • copperhamster

                copperhamster Void-Bound Voyager

                Got the can't patch beach error again. Error log attached.
                Reloaded after exiting and I did not get the error.
                [18:34:01 ERROR Extended Minecart] Could not patch the Beach due to a unknown error
                An item with the same key has already been added.
                at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
                at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
                at Microsoft.Xna.Framework.Content.ContentManager.Load[T](String assetName)
                at StardewValley.LocalizedContentManager.Load[T](String assetName)
                at Entoarox.Framework.SmartContentManager.Load[T](String assetName) in d:\documents\visual studio 2015\Projects\StardewMods\Framework\Internal\SmartContentManager.cs:line 32
                at xTile.Display.XnaDisplayDevice.LoadTileSheet(TileSheet tileSheet)
                at xTile.Map.LoadTileSheets(IDisplayDevice displayDevice)
                at Entoarox.ExtendedMinecart.ExtendedMinecart.GameEvents_UpdateTick(Object s, EventArgs e)
                 

                  Attached Files:

                • chosenbyfew

                  chosenbyfew Void-Bound Voyager

                  Hey Ento, I'm back!

                  I've attached another log with another error message. I think I already posted this one to the Entoarox Framework thread, but I've done some more testing, and I found that it doesn't happen when Extended Minecart isn't installed. It also doesn't happen if it's the >3rd time I try to load the game since I've booted my system, so it's a) not a huge deal, and b) confusing as to why it's related to game-load-attempts-per-system-boot. Let me know if there's any other information I could provide you with or anything you need me to do, or whatever. Thanks for looking into it.
                   

                    Attached Files:

                  • Entoarox

                    Entoarox Oxygen Tank

                    The area this issue occurs in is completely changed in EF 2.0, once Pathos finishes his end of the work I can release it, and we can see if the issue persists despite everything being completely different at its core.
                     
                      chosenbyfew likes this.
                    • zanderb22

                      zanderb22 Title Not Found

                      Can you add farmcave to the supported areas for minecart??

                      OR

                      An option to have multiple minecarts on the farm??

                      Or both?


                      pathoschild said I should ask that here. I want to add a minecart to either the farmcave or a "cave" hidden somewhere on the main farm map (so 2 minecarts on the farm) if possible.
                       
                      • Entoarox

                        Entoarox Oxygen Tank

                        The carts have been explicitly ordered so that they fill in blank areas in the vanilla game where a cart fits, I cant think of any reason to need a second cart on the farm, nor one in the cave with its relative distance to the farm :S
                         
                        • zanderb22

                          zanderb22 Title Not Found

                          I forgot to say I am making a new farm map which has a larger map and places the cave somewhere else in the south and extends it with a quarry thats why I want it

                          If you could just add support for travel to farm cave or more than 1 location on the farm it would be great
                           
                          • Xuomi

                            Xuomi Phantasmal Quasar

                            Edit3: Looks like these errors are a consistent problem with other users too. Whoopsies! Placing under a spoiler warning due to length and repetitiveness.

                            Hey @Entoarox!

                            I started using Extended Minecart today, and while playing around I received this error report after clicking the zoom in button on my UI:
                            Code:
                            [20:32:55 ERROR SMAPI] A mod failed handling the MenuEvents.MenuChanged event:
                            System.NullReferenceException: Object reference not set to an instance of an object.
                               at Entoarox.ExtendedMinecart.ExtendedMinecart.MenuEvents_MenuChanged(Object s, EventArgs e)
                               at StardewModdingAPI.Framework.InternalExtensions.SafelyRaiseGenericEvent[TEventArgs](IMonitor monitor, String name, IEnumerable`1 handlers, Object sender, TEventArgs args) in D:\source\_Stardew\SMAPI\src\StardewModdingAPI\Framework\InternalExtensions.cs:line 64
                            [20:32:58 ERROR SMAPI] A mod failed handling the MenuEvents.MenuChanged event:
                            System.NullReferenceException: Object reference not set to an instance of an object.
                               at Entoarox.ExtendedMinecart.ExtendedMinecart.MenuEvents_MenuChanged(Object s, EventArgs e)
                               at StardewModdingAPI.Framework.InternalExtensions.SafelyRaiseGenericEvent[TEventArgs](IMonitor monitor, String name, IEnumerable`1 handlers, Object sender, TEventArgs args) in D:\source\_Stardew\SMAPI\src\StardewModdingAPI\Framework\InternalExtensions.cs:line 64
                            [20:33:01 ERROR SMAPI] A mod failed handling the MenuEvents.MenuChanged event:
                            System.NullReferenceException: Object reference not set to an instance of an object.
                               at Entoarox.ExtendedMinecart.ExtendedMinecart.MenuEvents_MenuChanged(Object s, EventArgs e)
                               at StardewModdingAPI.Framework.InternalExtensions.SafelyRaiseGenericEvent[TEventArgs](IMonitor monitor, String name, IEnumerable`1 handlers, Object sender, TEventArgs args) in D:\source\_Stardew\SMAPI\src\StardewModdingAPI\Framework\InternalExtensions.cs:line 64
                            After receiving that error report, I couldn't pick up any objects for a few seconds before I was able to do so again.

                            I went to sleep for the next day and attended one of the winter Festivals. After talking to Willy and being given a Yes/No dialogue option, I received this error report repeating until I closed the game:
                            Code:
                            [20:39:32 ERROR SMAPI] A mod failed handling the MenuEvents.MenuChanged event:
                            System.NullReferenceException: Object reference not set to an instance of an object.
                               at Entoarox.ExtendedMinecart.ExtendedMinecart.MenuEvents_MenuChanged(Object s, EventArgs e)
                               at StardewModdingAPI.Framework.InternalExtensions.SafelyRaiseGenericEvent[TEventArgs](IMonitor monitor, String name, IEnumerable`1 handlers, Object sender, TEventArgs args) in D:\source\_Stardew\SMAPI\src\StardewModdingAPI\Framework\InternalExtensions.cs:line 64
                            I will upload my latest error log for you! I'm not sure if this is a known problem or not. Or maybe I did something wrong on installation.

                            Edit: It seems that I get these error popups any time I talk to a person.

                            Edit2: Now I'm experiencing a CTD error on startup. I haven't changed anything since the last time I played with the previous errors.
                            Code:
                            [02:41:16 ERROR Extended Minecart] Could not patch the Beach due to a unknown error
                            An item with the same key has already been added.
                               at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
                               at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
                               at Microsoft.Xna.Framework.Content.ContentManager.Load[T](String assetName)
                               at StardewValley.LocalizedContentManager.Load[T](String assetName)
                               at Entoarox.Framework.SmartContentManager.Load[T](String assetName) in d:\documents\visual studio 2015\Projects\StardewMods\Framework\Internal\SmartContentManager.cs:line 42
                               at xTile.Display.XnaDisplayDevice.LoadTileSheet(TileSheet tileSheet)
                               at xTile.Map.LoadTileSheets(IDisplayDevice displayDevice)
                               at Entoarox.ExtendedMinecart.ExtendedMinecart.GameEvents_UpdateTick(Object s, EventArgs e)
                            [02:41:16 TRACE Console.Out] gameMode was 'loadingMode (6)', set to 'selectGameScreen (9)'.
                            [02:41:16 ERROR Console.Out] System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
                               at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
                               at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
                               at System.Collections.Generic.List`1.Enumerator.MoveNext()
                               at xTile.Map.LoadTileSheets(IDisplayDevice displayDevice)
                               at StardewValley.Game1.setGraphicsForSeason()
                               at StardewValley.Game1.loadForNewGame(Boolean loadedGame)
                               at StardewValley.SaveGame.<>c.<getLoadEnumerator>b__51_1()
                               at System.Threading.Tasks.Task.InnerInvoke()
                               at System.Threading.Tasks.Task.Execute()
                            Uploading a second log file for you.
                             

                              Attached Files:

                              Last edited: Jul 8, 2017
                            • Lowcard

                              Lowcard Aquatic Astronaut

                              ^I'm getting the same errors and the mod seems very buggy. For instance I have to click after selecting a destination otherwise I'm stuck on a black screen and I've had the game randomly crash when trying to load my file in the menu. SMAPI also says it uses deprecated code.
                               
                              • Entoarox

                                Entoarox Oxygen Tank

                                This is a known issue since the changes in 1.2, but the more immediate issues with EF have my priority, and unfortunately, real life is taking a lot of my time atm.
                                 
                                  Xuomi likes this.
                                • LogistikCZ

                                  LogistikCZ Orbital Explorer

                                  When i give emily a gift i got an error. And when i teleport to some location i got black screen after i left click it dissapears and i can play normally.
                                   

                                    Attached Files:

                                  • Entoarox

                                    Entoarox Oxygen Tank

                                    known issue with the current release version, should be fixed in the EF2.0-compatible build
                                     
                                    • zanderb22

                                      zanderb22 Title Not Found

                                      Can you add support for warping to the farmcave
                                       
                                      • ascaron809

                                        ascaron809 Void-Bound Voyager

                                        Hi,
                                        love your mod but right now I have a problem with it. I tried to hatch a chick in a deluxe coop and the game keeps asking me for a name all over again. SMAPI says something about your mod. So I think there may be a problem. Could you help me?

                                        Code:
                                        [SMAPI] A mod failed handling the MenuEvents.MenuChanged event:
                                        System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
                                           bei Entoarox.ExtendedMinecart.ExtendedMinecart.MenuEvents_MenuChanged(Object s, EventArgs e)
                                           bei StardewModdingAPI.Framework.InternalExtensions.SafelyRaiseGenericEvent[TEventArgs](IMonitor monitor, String name, IEnumerable`1 handlers, Object sender, TEventArgs args) in C:\source\_Stardew\SMAPI\src\SMAPI\Framework\InternalExtensions.cs:Zeile 65.
                                        Edit: Okay, maybe I'm wrong. I removed your mod a now the same thing happens without and error log in SMAPI. :(
                                         

                                          Attached Files:

                                        • Entoarox

                                          Entoarox Oxygen Tank

                                          Small location directly adjacent to the farm, no point in adding one.
                                          The error you show is a known issue that has been happening due to unreliable execution order in SDV - The EF 2.0 compatible beta version should hopefully fix it, but even then no guarantees :(
                                           

                                          Share This Page