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

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
H
Hacker News: Front Page
P
Palo Alto Networks Blog
T
ThreatConnect
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
T
True Tiger Recordings
P
Privacy & Cybersecurity Law Blog
B
Blog
IT之家
IT之家
Last Week in AI
Last Week in AI
F
Full Disclosure
Hacker News: Ask HN
Hacker News: Ask HN
C
Comments on: Blog
Microsoft Azure Blog
Microsoft Azure Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Microsoft Security Blog
Microsoft Security Blog
博客园 - 【当耐特】
N
News and Events Feed by Topic
NISL@THU
NISL@THU
腾讯CDC
雷峰网
雷峰网
Security Latest
Security Latest
李成银的技术随笔
M
Microsoft Research Blog - Microsoft Research
L
LangChain Blog
L
Lohrmann on Cybersecurity
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Check Point Blog
Y
Y Combinator Blog
Recent Announcements
Recent Announcements
博客园 - Franky
N
News | PayPal Newsroom
V
V2EX
A
About on SuperTechFans
The Register - Security
The Register - Security
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google Online Security Blog
Google Online Security Blog
MyScale Blog
MyScale Blog
Cisco Talos Blog
Cisco Talos Blog
Vercel News
Vercel News
WordPress大学
WordPress大学
C
Cyber Attacks, Cyber Crime and Cyber Security
The Hacker News
The Hacker News
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
爱范儿
爱范儿
A
Arctic Wolf
L
LINUX DO - 最新话题
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

博客园 - 不老仙翁

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);