Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPE on attempting to place a parcel (with MedievalCities active?) #23

Closed
Cervator opened this issue Sep 9, 2016 · 3 comments
Closed
Labels
Type: Bug Issues reporting and PRs fixing problems

Comments

@Cervator
Copy link
Member

Cervator commented Sep 9, 2016

Catching back up on testing new modules. Enabled TutorialDynamicCities (and its dependencies) along with MedievalCities. After a few moments in-game I got the error below. Uncertain if it is from having the extras of the tutorial module active or the medieval buildings added.

Worth noting that I first tried without MC yet spawned somewhere without a city visible (not very flat). Second attempt with MC added crashed almost immediately, but not quite (10-20 seconds?). Third attempt still including MC worked fine, again didn't spawn me near a city (hilly again) but I flew around until I found one and it was looking fine. Maybe something related to the early phase of a city vs. the player having just spawned with a limited number of chunks available?

22:45:50.440 [main] INFO  o.t.w.b.internal.BlockManagerImpl - Registered Block core:RedShroom with id 114
22:45:50.452 [main] INFO  o.t.e.systems.StorageHandlerLibrary - Registered new StorageComponentHandler org.terasology.economy.handler.InfiniteStorageHandler
22:45:50.467 [main] INFO  o.t.e.systems.StorageHandlerLibrary - Registered new StorageComponentHandler org.terasology.dynamicCities.economy.PopulationStorageHandler
22:45:50.482 [main] INFO  o.t.e.systems.StorageHandlerLibrary - Registered new StorageComponentHandler org.terasology.economy.handler.MultiInvStorageHandler
22:45:50.484 [main] INFO  o.t.d.population.CultureComponent - Obtaining culture prefabs...
22:45:50.498 [main] INFO  o.t.d.population.CultureComponent - Finished loading cultures: 2 culture types found: [develop clan, Medieval Society]
22:45:50.498 [main] INFO  o.t.d.districts.DistrictManager - Obtaining district prefabs...
22:45:50.498 [main] INFO  o.t.d.districts.DistrictManager - Finished loading districts: 6 district types found: [residential, City Center, commercial, city center, residential, commercial]
22:45:50.498 [main] INFO  o.t.d.buildings.BuildingManager - Loading building assets
22:45:50.499 [main] INFO  o.t.d.buildings.BuildingManager - Loaded building prefab MedievalCities:smallHut
22:45:50.501 [main] INFO  o.t.d.buildings.BuildingManager - StructuredTemplate MedievalCities:houseTemplate01 loaded successfully.
22:45:50.501 [main] INFO  o.t.d.buildings.BuildingManager - StructuredTemplate MedievalCities:ShopTemplate01 loaded successfully.
22:45:50.502 [main] INFO  o.t.d.buildings.BuildingManager - Loaded building prefab TutorialDynamicCity:townHall
22:45:50.502 [main] INFO  o.t.d.buildings.BuildingManager - StructuredTemplate MedievalCities:smallHouseTemplate02 loaded successfully.
22:45:50.502 [main] INFO  o.t.d.buildings.BuildingManager - StructuredTemplate TutorialDynamicCity:testTemplate loaded successfully.
22:45:50.502 [main] INFO  o.t.d.buildings.BuildingManager - Loaded building prefab MedievalCities:stable
22:45:50.502 [main] INFO  o.t.d.buildings.BuildingManager - Loaded building prefab MedievalCities:market
22:45:50.502 [main] INFO  o.t.d.buildings.BuildingManager - StructuredTemplate MedievalCities:smallHouseTemplate03 loaded successfully.
22:45:50.502 [main] INFO  o.t.d.buildings.BuildingManager - StructuredTemplate MedievalCities:smallShopTemplate01 loaded successfully.
22:45:50.502 [main] INFO  o.t.d.buildings.BuildingManager - Loaded building prefab TutorialDynamicCity:marketPlace
22:45:50.503 [main] INFO  o.t.d.buildings.BuildingManager - StructuredTemplate MedievalCities:stableTemplate loaded successfully.
22:45:50.503 [main] INFO  o.t.d.buildings.BuildingManager - Loaded building prefab MedievalCities:house02
22:45:50.503 [main] INFO  o.t.d.buildings.BuildingManager - Loaded building prefab MedievalCities:house01
22:45:50.503 [main] INFO  o.t.d.buildings.BuildingManager - StructuredTemplate MedievalCities:guardTowerTemplate02 loaded successfully.
22:45:50.503 [main] INFO  o.t.d.buildings.BuildingManager - Loaded building prefab MedievalCities:smallHouse01
22:45:50.503 [main] INFO  o.t.d.buildings.BuildingManager - Loaded building prefab TutorialDynamicCity:residentialHouse
22:45:50.503 [main] INFO  o.t.d.buildings.BuildingManager - StructuredTemplate MedievalCities:smallHouseTemplate01 loaded successfully.
22:45:50.503 [main] INFO  o.t.d.buildings.BuildingManager - Loaded building prefab TutorialDynamicCity:Blacksmith
22:45:50.504 [main] INFO  o.t.d.buildings.BuildingManager - StructuredTemplate MedievalCities:smallHutTemplate01 loaded successfully.
22:45:50.504 [main] INFO  o.t.d.buildings.BuildingManager - StructuredTemplate MedievalCities:guardTowerTemplate01 loaded successfully.
22:45:50.504 [main] INFO  o.t.d.buildings.BuildingManager - Loaded building prefab TutorialDynamicCity:simpleChurch
22:45:50.504 [main] INFO  o.t.d.buildings.BuildingManager - Loaded building prefab MedievalCities:bigShop01
22:45:50.505 [main] INFO  o.t.d.buildings.BuildingManager - StructuredTemplate MedievalCities:bigShopTemplate01 loaded successfully.
22:45:50.505 [main] INFO  o.t.d.buildings.BuildingManager - StructuredTemplate MedievalCities:marketTemplate loaded successfully.
22:45:50.505 [main] INFO  o.t.d.buildings.BuildingManager - Loaded building prefab MedievalCities:smallHouse03
22:45:50.505 [main] INFO  o.t.d.buildings.BuildingManager - StructuredTemplate MedievalCities:houseTemplate02 loaded successfully.
22:45:50.505 [main] INFO  o.t.d.buildings.BuildingManager - Loaded building prefab MedievalCities:shop01
22:45:50.505 [main] INFO  o.t.d.buildings.BuildingManager - Loaded building prefab MedievalCities:smallShop01
22:45:50.505 [main] INFO  o.t.d.buildings.BuildingManager - StructuredTemplate TutorialDynamicCity:smithyTemplate loaded successfully.
22:45:50.505 [main] INFO  o.t.d.buildings.BuildingManager - Loaded building prefab MedievalCities:smallHouse02
22:45:50.506 [main] INFO  o.t.d.buildings.BuildingManager - StructuredTemplate MedievalCities:guardTowerTemplate03 loaded successfully.
22:45:50.506 [main] INFO  o.t.d.buildings.BuildingManager - Finished loading buildings. Number of building types: 16 | Strings found: [commercial, residential, clerical, governmental]
22:45:51.538 [main] INFO  o.t.w.b.internal.BlockManagerImpl - Registered BlockFamily[core:companion]
22:45:51.538 [main] INFO  o.t.w.b.internal.BlockManagerImpl - Registered Block core:companion with id 115
22:45:51.541 [main] INFO  o.t.w.b.internal.BlockManagerImpl - Registered BlockFamily[core:brick:engine:stair]
22:45:51.542 [main] INFO  o.t.w.b.internal.BlockManagerImpl - Registered Block core:brick:engine:stair.LEFT with id 116
22:45:51.542 [main] INFO  o.t.w.b.internal.BlockManagerImpl - Registered Block core:brick:engine:stair.RIGHT with id 117
22:45:51.542 [main] INFO  o.t.w.b.internal.BlockManagerImpl - Registered Block core:brick:engine:stair.FRONT with id 118
22:45:51.542 [main] INFO  o.t.w.b.internal.BlockManagerImpl - Registered Block core:brick:engine:stair.BACK with id 119
22:45:51.544 [main] INFO  o.t.w.b.internal.BlockManagerImpl - Registered BlockFamily[core:Tnt]
22:45:51.544 [main] INFO  o.t.w.b.internal.BlockManagerImpl - Registered Block core:Tnt with id 120
22:45:51.547 [main] INFO  o.t.w.b.internal.BlockManagerImpl - Registered BlockFamily[core:brick]
22:45:51.547 [main] INFO  o.t.w.b.internal.BlockManagerImpl - Registered Block core:brick with id 121
22:46:10.200 [main] INFO  o.t.logic.console.ConsoleImpl - [CONSOLE] Welcome to the wonderful world of Terasology!

