<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://www.seatribe.se/bt/bugzilla.dtd">

<bugzilla version="4.2"
          urlbase="http://www.seatribe.se/bt/"
          
          maintainer="fredrik@dolda2000.com"
>

    <bug>
          <bug_id>108</bug_id>
          
          <creation_ts>2012-12-14 08:51:00 +0100</creation_ts>
          <short_desc>Crops can transition into invalid growth phases</short_desc>
          <delta_ts>2013-01-08 00:07:44 +0100</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Salem</product>
          <component>Server</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>CONFIRMED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>---</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>andinuad</reporter>
          <assigned_to name="loftar">fredrik</assigned_to>
          

      

      

      

          <long_desc isprivate="0">
            <commentid>350</commentid>
            <who name="">andinuad</who>
            <bug_when>2012-12-14 08:51:57 +0100</bug_when>
            <thetext>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.&lt;init&gt;(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)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <commentid>368</commentid>
            <who name="loftar">fredrik</who>
            <bug_when>2012-12-28 03:42:07 +0100</bug_when>
            <thetext>This is actually a server bug, not a client bug. The server shouldn&apos;t be sending an invalid crop ID to begin with, so the client is &quot;right&quot; to crash when it happens.

I cannot debug it without any means of locating the crops in question, however.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <commentid>370</commentid>
            <who name="">andinuad</who>
            <bug_when>2012-12-29 13:02:42 +0100</bug_when>
            <thetext>Since the incident, the problem seems to have dissappeared completely. I haven&apos;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 &quot;harvest mode&quot; 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&apos;t harvest quickly enough?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <commentid>384</commentid>
            <who name="loftar">fredrik</who>
            <bug_when>2013-01-08 00:07:44 +0100</bug_when>
            <thetext>There appears to be some weird bug related to farming in general that can cause crops to go into invalid growth phases. I&apos;ve no clue what causes it yet, but I&apos;ll rename this issue and use it to track any progress on it.</thetext>
          </long_desc>
      
      

    </bug>

</bugzilla>