Elvas Tower: Index was outside the bounds of the array - Elvas Tower

Jump to content

  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Index was outside the bounds of the array V2797 Rate Topic: -----

#1 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin Group
  • Posts: 15,661
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 17 January 2015 - 10:04 PM

With V2797 I'm seeing a lot of warning messages of "System.IndexOutOfRangeException: Index was outside the bounds of the array" followed by a failure to display a shape -- a shape that's been displaying since day 1. Many shapes actually.

I've no problem w/additional checks but I do object to failing to display stuff that's been displaying perfectly fine for years.

That said, being curious I thought the warning might also tell me where in the .s file it thought there was a problem... alas no information was provided that might lead me to understand what was going on.

Which leads to the cheeky question: Other than getting my attention, what's this trying to do?

#2 User is offline   vince 

  • Superintendant
  • Group: Posts: Elite Member
  • Posts: 1,316
  • Joined: 18-June 14
  • Gender:Male
  • Location:West of the Contental Divide
  • Simulator:ORTS_Running MSTS_Editing
  • Country:

Posted 17 January 2015 - 11:04 PM

View PostGenma Saotome, on 17 January 2015 - 10:04 PM, said:

With V2797 I'm seeing a lot of warning messages of "System.IndexOutOfRangeException: Index was outside the bounds of the array" followed by a failure to display a shape -- a shape that's been displaying since day 1. Many shapes actually.

I've no problem w/additional checks but I do object to failing to display stuff that's been displaying perfectly fine for years.

That said, being curious I thought the warning might also tell me where in the .s file it thought there was a problem... alas no information was provided that might lead me to understand what was going on.

Which leads to the cheeky question: Other than getting my attention, what's this trying to do?

Ditto here at X2800 on grabbing my attention.
The LIRR Budd RDC is now invisible. The diesel smoke however still shows up nicely as do the headlights and cabview. Many of the custom shapes I constructed using SketchUp are gone! Shapes as simple as a small 12 poly sign. I see it complaining about nits in shape files mostly.

vince

#3 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin Group
  • Posts: 15,661
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 17 January 2015 - 11:09 PM

Yeah, that's about right.

Warnings are suppose to warn only and load the shape anyways. I expect it'll get corrected right away. But I would like to know what it caught its toe on when it stumbled.

#4 User is offline   Jeffrey Kraus-Yao 

  • Banned
  • PipPipPipPip
  • Group: Status: Fired
  • Posts: 282
  • Joined: 25-July 08
  • Gender:Male
  • Location:Madison
  • Simulator:Microsoft Train Simulator
  • Country:

Posted 18 January 2015 - 01:19 AM

Erased.

#5 User is offline   gpz 

  • Superintendant
  • Group: Posts: Elite Member
  • Posts: 1,846
  • Joined: 27-October 12
  • Gender:Male
  • Location:Budapest
  • Simulator:OpenRails
  • Country:

Posted 18 January 2015 - 01:31 AM

View PostJeffrey Kraus-Yao, on 18 January 2015 - 01:19 AM, said:

When I wrote these checks I had to intentionally create broken shapes since none of my default routes had broken shapes.

I would wonder, who and when gave you svn access, and how you felt yourself free to commit code that was communicated by the development team for a long time as non-wanted behavior, without trying to make the consent first. Can you please answer these questions?

#6 User is offline   Jeffrey Kraus-Yao 

  • Banned
  • PipPipPipPip
  • Group: Status: Fired
  • Posts: 282
  • Joined: 25-July 08
  • Gender:Male
  • Location:Madison
  • Simulator:Microsoft Train Simulator
  • Country:

Posted 18 January 2015 - 01:47 AM

Erased.

#7 User is offline   James Ross 

  • Open Rails Developer
  • Group: Posts: Elite Member
  • Posts: 5,514
  • Joined: 30-June 10
  • Gender:Not Telling
  • Simulator:Open Rails
  • Country:

Posted 18 January 2015 - 01:47 AM

View PostGenma Saotome, on 17 January 2015 - 10:04 PM, said:

With V2797 I'm seeing a lot of warning messages of "System.IndexOutOfRangeException: Index was outside the bounds of the array" followed by a failure to display a shape -- a shape that's been displaying since day 1. Many shapes actually.


Dave, can we have a log file please? System.IndexOutOfRangeException is not the exception you get when code has found a problem with a shape, it's one that happens when there's a bug in the code, so we need to know where it is to fix it.

#8 User is offline   James Ross 

  • Open Rails Developer
  • Group: Posts: Elite Member
  • Posts: 5,514
  • Joined: 30-June 10
  • Gender:Not Telling
  • Simulator:Open Rails
  • Country:

