Run-time error 6? |
Run-time error 6? |
![]() ![]()
Post
#1
|
|
Train Master ![]() ![]() ![]() ![]() ![]() Group: Root Admin Posts: 727 Joined: 1-October 03 From: United States Member No.: 1 ![]() |
I have received a couple of reports from users that they will see a Run-time error 6 when trying to replace rolling stock using Activity Master. I have never seen this error or caused it to occur. However I've seen it on other people's machines, and it is nearly always caused by a file or file structure error in the user's \TRAINSET folder. Our suggestion is to run Conbuilder or RouteRiter, both excellent and in my opinion "Must have" utilities, to check all the rolling stock files first, before using Activity Master to replace.
I will continue to try and hunt down this elusive run-time error and come up with a better way for Activity Master to dea with it or a better more informative error message, however so far every time I have seen this it has been curable by using Route Riter or ConBuilder. Some users have reported this on only one route. In that case it's generally because the user is using TrainStore (which I use and also highly recommend), and, when the rolling stock giving the problems is "stored" (because the route is stored) then the problems go away, and when that rolling stock is unstored the problems appear. If you DO get this error please post to this forum, I want to track it down. I'll want to know what route and what activity you were working on. Thanks, Steve -------------------- Steve Davis
Skyline Computing
SteveDavis@SkylineComputing.com
|
|
|
![]() |
![]()
Post
#2
|
|
Train Master ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 287 Joined: 6-January 07 From: United States Member No.: 14 ![]() |
I have received a couple of reports from users that they will see a Run-time error 6 when trying to replace rolling stock using Activity Master. I have never seen this error or caused it to occur. However I've seen it on other people's machines, and it is nearly always caused by a file or file structure error in the user's \TRAINSET folder. Our suggestion is to run Conbuilder or RouteRiter, both excellent and in my opinion "Must have" utilities, to check all the rolling stock files first, before using Activity Master to replace. I will continue to try and hunt down this elusive run-time error and come up with a better way for Activity Master to dea with it or a better more informative error message, however so far every time I have seen this it has been curable by using Route Riter or ConBuilder. Some users have reported this on only one route. In that case it's generally because the user is using TrainStore (which I use and also highly recommend), and, when the rolling stock giving the problems is "stored" (because the route is stored) then the problems go away, and when that rolling stock is unstored the problems appear. If you DO get this error please post to this forum, I want to track it down. I'll want to know what route and what activity you were working on. Thanks, Steve Hi Steve, I had just downloaded an activity for the Freeware Cajon Pass route. The file is bnsfemp.zip at Train-Sim. When I loaded this activity into Activity Master, I had approximately 660 unknown pieces of rolling stock that was not located on my hard drive. If I tried to replace stock, I got the runtime error 6. It didn't matter whether I used a specific list or let AM choose for me. I've never had this error show up before, and after reading some of the messages here, I was wondering if there could be something wrong in one of the trainset folders. That would make sense if it had been happening all along. This activity has 20 AI services along with the player consist and some cars on sidings. I manually edited the activity file down to 5 AI services. That brought the number of cars needing replacement down just under 200. Activity Master was then able to swap out cars using a specific list or any of it's own choosing. I then added the services again to the activity file in groups of 5 until I was able to have all of them replaced so I could run the activity as the author uploaded it. For my problem here, it seems the number of unknown cars, or ones not on my drive, was limited to around 200. I am using version 1.5.8. Jim |
|
|
![]()
Post
#3
|
|
Train Master ![]() ![]() ![]() ![]() ![]() Group: Root Admin Posts: 727 Joined: 1-October 03 From: United States Member No.: 1 ![]() |
Hi Steve, I had just downloaded an activity for the Freeware Cajon Pass route. The file is bnsfemp.zip at Train-Sim. When I loaded this activity into Activity Master, I had approximately 660 unknown pieces of rolling stock that was not located on my hard drive. If I tried to replace stock, I got the runtime error 6. It didn't matter whether I used a specific list or let AM choose for me. I've never had this error show up before, and after reading some of the messages here, I was wondering if there could be something wrong in one of the trainset folders. That would make sense if it had been happening all along. This activity has 20 AI services along with the player consist and some cars on sidings. I manually edited the activity file down to 5 AI services. That brought the number of cars needing replacement down just under 200. Activity Master was then able to swap out cars using a specific list or any of it's own choosing. I then added the services again to the activity file in groups of 5 until I was able to have all of them replaced so I could run the activity as the author uploaded it. For my problem here, it seems the number of unknown cars, or ones not on my drive, was limited to around 200. I am using version 1.5.8. Jim Jim, This is very helpful. I will cull through my code and see it the number of unknowns is in fact limited to 200. That would indeed be an error I would need to fix and might solve this "Run time error 6" for a lot of users! For those interested in programming, run time error 6 means than an array index was accessed beyond it's boundaries, and that could be happening if the boundary is set at 200. I'll check it out and if so post a fix, THANKS! Nice detective work, thanks for your perseverance in finding this. Sincerely, Steve Davis -------------------- Steve Davis
Skyline Computing
SteveDavis@SkylineComputing.com
|
|
|
![]()
Post
#4
|
|
Train Master ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 287 Joined: 6-January 07 From: United States Member No.: 14 ![]() |
Jim, This is very helpful. I will cull through my code and see it the number of unknowns is in fact limited to 200. That would indeed be an error I would need to fix and might solve this "Run time error 6" for a lot of users! For those interested in programming, run time error 6 means than an array index was accessed beyond it's boundaries, and that could be happening if the boundary is set at 200. I'll check it out and if so post a fix, THANKS! Nice detective work, thanks for your perseverance in finding this. Sincerely, Steve Davis Steve, You're welcome. It was just a long shot when I edited the activity file. I remembered you made an edit to the code for AG, when Denis made the Burton-Derby template, changing the number of allowable sidings. That gave me the idea to limit the number of cars I would have to replace. Jim |
|
|
![]()
Post
#5
|
|
Train Master ![]() ![]() ![]() ![]() ![]() Group: Root Admin Posts: 727 Joined: 1-October 03 From: United States Member No.: 1 ![]() |
Steve, You're welcome. It was just a long shot when I edited the activity file. I remembered you made an edit to the code for AG, when Denis made the Burton-Derby template, changing the number of allowable sidings. That gave me the idea to limit the number of cars I would have to replace. Jim Jim, I am having trouble duplicating this problem. In my code it appears that the limit is 2000 cars. I replaced all the cars in the activity you mentioned (bnsfemp.zip) I showed 1164 cars not on my drive. I hit 'replace' and it worked without errors. I didn't use the 'specific list' but that shouldn't make a difference. Can you tell me specifically what steps you followed and when the run time error came up? Also I assume you are running v 1.5.8, correct? If you could check "Check here to generate a debug file", then run this on the full unedited activity (the one that generates the run time error) and then send me the debug.txt file after running AM and getting this error (as an attachment to a post in this forum would be fine) I'd appreciate it. That might help me to unlock this mystery. Sorry I couldn't get this to happen on my machine. Thanks, Steve -------------------- Steve Davis
Skyline Computing
SteveDavis@SkylineComputing.com
|
|
|
![]()
Post
#6
|
|
Train Master ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 287 Joined: 6-January 07 From: United States Member No.: 14 ![]() |
Jim, I am having trouble duplicating this problem. In my code it appears that the limit is 2000 cars. I replaced all the cars in the activity you mentioned (bnsfemp.zip) I showed 1164 cars not on my drive. I hit 'replace' and it worked without errors. I didn't use the 'specific list' but that shouldn't make a difference. Can you tell me specifically what steps you followed and when the run time error came up? Also I assume you are running v 1.5.8, correct? If you could check "Check here to generate a debug file", then run this on the full unedited activity (the one that generates the run time error) and then send me the debug.txt file after running AM and getting this error (as an attachment to a post in this forum would be fine) I'd appreciate it. That might help me to unlock this mystery. Sorry I couldn't get this to happen on my machine. Thanks, Steve Steve, I am using v 1.5.8. Everything runs fine up to the point before clicking either button, "Replace Rolling Stock" if letting AM do the selections or "Set up Replacement List." When clicking either of those is when the Run-time error 6 'overflow' occurs. I included the debug files from both attempts. Jim |
|
|
![]()
Post
#7
|
|
Train Master ![]() ![]() ![]() ![]() ![]() Group: Root Admin Posts: 727 Joined: 1-October 03 From: United States Member No.: 1 ![]() |
Steve, I am using v 1.5.8. Everything runs fine up to the point before clicking either button, "Replace Rolling Stock" if letting AM do the selections or "Set up Replacement List." When clicking either of those is when the Run-time error 6 'overflow' occurs. I included the debug files from both attempts. Jim Jim, I have posted an update, version 1.5.9, that *may* correct this. Please download this and let me know your results. Do you get any error messages? If so what? I have increased the number of unknowns in an activity to 2500, which is a lot more than MSTS can actually handle since the limit is usually about 500 - 700 cars. Thanks, Steve -------------------- Steve Davis
Skyline Computing
SteveDavis@SkylineComputing.com
|
|
|
![]() ![]() |
Lo-Fi Version | Time is now: 12th September 2025 - 07:48 PM |