Elvas Tower: Unusual con editor problem? - Elvas Tower

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Unusual con editor problem? Rate Topic: -----

#1 User is online   Genma Saotome 

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

Posted 06 July 2018 - 05:00 PM

I was having a bit of a problem with the .con editor and .inc files where sometimes an .inc file is marked as "not exist" in the log but the file is present in the proper location. I eventually tracked it down to a space character at the end of a file name. Your .con editor was unable to locate the file because of the extra character. Other software I use have no problem with it.

I don't know the technical aspects of this so I cannot say whether any of the software is in error but the matter perplexed me for so long and with the quirky nature of the cause I thought it best to bring to your attention.

Here is a part of the log file (note trailing space in file name in the line that is bold):

[I] "e:/bin/open rails - us west 1930-1952/trains/trainset/sp_fm_h-12-44-tiger_stripe_set/sp_h-12-44_1486.eng"
[I] "e:/bin/open rails - us west 1930-1952/trains/trainset/sp_fm_h-12-44-tiger_stripe_set/../common.inc/models/percy_&_norton/fm_h12-44/fm_h12-44_fixed_specs.inc"
[I] "e:/bin/open rails - us west 1930-1952/trains/trainset/sp_fm_h-12-44-tiger_stripe_set/../common.inc/fleet/std_late_steam_era_diesel_switcher_coupler.inc"
[I] "e:/bin/open rails - us west 1930-1952/trains/trainset/sp_fm_h-12-44-tiger_stripe_set/../common.inc/models/percy_&_norton/fm_h12-44/fm_h12-44_weight.inc"
[I] "e:/bin/open rails - us west 1930-1952/trains/trainset/sp_fm_h-12-44-tiger_stripe_set/../common.inc/fleet/std_early_road_diesel_independant_ab_brake.inc"
[I] "e:/bin/open rails - us west 1930-1952/trains/trainset/sp_fm_h-12-44-tiger_stripe_set/../common.inc/models/percy_&_norton/fm_h12-44/fm_h12-44_std_lights.inc"
[I] "e:/bin/open rails - us west 1930-1952/trains/trainset/sp_fm_h-12-44-tiger_stripe_set/../common.inc/models/percy_&_norton/fm_h12-44/fm_h12-44_engine_specs.inc"
[I] "e:/bin/open rails - us west 1930-1952/trains/trainset/sp_fm_h-12-44-tiger_stripe_set/../common.inc/models/percy_&_norton/fm_h12-44/fm_h12-44_air_compressor.inc"
[I] "e:/bin/open rails - us west 1930-1952/trains/trainset/sp_fm_h-12-44-tiger_stripe_set/../common.inc/models/percy_&_norton/fm_h12-44/fm_h12-44_westinghouse_xyz_brakestand.inc " not exist
[I] "e:/bin/open rails - us west 1930-1952/trains/trainset/sp_fm_h-12-44-tiger_stripe_set/../common.inc/models/percy_&_norton/fm_h12-44/fm_h12-44_monitors.inc"
[I] "e:/bin/open rails - us west 1930-1952/trains/trainset/sp_fm_h-12-44-tiger_stripe_set/../common.inc/models/percy_&_norton/fm_h12-44/fm_h12-44_locomotive_controllers.inc"
[I] "e:/bin/open rails - us west 1930-1952/trains/trainset/sp_fm_h-12-44-tiger_stripe_set/../common.inc/models/percy_&_norton/fm_h12-44/fm_h12-44_std_text.inc"


Here is the relevant portion of the .eng file (note trailing space in file name in the line that is bold):

Wagon ( SP_H-12-44_1486 )
Type ( Diesel )
Include ( "..\\Common.Inc\\Models\\Percy_&_Norton\\FM_H12-44\\FM_H12-44_Engine_Specs.inc" )
Include ( "..\\Common.Inc\\Models\\Percy_&_Norton\\FM_H12-44\\FM_H12-44_Air_Compressor.inc" )
Include ( "..\\Common.Inc\\Models\\Percy_&_Norton\\FM_H12-44\\FM_H12-44_Westinghouse_XYZ_Brakestand.inc " )

CabView ( FMH12_1.cvf )
Headout ( 1.6 3.4 -5.8 )



The .inc files are all in one directory... here is a list of what's there:

FM_H12-44_Air_Compressor.inc
FM_H12-44_Couplers.inc
FM_H12-44_Engine_Specs.inc
FM_H12-44_Fixed_Specs.inc
FM_H12-44_Locomotive_Brake.inc
FM_H12-44_Locomotive_Controllers.inc
FM_H12-44_Monitors.inc
FM_H12-44_Std_Lights.inc
FM_H12-44_Std_Text.inc
FM_H12-44_Weight.inc
FM_H12-44_Westinghouse_XYZ_Brakestand.inc <--- here it is.


I had to shake my head in disbelief having wasted a lot of time trying to track down what is going in -- all because of a lousy space character. This one example I'm showing you here is one of many, probably identical occurrences. My editor can act on file sets so I'm pretty sure it will be an easy fix.

Just curious... is the behavior of the .con editor inappropriate?

Oh... I pretty sure the same thing is occurring in the OR software.

#2 User is offline   Goku 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,785
  • Joined: 12-December 13
  • Gender:Male
  • Simulator:my own
  • Country:

Posted 07 July 2018 - 03:27 AM

Spaces are allowed at the end of file names, so when you specify filename "file.inc ", then system looks for file "file.inc " and not "file.inc". I'm not sure if this case should be handled by software. I think, it's better make no errors in the data files.

#3 User is online   Genma Saotome 

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

Posted 07 July 2018 - 09:55 AM

View PostGoku, on 07 July 2018 - 03:27 AM, said:

Spaces are allowed at the end of file names, so when you specify filename "file.inc ", then system looks for file "file.inc " and not "file.inc". I'm not sure if this case should be handled by software. I think, it's better make no errors in the data files.


I've fixed the files that had that error but I'm concerned about the issue. From what I read a space at the end of a file name makes it almost impossible to delete using ordinary methods (apparently it is ok on Apple machines but not in Windows). That strongly suggests it should not be done.

#4 User is offline   Goku 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,785
  • Joined: 12-December 13
  • Gender:Male
  • Simulator:my own
  • Country:

Posted 07 July 2018 - 10:02 AM

Yes. In windows, space at the end of filename can make only disasters.

Page 1 of 1
  • 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