Bug 108 - Crops can transition into invalid growth phases
: Crops can transition into invalid growth phases
Status: CONFIRMED
Product: Salem
Classification: Unclassified
Component: Server
: unspecified
: All All
: --- normal
Assigned To: loftar
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-12-14 08:51 CET by andinuad
Modified: 2013-01-08 00:07 CET (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description andinuad 2012-12-14 08:51:57 CET
Following error appears when I try to enter a certain mine hole with farm fields in it (I have not logged in for several weeks, so the crops are likely ready to be harvested by now and may be the cause behind the crash) (It is happening on both the Vanilla client and Enders Client):

javax.media.opengl.GLException: java.lang.IllegalArgumentException: n must be positive
	at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:271)
	at javax.media.opengl.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:410)
	at javax.media.opengl.GLCanvas.display(GLCanvas.java:244)
	at haven.HavenPanel.uglyjoglhack(HavenPanel.java:383)
	at haven.HavenPanel.run(HavenPanel.java:418)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalArgumentException: n must be positive
	at java.util.Random.nextInt(Unknown Source)
	at haven.res.lib.plants.GrowingPlant.cons(GrowingPlant.java:43)
	at haven.res.lib.plants.GrowingPlant.<init>(GrowingPlant.java:74)
	at haven.res.lib.plants.GrowingPlant$Factory.create(GrowingPlant.java:18)
	at haven.Sprite.create(Sprite.java:107)
	at Fact.create(Fact.java:12)
	at haven.Sprite.create(Sprite.java:107)
	at haven.ResDrawable.init(ResDrawable.java:53)
	at haven.ResDrawable.setup(ResDrawable.java:58)
	at haven.Gob.setup(Gob.java:199)
	at haven.RenderList.setup(RenderList.java:98)
	at haven.RenderList.add(RenderList.java:135)
	at haven.MapView.addgob(MapView.java:339)
	at haven.MapView$4.setup(MapView.java:348)
	at haven.RenderList.setup(RenderList.java:98)
	at haven.RenderList.add(RenderList.java:135)
	at haven.MapView.setup(MapView.java:389)
	at haven.PView$1.setup(PView.java:126)
	at haven.RenderList.setup(RenderList.java:98)
	at haven.RenderList.setup(RenderList.java:123)
	at haven.PView.draw(PView.java:150)
	at haven.MapView.draw(MapView.java:656)
	at haven.Widget.draw(Widget.java:479)
	at haven.Widget.draw(Widget.java:484)
	at haven.GameUI.draw(GameUI.java:355)
	at haven.Widget.draw(Widget.java:479)
	at haven.Widget.draw(Widget.java:484)
	at haven.RootWidget.draw(RootWidget.java:61)
	at haven.UI.draw(UI.java:139)
	at haven.HavenPanel.redraw(HavenPanel.java:271)
	at haven.HavenPanel$1.display(HavenPanel.java:88)
	at com.sun.opengl.impl.GLDrawableHelper.display(GLDrawableHelper.java:78)
	at javax.media.opengl.GLCanvas$DisplayAction.run(GLCanvas.java:435)
	at com.sun.opengl.impl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:194)
	at javax.media.opengl.GLCanvas$DisplayOnEventDispatchThreadAction.run(GLCanvas.java:452)
	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$200(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)
Comment 1 loftar 2012-12-28 03:42:07 CET
This is actually a server bug, not a client bug. The server shouldn't be sending an invalid crop ID to begin with, so the client is "right" to crash when it happens.

I cannot debug it without any means of locating the crops in question, however.
Comment 2 andinuad 2012-12-29 13:02:42 CET
Since the incident, the problem seems to have dissappeared completely. I haven't had a such crash. (Perhaps because the old crops entered a different phase?)

Something odd though: it appears as if the crops regrew instead of staying in "harvest mode" all the time. So I had to wait for the crops to mature again,even though I had been absent for several weeks. Are crops really supposed to revert to earlier stages if you don't harvest quickly enough?
Comment 3 loftar 2013-01-08 00:07:44 CET
There appears to be some weird bug related to farming in general that can cause crops to go into invalid growth phases. I've no clue what causes it yet, but I'll rename this issue and use it to track any progress on it.