Type 'help' to see a list with available commands or 'help <commandName>' for command details.
Text parameters do not need quotes, unless containing spaces. No commas between parameters.
You can use auto-completion by typing a partial command then hitting [tab] - examples:

gh + [tab] => 'ghost'
help gh + [tab] => 'help ghost' (can auto complete commands fed to help)
giv + [tab] => 'giveBlock giveItem givePermission' (use [tab] again to cycle between choices)
lS + [tab] => 'listShapes' (camel casing abbreviated commands)

22:46:10.709 [main] ERROR o.terasology.engine.TerasologyEngine - Uncaught exception, attempting clean game shutdown
java.lang.NullPointerException: null
    at org.terasology.dynamicCities.settlements.SettlementEntityManager.placeParcel(SettlementEntityManager.java:463)
    at org.terasology.dynamicCities.settlements.SettlementEntityManager.growSettlement(SettlementEntityManager.java:404)
    at org.terasology.dynamicCities.settlements.SettlementEntityManager.update(SettlementEntityManager.java:159)
    at org.terasology.engine.modes.StateIngame.update(StateIngame.java:176)
    at org.terasology.engine.TerasologyEngine.mainLoop(TerasologyEngine.java:413)
    at org.terasology.engine.TerasologyEngine.run(TerasologyEngine.java:368)
    at org.terasology.engine.Terasology.main(Terasology.java:152)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