Posted 18 January 2015 - 03:04 AM

I have made all the shape checks into pure warnings in X2802, so they won't prevent any shapes loading. Some of the checks are good, in that they prevent Open Rails crashing and hanging later, but we need to figure out which criteria are strictly necessary for that and which are just to aid in producing good shape files.

We still need Dave's log file to see what's up with the System.IndexOutOfRangeException, although I might have fixed that in X2801.

#9 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin Group
  • Posts: 15,661
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 18 January 2015 - 09:05 AM

View PostJames Ross, on 18 January 2015 - 03:04 AM, said:

We still need Dave's log file to see what's up with the System.IndexOutOfRangeException, although I might have fixed that in X2801.


Here it is. I'll provide Jeff some files later this morning after I've had my coffee and can figure out what to forward.

Attached File  Open Rails - X2799 - 1.17.2015 9.49.36 PM.txt.zip (6.9K)
Number of downloads: 218

#10 User is offline   Jeffrey Kraus-Yao 

  • Banned
  • PipPipPipPip
  • Group: Status: Fired
  • Posts: 282
  • Joined: 25-July 08
  • Gender:Male
  • Location:Madison
  • Simulator:Microsoft Train Simulator
  • Country:

Posted 18 January 2015 - 09:52 AM

Erased.

#11 User is offline   James Ross 

  • Open Rails Developer
  • Group: Posts: Elite Member
  • Posts: 5,514
  • Joined: 30-June 10
  • Gender:Not Telling
  • Simulator:Open Rails
  • Country:

Posted 18 January 2015 - 09:58 AM

View PostGenma Saotome, on 18 January 2015 - 09:05 AM, said:

Here it is. I'll provide Jeff some files later this morning after I've had my coffee and can figure out what to forward.

Attachment Open Rails - X2799 - 1.17.2015 9.49.36 PM.txt.zip


Thanks, that looks to me like it is a shape with no entries in shape.lod_controls - something we actually check for elsewhere in OR but wasn't checked for in this new code until X2801.

Like Jeffrey says, it is worth running it again in the latest version (at least X2802) to check it now loads everything okay and also to see what warnings are logged.

#12 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin Group
  • Posts: 15,661
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 18 January 2015 - 10:23 AM

View PostJames Ross, on 18 January 2015 - 09:58 AM, said:

Thanks, that looks to me like it is a shape with no entries in shape.lod_controls - something we actually check for elsewhere in OR but wasn't checked for in this new code until X2801.

Like Jeffrey says, it is worth running it again in the latest version (at least X2802) to check it now loads everything okay and also to see what warnings are logged.



And that makes sense for some of the failed items... I do set up a list of values I'm most likely to use but do not go back and delete those I have not used -- there's actually no function available to show me what was used vs. not used.

But I do wonder if there is something else going on as some of the shape names I notices do not have any LOD's set.

#13 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin Group
  • Posts: 15,661
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 18 January 2015 - 10:32 AM

Ok, ran the latest version, things display but there is a large number of warning messages... as best as I can tell they all take this form:

Quote

Warning: Missing UV index in vertex 94 in sub-object 0 in distance level 0 in shape e:\bin\open rails 1930-1952\routes\cal-p\shapes\sp_rba_1t_0090r01dc_nm.s

Warning: Missing UV index in vertex 95 in sub-object 0 in distance level 0 in shape e:\bin\open rails 1930-1952\routes\cal-p\shapes\sp_rba_1t_0090r01dc_nm.s

Warning: Missing UV index in vertex 96 in sub-object 0 in distance level 0 in shape e:\bin\open rails 1930-1952\routes\cal-p\shapes\sp_rba_1t_0090r01dc_nm.s

Warning: Missing UV index in vertex 97 in sub-object 0 in distance level 0 in shape e:\bin\open rails 1930-1952\routes\cal-p\shapes\sp_rba_1t_0090r01dc_nm.s

Warning: Missing UV index in vertex 98 in sub-object 0 in distance level 0 in shape e:\bin\open rails 1930-1952\routes\cal-p\shapes\sp_rba_1t_0090r01dc_nm.s

Warning: Missing UV index in vertex 99 in sub-object 0 in distance level 0 in shape e:\bin\open rails 1930-1952\routes\cal-p\shapes\sp_rba_1t_0090r01dc_nm.s

Warning: Missing UV index in vertex 100 in sub-object 0 in distance level 0 in shape e:\bin\open rails 1930-1952\routes\cal-p\shapes\sp_rba_1t_0090r01dc_nm.s

