惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Forbes - Security
Forbes - Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
L
LangChain Blog
量子位
GbyAI
GbyAI
B
Blog RSS Feed
月光博客
月光博客
人人都是产品经理
人人都是产品经理
腾讯CDC
Recent Announcements
Recent Announcements
Microsoft Azure Blog
Microsoft Azure Blog
I
InfoQ
The Cloudflare Blog
D
Docker
Cyberwarzone
Cyberwarzone
U
Unit 42
NISL@THU
NISL@THU
C
Check Point Blog
B
Blog
大猫的无限游戏
大猫的无限游戏
Cisco Talos Blog
Cisco Talos Blog
Recorded Future
Recorded Future
H
Hackread – Cybersecurity News, Data Breaches, AI and More
J
Java Code Geeks
G
GRAHAM CLULEY
Engineering at Meta
Engineering at Meta
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 叶小钗
P
Proofpoint News Feed
F
Fortinet All Blogs
V
V2EX
T
Threat Research - Cisco Blogs
T
Threatpost
S
SegmentFault 最新的问题
Know Your Adversary
Know Your Adversary
雷峰网
雷峰网
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
博客园 - 司徒正美
P
Privacy & Cybersecurity Law Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
TaoSecurity Blog
TaoSecurity Blog
Latest news
Latest news
Apple Machine Learning Research
Apple Machine Learning Research
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Y
Y Combinator Blog
P
Privacy International News Feed
L
Lohrmann on Cybersecurity
AWS News Blog
AWS News Blog
G
Google Developers Blog
美团技术团队

博客园 - 不老仙翁

DataSet中DataRelation有个小BUG 招聘信息(沈阳) 冥王星归位 宇宙的最初三分种(转) 也谈谈ORM 要看世界杯了 关于软件开发团队的一些思考 程序员需要天真,写在六一 一个足球狂的军规:世界杯女友/老婆准则 这个项目团队能少了谁? 需求中的一例 vs2005中的小bug 继续说需求 vs 2005的中文版终于出来了 大话需求分析中的方法论(4) 在aspnet中使用wwf的第一个实践 大话需求分析中的方法论(3) 大话需求分析中的方法论(2) 大话需求分析中的方法论(1)
试用mapxtreme 2005 v6.6中的一个问题
不老仙翁 · 2006-06-06 · via 博客园 - 不老仙翁

用mapxtreme 2005 v6.6中的模板建了一个工程,加了一个临时表,加上一些工具,如放大缩小之类的。

在操作了几次放大缩小后,它就不工作了,哪位用过的,知道是什么原因 ?
以下是出错界面

未将对象引用设置到对象的实例。

说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.NullReferenceException: 未将对象引用设置到对象的实例。

源错误:


源文件: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\d8e8a4a2\33210ac3\App_Web_-y-moa2u.0.cs    行: 0

堆栈跟踪:

[NullReferenceException: 未将对象引用设置到对象的实例。]
            MapStateManager.AppStateManager.GetMapObj(String mapAlias) +31
            MapStateManager.AppStateManager.SaveState() +42
            _Default.Page_UnLoad(Object sender, EventArgs e) +11
            System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
            System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +34
            System.Web.UI.Control.OnUnload(EventArgs e) +2065532
            System.Web.UI.Control.UnloadRecursive(Boolean dispose) +267
            System.Web.UI.Page.UnloadRecursive(Boolean dispose) +20
            System.Web.UI.Page.ProcessRequestCleanup() +40
            System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +154
            System.Web.UI.Page.ProcessRequest() +86
            System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +18
            System.Web.UI.Page.ProcessRequest(HttpContext context) +49
            ASP.default_aspx.ProcessRequest(HttpContext context) in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\d8e8a4a2\33210ac3\App_Web_-y-moa2u.0.cs:0
            System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +154
            System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64
            


版本信息: Microsoft .NET Framework 版本:2.0.50727.42; ASP.NET 版本:2.0.50727.42

