Author Topic: Placing a Monster on a Map Crashes Toolset  (Read 770 times)

Offline ProphetSword

  • Mod Designer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2818
  • FRUA Lives!
    • Lands of Adventure
Placing a Monster on a Map Crashes Toolset
« on: September 02, 2013, 04:22:33 PM »
I attempted to drop a monster onto a map that I built, and caused the whole toolset to crash hard into an infinite loop.  So, I tried again and successfully got the toolset to crash again into an infinite loop.  So, good for me...I broke the toolset.   :-[

Seriously, though, whenever I attempt to drop a monster onto the map,  I get the following error:

"failed on refresh map:  System.ArgumentOutOfRangeException: Index was out of range.  Must be non-negative and less than the size of the collection.
Parameter name: index
at
System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument, ExceptionResource resource)
at System.ThrowHelper.ThrowArgumentOutOFRangeException()
at System.Collection.Generic.List`1.get_Item(Int32 index)
at IceBlink.Toolset.LevelEditor.spriteCreatureDraw(Int32 cspx, Int32 cspy, Int32 spriteListIndex, Int32 size)
at IceBlink.Toolset.LevelEditor.refreshMap()"


So, it's apparently failing to refresh the map because it believes the map is out of the index range.  Not sure why it would think that, unless the code is accessing the wrong index number when the monster is dropped onto the screen.  Any thoughts?
LANDS OF ADVENTURE: An Old-School Style CRPG

More Information Here: http://landsadventure.blogspot.com/

Offline slowdive

  • Jr. Member
  • **
  • Posts: 95
Re: Placing a Monster on a Map Crashes Toolset
« Reply #1 on: September 02, 2013, 04:53:47 PM »
Try opening the Lanterna module and then try placing a creature on any of the area maps. See if you get the same error message. If not, then something may be wrong with the module you are working on or the map you created. Do you get any useful information from the "debug.txt" file in the root directory.

Offline ProphetSword

  • Mod Designer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2818
  • FRUA Lives!
    • Lands of Adventure
Re: Placing a Monster on a Map Crashes Toolset
« Reply #2 on: September 02, 2013, 07:20:58 PM »
Still getting the issue, even in the Lanterna module.  Just to test it, I put a copy of the toolset on my laptop (fresh version downloaded, so nothing from the desktop anywhere near the installation), and even on a completely different system, the result is the same.

I'm running Windows 8 Pro on both my laptop and desktop.  I don't know what OS you're using, so I don't know if that has anything to do with it.  My desktop and laptop are vastly different (one is a dell, one is an HP).  But the outcome is exactly the same.  You might see if you can replicate this or if anyone else is having this issue.

To be clear, what I tried to do was pull a goblin and put it out onto the "Home DS" default map.  I also tried to do the same thing with a skeleton, to insure it wasn't an issue with that particular monster.  So, not sure what the refresh error is about.
LANDS OF ADVENTURE: An Old-School Style CRPG

More Information Here: http://landsadventure.blogspot.com/

Offline ProphetSword

  • Mod Designer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2818
  • FRUA Lives!
    • Lands of Adventure
Re: Placing a Monster on a Map Crashes Toolset
« Reply #3 on: September 02, 2013, 07:21:52 PM »
Also, this is what is in the debug.txt file:

9/2/2013 8:17:21 PM: failed on refresh map: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
   at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
   at System.ThrowHelper.ThrowArgumentOutOfRangeException()
   at System.Collections.Generic.List`1.get_Item(Int32 index)
   at IceBlinkToolset.LevelEditor.spriteCreatureDraw(Int32 cspx, Int32 cspy, Int32 spriteListIndex, Int32 size)
   at IceBlinkToolset.LevelEditor.refreshMap()
LANDS OF ADVENTURE: An Old-School Style CRPG

More Information Here: http://landsadventure.blogspot.com/

Offline slowdive

  • Jr. Member
  • **
  • Posts: 95
Re: Placing a Monster on a Map Crashes Toolset
« Reply #4 on: September 02, 2013, 08:57:55 PM »
Ahh, I remember now. There was an issue with the v5.0 build and we released a hotfix (here is the post from the KS page):

"Karl found a bug already :-0
With this build, I started cleaning up all the duplicate sprite files found in many folders. I thought I had fixed any methods that search for sprite files, but apparently I missed a couple. This "hotfix" will fix the problem with trying to place creatures or props in the area and encounter editors (toolset issue)...hopefully ;-)"

http://www.iceblinkengine.com/forums/viewtopic.php?f=37&t=286&p=2386#p2386

download the "IceBlinkToolset v5_1hotfix.rar" file and replace your IceBlinkToolset.exe in the root directory.

Offline ProphetSword

  • Mod Designer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2818
  • FRUA Lives!
    • Lands of Adventure
Re: Placing a Monster on a Map Crashes Toolset
« Reply #5 on: September 03, 2013, 02:09:36 PM »
Yep.  Working as it should now.  Fantastic.
LANDS OF ADVENTURE: An Old-School Style CRPG

More Information Here: http://landsadventure.blogspot.com/