Warning: Missing UV index in vertex 101 in sub-object 0 in distance level 0 in shape e:\bin\open rails 1930-1952\routes\cal-p\shapes\sp_rba_1t_0090r01dc_nm.s

Warning: Missing UV index in vertex 102 in sub-object 0 in distance level 0 in shape e:\bin\open rails 1930-1952\routes\cal-p\shapes\sp_rba_1t_0090r01dc_nm.s

Warning: Missing UV index in vertex 103 in sub-object 0 in distance level 0 in shape e:\bin\open rails 1930-1952\routes\cal-p\shapes\sp_rba_1t_0090r01dc_nm.s

Warning: Missing UV index in vertex 104 in sub-object 0 in distance level 0 in shape e:\bin\open rails 1930-1952\routes\cal-p\shapes\sp_rba_1t_0090r01dc_nm.s

Warning: Missing UV index in vertex 105 in sub-object 0 in distance level 0 in shape e:\bin\open rails 1930-1952\routes\cal-p\shapes\sp_rba_1t_0090r01dc_nm.s

Warning: Missing UV index in vertex 106 in sub-object 0 in distance level 0 in shape e:\bin\open rails 1930-1952\routes\cal-p\shapes\sp_rba_1t_0090r01dc_nm.s

Warning: Missing UV index in vertex 107 in sub-object 0 in distance level 0 in shape e:\bin\open rails 1930-1952\routes\cal-p\shapes\sp_rba_1t_0090r01dc_nm.s

Warning: Missing UV index in vertex 108 in sub-object 0 in distance level 0 in shape e:\bin\open rails 1930-1952\routes\cal-p\shapes\sp_rba_1t_0090r01dc_nm.s




Here is the .s, .sd, and Sketchup file for one such item, provided for OR Team testing only:
Attached File  MSTS.zip (1.1MB)
Number of downloads: 190

#14 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin Group
  • Posts: 15,661
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 18 January 2015 - 10:58 AM

Looking at the SU file I believe it is safe to say that all instances of this problem are due to 1 to n untextured polys.

Which, of course, begs the question: How does a shape w/ untextured polys get placed in the world? The answer is via an editor. There is nothing magical about the contents of a UiD() entry in a world file and there are many, many situations where not only is it easier and faster to add such entries via an editor there are situations where it is the only means of adding an entry -- RE will fail when confronted with any shape holding > 10K polys.

Seeing as there is no texture there are also no UV entries and w/o any UV entries any index to same will be out of bounds.

For my two cents this is a "this can be ignored" situation. SU excels at producing faces w/o telling you; If you are a diligent modeler you use the provided function to track them down and either texture them or delete them... but it tends to be difficult when the face spans an area of 0.0001mm and the model covers 100k sq m. -- just ask Craig Kawahara (a.k.a. CKawahara here at ET) how many days in the past week have been spent trying to find and delete such things.

That said, there is always room for improvement and I believe a small tweek to the Ruby code is possible that would make finding and deleting such faces far easier. If there is any volunteer who will look at the code I can point them in the right direction.

#15 User is offline   vince 

  • Superintendant
  • Group: Posts: Elite Member
  • Posts: 1,316
  • Joined: 18-June 14
  • Gender:Male
  • Location:West of the Contental Divide
  • Simulator:ORTS_Running MSTS_Editing
  • Country:

Posted 18 January 2015 - 11:14 AM

View PostJeffrey Kraus-Yao, on 18 January 2015 - 01:19 AM, said:

The checks I added for shapes were only expected to catch serious errors in shape files. If a simple 12-poly sign is causing these checks to not display the shape that means there are serious errors in the shape exporter for SketchUp. When I wrote these checks I had to intentionally create broken shapes since none of my default routes had broken shapes.

Could I get some of these broken shapes to examine? The source SketchUp files and the created .s files to examine? Also, what version of Sketchup are you using? I have the Ruby source code to examine included with the exporter. ..................snip.........................."


In the attached 12PolySign_ORBarf.zip is a clip from the OR Log where it barfed on the sign, a copy of the sign shape file and the single .ace file. If the entire log is wanted I'll be happy to attach the entire 355kb log text file.

I constructed the sign with SU 5 and exported it with version 2.0 of Pauls SU exporter.
I give permission to anyone who wants the enclosed sign shape to be be ripped, rapped, reamed, stolen, sold, peddeled, folded, spindled and mutilated by anyone who wants it.:rotfl:

Regards,
vince
edit add :sign_oops: the SketchUp source file.
v

Attached File(s)



  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users