22:46:10.709 [main] INFO  o.terasology.engine.TerasologyEngine - Shutting down Terasology...
22:46:10.810 [main] INFO  o.t.p.i.ReadWriteStorageManager - Saving - Creating game snapshot
22:46:10.813 [main] INFO  o.t.p.i.ReadWriteStorageManager - Saving - Snapshot created: Writing phase starts
22:46:10.813 [main] INFO  o.t.n.internal.NetworkSystemImpl - Client disconnected: Cervator
22:46:10.816 [main] INFO  o.t.logic.console.ConsoleImpl - [NOTIFICATION] Player "Cervator" has left the game
22:46:10.816 [main] INFO  o.t.n.internal.NetworkSystemImpl - Network shutdown
22:46:12.230 [Saving-0] INFO  o.t.p.internal.SaveTransaction - Save game finished
22:46:17.770 [main] WARN  o.t.rendering.nui.asset.UIFormat - Field 'emptyIcon' not recognized for interface org.terasology.rendering.nui.UIWidget in {"type":"UIIconBar","id":"breathBar","icon":"engine:icons#bubble","family":"breathBar","emptyIcon":"engine:icons#burstBubble","halfIconMode":"shrink","spacing":2,"maxIcons":10,"layoutInfo":{"use-content-width":true,"use-content-height":true,"position-left":{"target":"CENTER"},"position-right":{"target":"RIGHT","widget":"healthBar"},"position-bottom":{"target":"TOP","widget":"healthBar","offset":1}}}
22:46:17.771 [main] WARN  o.t.rendering.nui.asset.UIFormat - Field 'crosshairIcon' not recognized for interface org.terasology.rendering.nui.UIWidget in {"type":"UICrosshair","id":"crosshair","crosshairIcon":"engine:gui#crosshair","layoutInfo":{"use-content-width":true,"use-content-height":true,"position-horizontal-center":{},"position-vertical-center":{}}}
22:46:17.805 [main] WARN  o.t.rendering.nui.skin.UISkinFormat - Failed to resolve UIWidget class UIInputBindButton, skipping style information
java.lang.NullPointerException
    at org.terasology.dynamicCities.settlements.SettlementEntityManager.placeParcel(SettlementEntityManager.java:463)
    at org.terasology.dynamicCities.settlements.SettlementEntityManager.growSettlement(SettlementEntityManager.java:404)
    at org.terasology.dynamicCities.settlements.SettlementEntityManager.update(SettlementEntityManager.java:159)
    at org.terasology.engine.modes.StateIngame.update(StateIngame.java:176)
    at org.terasology.engine.TerasologyEngine.mainLoop(TerasologyEngine.java:413)
    at org.terasology.engine.TerasologyEngine.run(TerasologyEngine.java:368)
    at org.terasology.engine.Terasology.main(Terasology.java:152)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
For more details, see the log files in J:\Dev\Terasology\Git\integrate\Terasology\logs\2016-09-08_22-41-30

Process finished with exit code 0
@Cervator
Copy link
Member Author

Cervator commented Sep 10, 2016

Happened again - sort of? While testing the Alpha 4 candidate via binary. Again there was no city in the immediate vicinity of spawn yet when I got somewhere where a city was meant to grow the game crashed trying to get the city going or so:

