The dreaded Thread Exception and Ben Neal's new boxcars

bl4882

New member
Hello all. I've installed Ben Neal's new single sheath boxcars into TS2010 build 3.3 and attempted to take them for a test drive. There are no missing or faulty dependencies. When I did so I found that I was struck by the dreaded Thread Exception red button and stack dump. My TS2010 installation otherwise works flawlessly and smoothly in both Surveyor and Driver with my other assets. The route I was using loaded, but took over 2 minutes to do so and locomotive exhaust was visible and opening the throttle in dcc moved it, but the locomotive and cars were invisible. Also, the cars' thumbnails do not show in the Trains panel although they do appear when placed in Surveyor (but not when Surveyor is exited and reloaded). I would be thankful for enlightenment on the thread exceptions I am getting in both Surveyor and Driver when the new equipment is present and how to deal with them.

Here is the Thread Exception I am getting in Surveyor. The text is bolded to separate it from my comments.

Thread Exception: ER_NullReference, line 1366, file train.gs
Stack dump:
Function $ Permit[]@ Train:: TakePermitOnTrack(bool), line -1
Function $ void@ Train::Init(), line 1437


In Driver I get the foregoing Thread Exception plus the following:

Thread Exception: ER_NullReference, line 280, file quickdrive.gs
Stack dump:
Function$void@QuickDrive::LoadRouteConsists(), line -1
Function$ void@QuickDrive:: SetProperties (Soup), line 145


Note that I did not attempt to enter driver through quick drive, if that matters.

Can anyone enlighten me about the possible problem? As I said, this only happens with those boxcars present.

Thanks in advance for your attention.

Bernie
 
Last edited:
This post is not quite relevant, but, BEN NEAL IS BACK?!?!?! Where have I been?

I'm no expert when it comes to errors. My only thought is do you have compatibility mode on?

