[OpenMap Users] Strange troubles with malloc?

From: Ed MacKerrow <mackerrow_at_lanl.gov>
Date: Tue, 04 Oct 2005 09:51:58 -0600

Dear OpenMap Users,

I am trying to fix a strange bug.

I am creating GUI Components from OpenMap.properties file (modified to add
some of my own menu items).

I am running OpenMap Version 4.6 on Mac OS 10.4 (Tiger) with Java 1.5

Here is the error that I get (note, I am not that interested in the SVG
error, rather the one below it...

ComponentFactory: [com.bbn.openmap.event.NavMouseMode2(13)] created
ComponentFactory: [com.bbn.openmap.event.DistanceMouseMode(14)] created
ComponentFactory: [com.bbn.openmap.event.NullMouseMode(15)] created
ComponentFactory: [com.bbn.openmap.gui.MenuBar(16)] created *** ERROR ***SVG
not added to the Save As options, because Batik was not found in classpath.
ComponentFactory.create: Failed to create
"com.bbn.openmap.image.SVGFormatter - error message: ClassNotFoundException:
com.bbn.openmap.image.SVGFormatter ************* java(19672,0x1935800)
malloc: *** error for object 0x3b3510: incorrect checksum for freed object -
object was probably modified after being freed, break at szone_error to
debug java(19672,0x1935800) malloc: *** set a breakpoint in szone_error to
debug

I have pasted the code that creates MyScenarioMenu. Note that
MyScenarioMenu is created by the PropertyHandler. However, the other
sub-menus and menu items below MyScenarioMenu are created outside the
PropertyHandler (and therefore BeanContext).

package framework.gui.map.components.om_menus.ed_new; import
java.awt.Component; import javax.swing.JFrame; import
com.bbn.openmap.gui.AbstractOpenMapMenu; import
framework.gui.map.components.TapasMapFrame; /** * A main menu, that is a
menu that sits at the highest level in the OpenMap frame, that is used * for
loading, saving, editing <code>Scenario</code> instances. * * * _at_author <A
HREF=Ed">mailto:mackerrow_at_lanl.gov>Ed <mailto:mackerrow_at_lanl.gov>
MacKerrow</A> * Oct 2, 2005 */ public class MyScenarioMenu extends
AbstractOpenMapMenu { private String defaultText = "Scenario";
private Component parent; /** * Create and add menuitems(New, Open,
Edit, Save) for Scenario */ public MyScenarioMenu() { super();
setText(defaultText); add(new MyLoadScenarioMenu(
this) ); add(new MySaveScenarioMenu( this) ); }
public void findAndInit(Object obj){ if( obj instanceof
TapasMapFrame){ this.parent = (JFrame)obj; } } }

package framework.gui.map.components.om_menus.ed_new; import
java.awt.Component; import com.bbn.openmap.gui.AbstractOpenMapMenu; public
class MyLoadScenarioMenu extends AbstractOpenMapMenu{ private String
menuText = "Load..."; Component parent; public
MyLoadScenarioMenu(Component _parent) { super(); this.parent =
_parent; setText(menuText); // add the load via XML
menu item add( new MyLoadXMLScenarioMenuItem( this ) ); } }


The properties file calls to create these classes are:

menuBar.class=com.bbn.openmap.gui.MenuBar
fileMenu.class=framework.gui.map.components.om_menus.ed_new.MyFileMenu
scenarioMenu.class=framework.gui.map.components.om_menus.ed_new.MyScenarioMe
nu
Any suggestions on to why I keep getting this strange malloc error? It
appears that some object is being garbage collected that I later try to
change. I am surely not trying to do this intentionally.

Thanks in advance for your help

Ed


-- 
==================================================================
Ed MacKerrow
T-13, Complex Systems Group, Theoretical Division, Los Alamos National
Laboratory
Mail Stop B-213, Los Alamos, New Mexico  87545
(505) 665-3491 (office),  (505) 690-0549 (cell),  (505)665-3003 (fax)
--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Tue Oct 04 2005 - 12:37:02 EDT

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:07 EDT