BR#2844 showed up a nest of interrelated bugs in European diplomacy.  They
are now all fixed AFAICT, save one.  European AIs are intended to look at
the trade offers you make, score each item, accept if positive, reject if
invalid or unacceptable, or try to prune out enough items to make it
worthwhile for them and make a counter offer.  However ATM when a
counter offer occurs, the attempt to redisplay the NegotiationDialog
(formerly DiplomaticTradeDialog but that had become a misleading name)
crashes deep in the size calculation code.

Looking at NegotiationDialog, its main panel is defined as:

        MigPanel panel = new MigPanel(new MigLayout("wrap 3",
                "[200, fill][300, fill][200, fill]", ""));

Since these fixed sizes are implicated in the crash, we could try to fix two
things at once by making the dialog scalable.  However just removing the
hardcoded sizes does not prevent the crash.  I am unclear what else to try
at this point.

To reproduce the bug, download the second saved game on BR#2844.  Start it
up, and your selected unit will be a privateer parked north of Curacao.
Trade with them, offering the muskets and lumber for 300 gold.  They will
try to negotiate the price down to 200 gold, but the panel showing that
will crash, so you will never see any response to your offer, but the log
file will contain a nasty crash.

Also, if you think that the NegotiationDialog is possibly the ugliest
panel in FreeCol, you may well be right, and as I wrote most of it, you
now know why I try not to make decisions about how things should look:-).
Feel free to also improve its appearance once it stops crashing.

Cheers,
Mike Pope

Attachment: pgpltD66zvq9E.pgp
Description: OpenPGP digital signature

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Freecol-developers mailing list
Freecol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freecol-developers

Reply via email to