I hope someone else can help you. Again, no expert on errors and such... :(
 
Because I used outside script libraries, I'm kinda in the dark. This issue didn't come up during beta testing. About all I can think of to try is to make sure you have the latest revisions of the script libraries. As I understand it, the swaying script library I used does not work in TS09, but I thought it did work in TS10. If 3.3 is not the latest version of 2010, maybe try patching it? Honestly, all I can come up with are stabs in the dark. Sorry I can't be more helpful.

Cheers,
Ben
 
I've been trying to work out what's going on as well over on my new forum (Shane's Trainz Forum).

There is one possibility that I can think of, and it involves a mismatch in the config/script files. If the engine tag is set to 1 in the config, the following two lines need to be used in the related script:

Code:
include 'locomotive.gs'

Class loco isclass Locomotive

Replace 'loco' with the name of the class.

For engine 0, replace locomotive.gs with vehicle.gs and isclass Locomotive with isclass Vehicle.

Shane
 
Hello Ben and Shane. Thanks for the prompt replies. Also Thad. You are right, Ben's return definitely merits three cheers.

I loaded the session again and this is what the Jet Log had to say for itself:


Begin:
? 0:00.7 : InterfaceTextDB> failed to load compiled interfacetext file
? 0:01.9 : ScriptLog> Could not resolve native link $void@Servlet::SetPersistentData(string,Soup)
? 0:01.9 : ScriptLog> Could not resolve native link $void@Servlet::GetPersistentData(string,Soup)
? 0:01.9 : ScriptLog> Could not resolve native link $int@Servlet::AdminValidateLogin(string,string)
? 0:01.9 : ScriptLog> Could not resolve native link $Soup@Servlet::AdminListAvailableServlets(int)
? 0:01.9 : ScriptLog> Could not resolve native link $Soup@Servlet::AdminListInstalledServlets(int)
? 0:01.9 : ScriptLog> Could not resolve native link $bool@Servlet::AdminInstallContent(int,KUID)
? 0:01.9 : ScriptLog> Could not resolve native link $bool@Servlet::AdminStartServlet(int,KUID)
? 0:01.9 : ScriptLog> Could not resolve native link $void@Servlet::AdminStopServlet(int,KUID)
? 0:01.9 : ScriptLog> GSMachine::GetLibrary> library '0x9F27EDD0 0x5D31E279' not found in link table
? 0:01.9 : ScriptLog> GSMachine: Error -2 loading library c:\program files (x86)\auran\ts2010/UserData/cache/libraries/d615b4d78c54b692.gsl (auranachievementsservlet.gs)
? 0:01.9 : SCRIPT> >>>DataBundleHelper.Init>>> init databundlehelper libray v7 done.
? 0:11.9 : ScriptLog> GSMachine::GetLibrary> library '0xB624A008 0xD762F8E5' not found in link table
? 0:11.9 : ScriptLog> GSMachine: Error -2 loading library c:\program files (x86)\auran\ts2010/UserData/cache/libraries/3a29debb78b76cc5.gsl (boxcar.gs)
? 0:11.9 : TrainzBaseSpec::GetGSClass> Could not load Trainz library boxcar.gsl for '<kuid2:96914:15502:2> "M&STL 18000 series boxcar"'
? 0:12.4 : SCRIPT> NumberIt random running number library (<kuid2:75134:99003:7>) Copyright Dave Renshaw (Eldavo's Railway Emporium) 2005
? 0:12.4 : SCRIPT> ¤¤¤¤¤ iPortal iPortal South NB: Found PanelAccLib
? 0:12.4 : SCRIPT> ¤¤¤¤¤ iPortal iPortal South SB: Found PanelAccLib
? 0:12.4 : SCRIPT> ¤¤¤¤¤ iPortal iPortal North: Found PanelAccLib
? 0:12.4 : ScriptLog> Could not find handler $void@Boxcar::VehicleHandler(Message) for native GameObject::AddHandler()
? 0:12.4 : ScriptLog> Could not find handler $void@Boxcar::VehicleHandler(Message) for native GameObject::AddHandler()
? 0:12.5 : ScriptLog> Thread Exception: ER_NullReference, line 1366, file train.gs
? 0:12.5 : ScriptLog> *** DUMPING ALL THREAD STACKS ***
? 0:12.5 : ScriptLog> *** STACK DUMP OF THREAD 0 ON GAME OBJECT (null), id 35 ***
? 0:12.5 : ScriptLog> function $void@SwayLibrary::TZLooper(), line -1
? 0:12.5 : ScriptLog>


? 0:12.5 : ScriptLog> *** STACK DUMP OF THREAD 0 ON GAME OBJECT D&RGW 66000 series boxcar 1, id 171 ***
? 0:12.5 : ScriptLog> function $void@Mogul::VehicleMonitor(), line -1
? 0:12.5 : ScriptLog>


? 0:12.5 : ScriptLog> *** STACK DUMP OF THREAD 0 ON GAME OBJECT RI 42200 series boxcar 1, id 174 ***
? 0:12.5 : ScriptLog> function $void@Mogul::VehicleMonitor(), line -1
? 0:12.5 : ScriptLog>


? 0:12.5 : ScriptLog> *** STACK DUMP OF THREAD 0 ON GAME OBJECT Baldwin medium 2-8-0M 1, id 180 ***
? 0:12.5 : ScriptLog> function $void@SteamLoco::CatchControlMode(), line -1
? 0:12.5 : ScriptLog>


? 0:12.5 : ScriptLog> Stack Dump...
? 0:12.5 : ScriptLog> function $Permit[]@Train::TakePermitOnTrack(bool), line -1
? 0:12.5 : ScriptLog> function $void@Train::Init(), line 1437
? 0:13.3 : SCRIPT> DriverCommandRule.SetProperties> 0 commands loaded
? 0:17.5 : ScriptLog> Thread Exception: ER_NullReference, line 280, file quickdrive.gs
? 0:17.5 : ScriptLog> *** DUMPING ALL THREAD STACKS ***
? 0:17.5 : ScriptLog> *** STACK DUMP OF THREAD 0 ON GAME OBJECT (null), id 35 ***
? 0:17.5 : ScriptLog> function $void@SwayLibrary::TZLooper(), line -1
? 0:17.5 : ScriptLog>


? 0:17.5 : ScriptLog> *** STACK DUMP OF THREAD 0 ON GAME OBJECT D&RGW 66000 series boxcar 1, id 171 ***
? 0:17.5 : ScriptLog> function $void@Mogul::VehicleMonitor(), line -1
? 0:17.5 : ScriptLog>


? 0:17.5 : ScriptLog> *** STACK DUMP OF THREAD 0 ON GAME OBJECT RI 42200 series boxcar 1, id 174 ***
? 0:17.5 : ScriptLog> function $void@Mogul::VehicleMonitor(), line -1
? 0:17.5 : ScriptLog>


? 0:17.5 : ScriptLog> *** STACK DUMP OF THREAD 0 ON GAME OBJECT Baldwin medium 2-8-0M 1, id 180 ***
? 0:17.5 : ScriptLog> function $void@SteamLoco::CatchControlMode(), line -1
? 0:17.5 : ScriptLog>


? 0:17.5 : ScriptLog> *** STACK DUMP OF THREAD 0 ON GAME OBJECT (null), id 275 ***
? 0:17.5 : ScriptLog> function $void@DriverModule::Main(), line -1
? 0:17.5 : ScriptLog>


? 0:17.5 : ScriptLog> Stack Dump...
? 0:17.5 : ScriptLog> function $void@QuickDrive::LoadRouteConsists(), line -1
? 0:17.5 : ScriptLog> function $void@QuickDrive::SetProperties(Soup), line 145
? 0:17.5 : World.CreateBehavior> Could not call ScenarioBehavior.SetProperties(Soup) on behavior <kuid:401543:1184> "QuickDrive rule"
? 0:17.5 : SCRIPT> StartupOptions(index=0,id=278) changing from state 1 to state 0
? 0:17.5 : SCRIPT> # StartupOptionsRule.Pause> requesting user selection
? 0:17.5 : SCRIPT> DriverSetupRule(index=1,id=279) changing from state 1 to state 0
? 0:17.5 : SCRIPT> DriverCommandRule(index=2,id=280) changing from state 1 to state 0
? 0:17.5 : SCRIPT> DriverCommandRule.CreateCommandsNow> 0 commands removed
? 0:17.5 : SCRIPT> DriverCommandRule.CreateCommandsNow> 11 commands added
? 0:17.5 : SCRIPT> CleanUpDerailedTrains(index=3,id=281) changing from state 1 to state 0
? 0:17.5 : SCRIPT> ConsistDataHandler(index=4,id=282) changing from state 1 to state 0
? 0:17.7 : SCRIPT> ##### iPortallib: trains in receivebuffer at startup: 3
? 0:17.7 : SCRIPT> ##### iPortallib: trains to send at startup: 9
? 0:17.7 : SCRIPT> ##### iPortallib: Trying to connect
? 0:17.9 : SCRIPT> DriverCharacter.ScheduleThread> monitor thread started
? 0:17.9 : SCRIPT> DriverSetupRule(index=1,id=279) changing from state 0 to state 6
? 0:18.0 : SCRIPT> ##### iPortallib: New online status=6
? 0:23.2 : SCRIPT> # StartupOptionsRule> INFO: DCC mode selected!
? 0:23.2 : SCRIPT> StartupOptions(index=0,id=278) changing from state 0 to state 6
? 0:25.4 : Interface.Print> 'Baldwin medium 2-8-0M 1: control mode is DCC Fireman disabled.'
? 0:47.7 : SCRIPT> ##### iPortallib: New online status=3
? 0:52.6 : SCRIPT> ##### iPortallib: Trying to connect
? 0:52.6 : SCRIPT> ##### iPortallib: New online status=6
? 0:59.7 : ScriptLog> GSNode::RequestMessage> source is not attached to router
? 0:59.7 : ScriptLog> GSNode::RequestMessage> source is not attached to router
? 0:59.7 : ScriptLog> GSNode::RequestMessage> source is not attached to router
? 0:59.7 : ScriptLog> GSNode::RequestMessage> source is not attached to router
? 0:59.7 : ScriptLog> GSNode::RequestMessage> source is not attached to router
? 1:39.6 : ScriptLog> GSRouter::Done(), 3 outstanding node(s)
? 1:39.6 : Leaked specs:
? 1:39.6 : ( 4) - <kuid:30501:1021> "Video Settings"
? 1:39.6 : ( 1) - <kuid2:81997:15:1> "NZGR K Engine Sound"
? 1:39.6 : Leaked specs:
? 1:39.6 : ( 4) - <kuid:30501:1021> ""
? 1:39.6 : ( 1) - <kuid2:81997:15:1> ""
? 1:39.6 : TrainzLogEnd> Averaged 59.096585fps over 42.472843sec
? 1:40.3 : ** Packed Heap Summary **
? 1:40.3 : #TrackStretch - 0k unused, 0k used, 1023k free
? 1:40.3 : #TrackVertex - 0k unused, 0k used, 1023k free
? 1:40.3 : #SpatialContainer - 0k unused, 0k used, 1023k free
? 1:40.3 : #MapObject - 0k unused, 0k used, 1023k free
? 1:40.3 : StitchedMeshWorld - 0k unused, 0k used, 1023k free
? 1:40.3 : #BlockArray - 0k unused, 0k used, 1023k free
? 1:40.3 : #GSContext - 0k unused, 0k used, 1023k free
? 1:40.3 : #GSMachine - 0k unused, 0k used, 1023k free
? 1:40.3 : FileSubArchive - 903k unused, 120k used, 1024k free
? 1:40.3 : #jetstd:: - 543k unused, 13k used, 466k free
? 1:40.3 : #StringData - 2937k unused, 3121k used, 84k free
? 1:40.3 : ** - **
End.


Bernie
 
Now we are getting somewhere.

It looks like it's having problems with the .gsl file (compiled script) which Trainz generates when an asset is committed.

It also looks like the VehicleHandler function is either not present or cannot be loaded.

Shane
 
This is to bring this to a close. I re-downloaded everything having to do with the boxcars after deleting them and their dependencies. After installation they work perfectly. My original download must have been corrupted. Problem gone.

Thank you all who responded. Special thanks to Ben Neal for these beautiful cars.

Bernie
 
These 3 boxcars work fabulously in TRS2006, and each have several interchangeable skins (by pressing the "?" button the, then pressing the green "OK" check mark button).

The sound effects by TRam are fabulous ! ! !
 
Cascade you are very, very right, and thanks for the tip on "?" button.

Ben Neal states this is a start on a series of steam era freight cars. These are clearly going to be as good or better than his Baldwin and Generic series of steam locos. All who love this era need to chip in and hire bodyguards and food tasters to make sure nothing happens to him at the hands of container and unit train fans, at least till the freight car series is done. :hehe: Seriously, it promises to be another monumental contribution to the hobby.

Bernie
 
Truely magnificent boxcars.

"These 3 boxcars work fabulously in TRS2006, and each have several interchangeable skins (by pressing the "?" button the, then pressing the green "OK" check mark button)."

I'm using TS12. I don't see this at all. Am I alone here?
 
They work find for me. I combined them with lilb's steel box cars and Pencil42's 37' box cars and it's like it's 1932 in Trainz!!

And I LOVE sitting lineside and having the train pass, clickety clack, clickety clack, bang, bang, bang, bang, bang, clickety clack...

The flat wheel bang comes from bens car - it's great to have that sound ass SO much realism!!!
 
Boy, those are nice, Ben! Cascade.. you will find lilb's rolling stock at the JR site, in the freeware, steam era transition section. Lots of great stuff there! Now, I'm going to have to keep an eye on Ben's site, don't want to miss anything new in there! That's some real first class work, thanks Ben!

Cheers ...Rick
 
lilb's cars are on Jointed Rail, under Freeware and then Transition Era.

pencil42's cars - there's my M&Pa 36' 700 Series Boxcar,<kuid2:204652:100293:1> (guess their 36' not 37'...)

and

36' ventilated boxcar,<kuid2:124060:15040:1>
36' boxcar,<kuid2:124060:15038:1>
UP 28\' combination boxcar,<kuid2:124060:15031:2>
Union Pacific 34\' boxcar,<kuid2:124060:15018:2>
AB&A 36\' boxcar,<kuid2:124060:15038:2>

are some other examples -biggest thing to watch is that you are getting a car with knuckle couplers and not link and pin as he made both.
 
I'm using TS12. I don't see this at all. Am I alone here?

No, I don't have that, either. I don't actually remember including that function in the script. Of course, I did borrow that part of the script from someone else about 6 years back, so I'm not all that familiar with that part of it. It's just supposed to randomly select one of 3 skins and 15 sets of chalk marks. Does it not randomize the skins in TRS2006?

Cheers,
Ben
 
Truely magnificent boxcars.

"These 3 boxcars work fabulously in TRS2006, and each have several interchangeable skins (by pressing the "?" button the, then pressing the green "OK" check mark button)."

I'm using TS12. I don't see this at all. Am I alone here?

I'm using ts12 and I don't see that either. I think the skins randomize, but I haven't been looking that close.
 
Back
Top