CTD: Changing the prehex sprite
Moderator: Vic
-
JJKettunen
- Posts: 2293
- Joined: Tue Mar 12, 2002 6:00 pm
- Location: Finland
CTD: Changing the prehex sprite
Hi,
There's an editor problem with changing the prehex sprite: it causes a CTD. I tried various combos and the only thing that can prevent it is to activate the special layer first, ie. 64 sprites, which shouldn't be always needed. Below is the error message I get:
System.NullReferenceException: Objektin viittaukseksi ei voi määrittää objektiesiintymää.
kohteessa WindowsApplication1.LandscapeTypeWindowClass.HandleMouseClick(Int32 x, Int32 y, Int32 b)
kohteessa WindowsApplication1.MainEditScreenClass.HandleMouseClick(Int32 x, Int32 y, Int32 b)
kohteessa WindowsApplication1.Form1.Form1_Mousedown(Object sender, MouseEventArgs e)
kohteessa System.Windows.Forms.Control.OnMouseDown(MouseEventArgs e)
kohteessa System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
kohteessa System.Windows.Forms.Control.WndProc(Message& m)
kohteessa System.Windows.Forms.ScrollableControl.WndProc(Message& m)
kohteessa System.Windows.Forms.ContainerControl.WndProc(Message& m)
kohteessa System.Windows.Forms.Form.WndProc(Message& m)
kohteessa WindowsApplication1.ImmoveableForm.WndProc(Message& m)
kohteessa System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
kohteessa System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
kohteessa System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Ladatut kokoonpanot **************
mscorlib
Kokoonpanon versio: 2.0.0.0
Win32-versio: 2.0.50727.4214 (VistaSP2GDR.050727-4200)
Koodikanta: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
WindowsApplication1
Kokoonpanon versio: 1.0.4237.20726
Win32-versio: 1.0.4237.20726
Koodikanta: file:///D:/Matrix%20Games/Advanced%20Tactics%20Gold/AdvancedTacticsGold.exe
----------------------------------------
System.Windows.Forms
Kokoonpanon versio: 2.0.0.0
Win32-versio: 2.0.50727.4214 (VistaSP2GDR.050727-4200)
Koodikanta: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Kokoonpanon versio: 2.0.0.0
Win32-versio: 2.0.50727.4215 (VistaSP2GDR.050727-4200)
Koodikanta: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Kokoonpanon versio: 2.0.0.0
Win32-versio: 2.0.50727.4016 (NetFxQFE.050727-4000)
Koodikanta: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Microsoft.VisualBasic
Kokoonpanon versio: 8.0.0.0
Win32-versio: 8.0.50727.4016 (NetFxQFE.050727-4000)
Koodikanta: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
Microsoft.VisualBasic.resources
Kokoonpanon versio: 8.0.0.0
Win32-versio: 8.0.50727.4016 (NetFxQFE.050727-4000)
Koodikanta: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualBasic.resources/8.0.0.0_fi_b03f5f7f11d50a3a/Microsoft.VisualBasic.resources.dll
----------------------------------------
mscorlib.resources
Kokoonpanon versio: 2.0.0.0
Win32-versio: 2.0.50727.4214 (VistaSP2GDR.050727-4200)
Koodikanta: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
ICSharpCode.SharpZipLib
Kokoonpanon versio: 0.84.0.0
Win32-versio: 0.84.0.0
Koodikanta: file:///D:/Matrix%20Games/Advanced%20Tactics%20Gold/ICSharpCode.SharpZipLib.DLL
----------------------------------------
irrKlang.NET
Kokoonpanon versio: 1.3.0.0
Win32-versio: 1, 1, 0, 0
Koodikanta: file:///D:/Matrix%20Games/Advanced%20Tactics%20Gold/irrKlang.NET.DLL
----------------------------------------
System.Windows.Forms.resources
Kokoonpanon versio: 2.0.0.0
Win32-versio: 2.0.50727.4016 (NetFxQFE.050727-4000)
Koodikanta: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.0.0_fi_b77a5c561934e089/System.Windows.Forms.resources.dll
There's an editor problem with changing the prehex sprite: it causes a CTD. I tried various combos and the only thing that can prevent it is to activate the special layer first, ie. 64 sprites, which shouldn't be always needed. Below is the error message I get:
System.NullReferenceException: Objektin viittaukseksi ei voi määrittää objektiesiintymää.
kohteessa WindowsApplication1.LandscapeTypeWindowClass.HandleMouseClick(Int32 x, Int32 y, Int32 b)
kohteessa WindowsApplication1.MainEditScreenClass.HandleMouseClick(Int32 x, Int32 y, Int32 b)
kohteessa WindowsApplication1.Form1.Form1_Mousedown(Object sender, MouseEventArgs e)
kohteessa System.Windows.Forms.Control.OnMouseDown(MouseEventArgs e)
kohteessa System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
kohteessa System.Windows.Forms.Control.WndProc(Message& m)
kohteessa System.Windows.Forms.ScrollableControl.WndProc(Message& m)
kohteessa System.Windows.Forms.ContainerControl.WndProc(Message& m)
kohteessa System.Windows.Forms.Form.WndProc(Message& m)
kohteessa WindowsApplication1.ImmoveableForm.WndProc(Message& m)
kohteessa System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
kohteessa System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
kohteessa System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Ladatut kokoonpanot **************
mscorlib
Kokoonpanon versio: 2.0.0.0
Win32-versio: 2.0.50727.4214 (VistaSP2GDR.050727-4200)
Koodikanta: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
WindowsApplication1
Kokoonpanon versio: 1.0.4237.20726
Win32-versio: 1.0.4237.20726
Koodikanta: file:///D:/Matrix%20Games/Advanced%20Tactics%20Gold/AdvancedTacticsGold.exe
----------------------------------------
System.Windows.Forms
Kokoonpanon versio: 2.0.0.0
Win32-versio: 2.0.50727.4214 (VistaSP2GDR.050727-4200)
Koodikanta: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Kokoonpanon versio: 2.0.0.0
Win32-versio: 2.0.50727.4215 (VistaSP2GDR.050727-4200)
Koodikanta: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Kokoonpanon versio: 2.0.0.0
Win32-versio: 2.0.50727.4016 (NetFxQFE.050727-4000)
Koodikanta: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Microsoft.VisualBasic
Kokoonpanon versio: 8.0.0.0
Win32-versio: 8.0.50727.4016 (NetFxQFE.050727-4000)
Koodikanta: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
Microsoft.VisualBasic.resources
Kokoonpanon versio: 8.0.0.0
Win32-versio: 8.0.50727.4016 (NetFxQFE.050727-4000)
Koodikanta: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualBasic.resources/8.0.0.0_fi_b03f5f7f11d50a3a/Microsoft.VisualBasic.resources.dll
----------------------------------------
mscorlib.resources
Kokoonpanon versio: 2.0.0.0
Win32-versio: 2.0.50727.4214 (VistaSP2GDR.050727-4200)
Koodikanta: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
ICSharpCode.SharpZipLib
Kokoonpanon versio: 0.84.0.0
Win32-versio: 0.84.0.0
Koodikanta: file:///D:/Matrix%20Games/Advanced%20Tactics%20Gold/ICSharpCode.SharpZipLib.DLL
----------------------------------------
irrKlang.NET
Kokoonpanon versio: 1.3.0.0
Win32-versio: 1, 1, 0, 0
Koodikanta: file:///D:/Matrix%20Games/Advanced%20Tactics%20Gold/irrKlang.NET.DLL
----------------------------------------
System.Windows.Forms.resources
Kokoonpanon versio: 2.0.0.0
Win32-versio: 2.0.50727.4016 (NetFxQFE.050727-4000)
Koodikanta: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.0.0_fi_b77a5c561934e089/System.Windows.Forms.resources.dll
RE: CTD: Changing the prehex sprite
Hi,
thanks for reporting.
Which version are you using 2.08?
best regards,
Vic
thanks for reporting.
Which version are you using 2.08?
best regards,
Vic
Visit www.vrdesigns.net for the latest news, polls, screenshots and blogs on Shadow Empire, Decisive Campaigns and Advanced Tactics
-
JJKettunen
- Posts: 2293
- Joined: Tue Mar 12, 2002 6:00 pm
- Location: Finland
RE: CTD: Changing the prehex sprite
...and a question somewhat related to this problem.
Why is it that an added Landscape Clone, with exactly the same attributes as the original, is not properly drawn on a map? It won't use hex borders properly, but is a strict hexagon. You can test it by making a clone out of Plain landscape, and draw it next to sea hexes. Note the disapperance of proper coastline.
This problem seriously limits designing of new landscapes (unless I'm missing something of course...)
Why is it that an added Landscape Clone, with exactly the same attributes as the original, is not properly drawn on a map? It won't use hex borders properly, but is a strict hexagon. You can test it by making a clone out of Plain landscape, and draw it next to sea hexes. Note the disapperance of proper coastline.
This problem seriously limits designing of new landscapes (unless I'm missing something of course...)
-
JJKettunen
- Posts: 2293
- Joined: Tue Mar 12, 2002 6:00 pm
- Location: Finland
RE: CTD: Changing the prehex sprite
ORIGINAL: Vic
Hi,
thanks for reporting.
Which version are you using 2.08?
best regards,
Vic
2.08 it is.
-
JJKettunen
- Posts: 2293
- Joined: Tue Mar 12, 2002 6:00 pm
- Location: Finland
RE: CTD: Changing the prehex sprite
Btw, the first line of my error message in English is something like:
"Object reference cannot be set to an object."
Dunno if this helps or not. [:D]
"Object reference cannot be set to an object."
Dunno if this helps or not. [:D]
-
JJKettunen
- Posts: 2293
- Joined: Tue Mar 12, 2002 6:00 pm
- Location: Finland
RE: CTD: Changing the prehex sprite
ORIGINAL: Keke
...and a question somewhat related to this problem.
Why is it that an added Landscape Clone, with exactly the same attributes as the original, is not properly drawn on a map? It won't use hex borders properly, but is a strict hexagon. You can test it by making a clone out of Plain landscape, and draw it next to sea hexes. Note the disapperance of proper coastline.
This problem seriously limits designing of new landscapes (unless I'm missing something of course...)
Just to clarify: obviously this problem doesn't limit the amount of new landscape types one can make, but with it the new landscapes can ruin the looks of an ATG-map... (maybe I'm spoiled, eh?)
RE: CTD: Changing the prehex sprite
I think the actual editor bug will be fixed with v2.09 (will try to get that out soon now) but i will check this issue once more. Not sure if i can reproduce though.
The other issue (clunky look) is not a bug but has probably to do with override rules of the new and the other landscapes.
best,
Vic
The other issue (clunky look) is not a bug but has probably to do with override rules of the new and the other landscapes.
best,
Vic
Visit www.vrdesigns.net for the latest news, polls, screenshots and blogs on Shadow Empire, Decisive Campaigns and Advanced Tactics
-
JJKettunen
- Posts: 2293
- Joined: Tue Mar 12, 2002 6:00 pm
- Location: Finland
RE: CTD: Changing the prehex sprite
Cheers!
I did change some of the override rules for new landscapes, but it was perhaps not enough. I'll try again tomorrow. Thanks!
I did change some of the override rules for new landscapes, but it was perhaps not enough. I'll try again tomorrow. Thanks!
-
JJKettunen
- Posts: 2293
- Joined: Tue Mar 12, 2002 6:00 pm
- Location: Finland
RE: CTD: Changing the prehex sprite
ORIGINAL: Vic
The other issue (clunky look) is not a bug but has probably to do with override rules of the new and the other landscapes.
On a second thought (and after several retries) this doesn't explain why an exact landscape clone, with similar override rules, produces those clunky looks. It is simple to reproduce. There is obviously something buggy here.
-
JJKettunen
- Posts: 2293
- Joined: Tue Mar 12, 2002 6:00 pm
- Location: Finland
RE: CTD: Changing the prehex sprite
Illustrating the latter problem. Here is the Island of Hiiumaa before swamp hexes are replaced with an exact landscape clone:


- Attachments
-
- hiiumaa1.jpg (166.24 KiB) Viewed 616 times
-
JJKettunen
- Posts: 2293
- Joined: Tue Mar 12, 2002 6:00 pm
- Location: Finland
RE: CTD: Changing the prehex sprite
Here it is after:


- Attachments
-
- hiiumaa2.jpg (172.97 KiB) Viewed 616 times
-
JJKettunen
- Posts: 2293
- Joined: Tue Mar 12, 2002 6:00 pm
- Location: Finland
RE: CTD: Changing the prehex sprite
A related CTD-crash, when a custom landscape was set to interior drawing style:
System.ArgumentNullException: Arvo ei voi olla Null.
Parametrin nimi: image
kohteessa System.Drawing.Graphics.DrawImage(Image image, Rectangle destRect, Rectangle srcRect, GraphicsUnit srcUnit)
kohteessa WindowsApplication1.DrawMod.DrawSimplePart2(Graphics& objGraphics, Bitmap& objBitmap, Rectangle srcrect, Rectangle destrect)
kohteessa WindowsApplication1.CustomBitmapClass.DrawHex(Int32 cx, Int32 cy, Int32 cmap, Boolean InfoMode, Boolean NoShader, Boolean ispredrawing, Graphics tempg, Int32 tx, Int32 ty, Int32 counteralpha, Int32 Zoom, Boolean UseRegimeColoring, Boolean neverusehistory)
kohteessa WindowsApplication1.MapPartClass.Paint()
kohteessa WindowsApplication1.MapWindowClass..ctor(GameClass& tGame, Int32 tminheight, Int32 tminwidth, Int32 tZoomLevel)
kohteessa WindowsApplication1.MainEditScreenClass.HandleMouseClick(Int32 x, Int32 y, Int32 b)
kohteessa WindowsApplication1.Form1.Form1_Mousedown(Object sender, MouseEventArgs e)
kohteessa System.Windows.Forms.Control.OnMouseDown(MouseEventArgs e)
kohteessa System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
kohteessa System.Windows.Forms.Control.WndProc(Message& m)
kohteessa System.Windows.Forms.ScrollableControl.WndProc(Message& m)
kohteessa System.Windows.Forms.ContainerControl.WndProc(Message& m)
kohteessa System.Windows.Forms.Form.WndProc(Message& m)
kohteessa WindowsApplication1.ImmoveableForm.WndProc(Message& m)
kohteessa System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
kohteessa System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
kohteessa System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
System.ArgumentNullException: Arvo ei voi olla Null.
Parametrin nimi: image
kohteessa System.Drawing.Graphics.DrawImage(Image image, Rectangle destRect, Rectangle srcRect, GraphicsUnit srcUnit)
kohteessa WindowsApplication1.DrawMod.DrawSimplePart2(Graphics& objGraphics, Bitmap& objBitmap, Rectangle srcrect, Rectangle destrect)
kohteessa WindowsApplication1.CustomBitmapClass.DrawHex(Int32 cx, Int32 cy, Int32 cmap, Boolean InfoMode, Boolean NoShader, Boolean ispredrawing, Graphics tempg, Int32 tx, Int32 ty, Int32 counteralpha, Int32 Zoom, Boolean UseRegimeColoring, Boolean neverusehistory)
kohteessa WindowsApplication1.MapPartClass.Paint()
kohteessa WindowsApplication1.MapWindowClass..ctor(GameClass& tGame, Int32 tminheight, Int32 tminwidth, Int32 tZoomLevel)
kohteessa WindowsApplication1.MainEditScreenClass.HandleMouseClick(Int32 x, Int32 y, Int32 b)
kohteessa WindowsApplication1.Form1.Form1_Mousedown(Object sender, MouseEventArgs e)
kohteessa System.Windows.Forms.Control.OnMouseDown(MouseEventArgs e)
kohteessa System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
kohteessa System.Windows.Forms.Control.WndProc(Message& m)
kohteessa System.Windows.Forms.ScrollableControl.WndProc(Message& m)
kohteessa System.Windows.Forms.ContainerControl.WndProc(Message& m)
kohteessa System.Windows.Forms.Form.WndProc(Message& m)
kohteessa WindowsApplication1.ImmoveableForm.WndProc(Message& m)
kohteessa System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
kohteessa System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
kohteessa System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
-
JJKettunen
- Posts: 2293
- Joined: Tue Mar 12, 2002 6:00 pm
- Location: Finland
RE: CTD: Changing the prehex sprite
Argh, just realised how to set overlay graphics for custom landscapes properly. [:o]
CTDs are still relevant though.
CTDs are still relevant though.