22:03:48.703 [main] INFO  o.t.w.b.internal.BlockManagerImpl - Registered Block core:RedShroom with id 83
22:03:48.708 [main] INFO  o.t.e.systems.StorageHandlerLibrary - Registered new StorageComponentHandler org.terasology.economy.handler.InfiniteStorageHandler
22:03:48.710 [main] INFO  o.t.d.buildings.BuildingManager - Loading building assets
22:03:48.710 [main] INFO  o.t.d.buildings.BuildingManager - Finished loading buildings. Number of building types: 0 | Strings found: []
22:03:48.718 [main] INFO  o.t.d.districts.DistrictManager - Obtaining district prefabs...
22:03:48.719 [main] INFO  o.t.d.districts.DistrictManager - Finished loading districts: 0 district types found: []
22:03:48.721 [main] INFO  o.t.e.systems.StorageHandlerLibrary - Registered new StorageComponentHandler org.terasology.dynamicCities.economy.PopulationStorageHandler
22:03:48.730 [main] INFO  o.t.e.systems.StorageHandlerLibrary - Registered new StorageComponentHandler org.terasology.economy.handler.MultiInvStorageHandler
22:03:48.731 [main] INFO  o.t.d.population.CultureComponent - Obtaining culture prefabs...
22:03:48.731 [main] INFO  o.t.d.population.CultureComponent - Finished loading cultures: 0 culture types found: []
22:04:09.718 [main] INFO  o.t.logic.console.ConsoleImpl - [CONSOLE] Welcome to the wonderful world of Terasology!

Type 'help' to see a list with available commands or 'help <commandName>' for command details.
Text parameters do not need quotes, unless containing spaces. No commas between parameters.
You can use auto-completion by typing a partial command then hitting [tab] - examples:

gh + [tab] => 'ghost'
help gh + [tab] => 'help ghost' (can auto complete commands fed to help)
giv + [tab] => 'giveBlock giveItem givePermission' (use [tab] again to cycle between choices)
lS + [tab] => 'listShapes' (camel casing abbreviated commands)

22:04:10.800 [main] INFO  o.t.logic.console.ConsoleImpl - [CONSOLE] Ghost mode toggled
22:04:11.700 [main] INFO  o.t.logic.console.ConsoleImpl - [CONSOLE] High-speed mode activated
22:04:18.959 [main] ERROR o.t.d.population.CultureComponent - No culture found...barbarians...
22:04:19.049 [main] ERROR o.terasology.engine.TerasologyEngine - Uncaught exception, attempting clean game shutdown
java.lang.NullPointerException: null
    at org.terasology.dynamicCities.settlements.components.DistrictFacetComponent.mapDistrictTypes(DistrictFacetComponent.java:124)
    at org.terasology.dynamicCities.settlements.components.DistrictFacetComponent.<init>(DistrictFacetComponent.java:117)
    at org.terasology.dynamicCities.settlements.SettlementEntityManager.createSettlement(SettlementEntityManager.java:212)
    at org.terasology.dynamicCities.settlements.SettlementEntityManager.update(SettlementEntityManager.java:150)
    at org.terasology.engine.modes.StateIngame.update(StateIngame.java:176)
    at org.terasology.engine.TerasologyEngine.mainLoop(TerasologyEngine.java:413)
    at org.terasology.engine.TerasologyEngine.run(TerasologyEngine.java:368)
    at org.terasology.engine.Terasology.main(Terasology.java:152)
22:04:19.049 [main] INFO  o.terasology.engine.TerasologyEngine - Shutting down Terasology...

Edit: Happening repeatedly actually. I wonder if it is because I usually test with ghost and hspeed on meaning I'm often pushing chunk generation. I could probably get within range of a city spot without having all related chunks finished - maybe the city starts up and tries to cover some part of the world that isn't ready yet?

@Cervator
Copy link
Member Author

Oddly on trying to enable MedievalCities it worked first try. Maybe there's some bad combination with the default setup that gets shuffled to where with MC included it works more easily?

@Cervator
Copy link
Member Author

Bump. I just realized after a player report that there is a very obvious No culture found...barbarians... error getting logged without MedievalCities enabled. Great error message by the way :-)

Is there meant to be a default culture defined somewhere in the current dependency tree or did it end up getting moved to MedievalCities yet it wasn't declared as a dependency? Seems like that would fix it.

Pinging @CptCrispyCrunchy and @skaldarnar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issues reporting and PRs fixing problems
Projects
None yet
Development

No branches or pull requests

1 participant