以下是部份程序

 MapInfo.Data.TableInfoMemTable tblInfoTemp = new MapInfo.Data.TableInfoMemTable("Animation");
        MapInfo.Data.Table tblTemp = MapInfo.Engine.Session.Current.Catalog.GetTable("Animation");
        if (tblTemp != null)
        {
            MapInfo.Engine.Session.Current.Catalog.CloseTable("Animation");
        }
        tblInfoTemp.Columns.Add(MapInfo.Data.ColumnFactory.CreateFeatureGeometryColumn(myMap.GetDisplayCoordSys()));
        tblInfoTemp.Columns.Add(MapInfo.Data.ColumnFactory.CreateStyleColumn());
        tblInfoTemp.Columns.Add(MapInfo.Data.ColumnFactory.CreateStringColumn("显示", 64));    
        tblInfoTemp.Columns.Add(MapInfo.Data.ColumnFactory.CreateStringColumn("编号", 8));
        tblInfoTemp.Columns.Add(MapInfo.Data.ColumnFactory.CreateStringColumn("设备编号", 8));
        tblTemp = MapInfo.Engine.Session.Current.Catalog.CreateTable(tblInfoTemp);
        FeatureLayer lyr = new FeatureLayer(tblTemp);
        myMap.Layers.Add(lyr);
        //以上为创建临时表

        MapInfo.Styles.FontPointStyle _fontSymbol = new MapInfo.Styles.FontPointStyle();
        _fontSymbol.Code = 93;
        _fontSymbol.PointSize = 24;
        _fontSymbol.Color = System.Drawing.Color.Purple;
//        _fontSymbol.Font.Name = "MapInfo Transportation";
        _fontSymbol.Font.Name = "Uniwill";
        _fontSymbol.Font.FontWeight = MapInfo.Styles.FontWeight.Bold;
        _fontSymbol.Angle = -450;

        MapInfo.Styles.FontPointStyle _fontSymbol2 = new MapInfo.Styles.FontPointStyle();
        _fontSymbol2.Code = 94;
        _fontSymbol2.PointSize = 24;
        _fontSymbol2.Color = System.Drawing.Color.Purple;
        _fontSymbol2.Font.Name = "Uniwill";
        _fontSymbol2.Font.FontWeight = MapInfo.Styles.FontWeight.Bold;
        _fontSymbol2.Angle = 900;

        //以上为创建点样式
       
        FeatureGeometry pt3 = new MapInfo.Geometry.Point(lyr.CoordSys, new DPoint(x, y)) as FeatureGeometry;
        MapInfo.Styles.CompositeStyle cs3 = new MapInfo.Styles.CompositeStyle(new MapInfo.Styles.SimpleVectorPointStyle(20, System.Drawing.Color.Red, 10));
               
        MapInfo.Data.Feature ftr3 = new MapInfo.Data.Feature(tblTemp.TableInfo.Columns);
        ftr3.Geometry = pt3;
        cs3.SymbolStyle = _fontSymbol;
       
        ftr3.Style = cs3;
       
        ftr3["编号"] = "辽A12345";
        ftr3["设备编号"] = "1391234567";
        ftr3["显示"] = ftr3["编号"] + "\n" + ftr3["设备编号"];

        FeatureGeometry pt2 = new MapInfo.Geometry.Point(lyr.CoordSys, new DPoint(x + 0.02, y + 0.02)) as FeatureGeometry;
        MapInfo.Styles.CompositeStyle cs2 = new MapInfo.Styles.CompositeStyle(new MapInfo.Styles.SimpleVectorPointStyle(20, System.Drawing.Color.Red, 10));
        MapInfo.Data.Feature ftr2 = new Feature(tblTemp.TableInfo.Columns);
        ftr2.Geometry = pt2;
        cs2.SymbolStyle = _fontSymbol2;
        ftr2.Style = cs2;
        ftr2["编号"] = "辽A12345";
        ftr2["设备编号"] = "1391234567";
        ftr2["显示"] = ftr3["编号"] + "\n" + ftr3["设备编号"];
        
        //以上为创建点

        //显示点
        tblTemp.InsertFeature(ftr3);
        tblTemp.InsertFeature(ftr2);


        MapInfo.Styles.TextStyle _textSymbol = new MapInfo.Styles.TextStyle();
        _textSymbol.Font.ForeColor = Color.Red;
        _textSymbol.Font.Size = 8;
        LabelLayer txtlayer = new LabelLayer();
        myMap.Layers.Add(txtlayer);
        LabelSource source = new LabelSource(MapInfo.Engine.Session.Current.Catalog.GetTable("Animation"));
        source.DefaultLabelProperties.Caption = "显示";
        source.DefaultLabelProperties.Style = _textSymbol;
        txtlayer.Sources.Append(source);