UGX-Mods

Call of Duty 5: World at War => Help Desk => Scripting => Topic started by: Psych on May 15, 2016, 12:51:39 am

Title: Unhandled Exception when models are added
Post by: Psych on May 15, 2016, 12:51:39 am
So I have avoided this error a few times now but it appears I finally have to get some help about it. Recently I implemented my Easter egg in Contrivance but now I get a crash at launch due to an Unhandled exception being caught. Now I have received this error before actually fairly recently when I tried to add the clutter_lilypad xmodel into my map... Deleting the lilypads solved the issue but this was an odd thing to cause the error in my opinion. I thought it was the model limit or possibly the memory limit but it is definitely neither so now I am kind of stuck as I need to add new models into my map for the Easter egg. Anyone ever experience this? Have seen a few posts with no solutions and barely any replies so I am hoping this is the one to resolve it.

Just a note developer 1 and such returns errors that do not make sense they are unrelated and do not help at all.

Thanks!
Title: Re: Unhandled Exception when models are added
Post by: BluntStuffy on May 15, 2016, 07:26:31 am
... I thought it was the model limit or possibly the memory limit but it is definitely neither...

Are you sure, because it useally is. Either that or a corrupt model maybe.
You could open the console and type 'meminfo' to see if you're anywhere near


Quote
Just a note developer 1 and such returns errors that do not make sense they are unrelated and do not help at all.

Because the error that is causing the unhandled exception occurs at the end of loading the map, and these 'unrelated' errors are preventing it from even getting that far. An error is an error, the console isn't making those up. If you want the error for the unhandled execption to show up ( if there's any ) you would need to fix all other stuff first so it would run in developer mode
Title: Re: Unhandled Exception when models are added
Post by: Psych on May 15, 2016, 07:36:04 am
Are you sure, because it useally is. Either that or a corrupt model maybe.
You could open the console and type 'meminfo' to see if you're anywhere near


Because the error that is causing the unhandled exception occurs at the end of loading the map, and these 'unrelated' errors are preventing it from even getting that far. An error is an error, the console isn't making those up. If you want the error for the unhandled execption to show up ( if there's any ) you would need to fix all other stuff first so it would run in developer mode

Well I have concluded that the error is caused by new models being entered into the map for sure and once I remove them it runs fine. The issue with DEV mode only happens when the models are added not when they are removed. The error it gives is also in a file that simply does not exist which would seem to be impossible but I am looking right at it now. It calls an error from my _loadout.gsc in my mod/mapname/maps folder despite it not even being there which makes no sense at all which is why I am so confused. Even when I add it there and resolve the error it claims to have with the script it still shows the same error on the same line somehow. I have no idea what to do at this point I have tried to resolve it all day and have gotten nowhere not sure what else I can even try
Title: Re: Unhandled Exception when models are added
Post by: BluntStuffy on May 15, 2016, 07:55:06 am
Quote
It calls an error from my _loadout.gsc in my mod/mapname/maps folder despite it not even being there which makes no sense at all which is why I am so confused. Even when I add it there and resolve the error it claims to have with the script it still shows the same error on the same line somehow.

_loadout is compiled into any map, it just grabs the one from raw when compiling if it's not in your mod. What's the error?
Title: Re: Unhandled Exception when models are added
Post by: Psych on May 15, 2016, 08:02:10 am
_loadout is compiled into any map, it just grabs the one from raw when compiling if it's not in your mod. What's the error?

oops my bad I did not mean my mod folder. I mean I actually removed it from maps and even after a full recompile it still called the same error from it somehow even though it didnt exsist in maps anymore lol. But anyways here is the error:

I actually commented out those lines and it somehow still called the same error on the same line  :o

(https://www.ugx-mods.com/forum/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FHhB9ga5.jpg&hash=336c067985a595abcdd7218d149de833383ef5c5)
Title: Re: Unhandled Exception when models are added
Post by: BluntStuffy on May 15, 2016, 08:08:54 am
copy it into mods\mapname\maps\ and comment out only line 42.
_loadout is compiled into your mapname_patch, so if you havent recompiled that it still grabs the old version from there. Add it to your mod and edit it to fix the error, then it overwrite's the one that's in your _patch
Title: Re: Unhandled Exception when models are added
Post by: daedra descent on May 15, 2016, 09:22:20 am
If your not doing anything with the model(s) via script then developer(and developer_script) probably isn't going to help you. Its the engine itself thats throwing the unhandled exception, not the GSC compiler.
Title: Re: Unhandled Exception when models are added
Post by: Psych on May 15, 2016, 07:57:20 pm
If your not doing anything with the model(s) via script then developer(and developer_script) probably isn't going to help you. Its the engine itself thats throwing the unhandled exception, not the GSC compiler.

Yeah that makes sense and you know a lot more about the engine than I do so would there be any reason for this? Seems kind of odd that adding a model, something I have done a hundred times before into the map, would cause this sort of error all of the sudden? Oh and no they are not even script_models they are just normal xmodels so idfk

Double Post Merge: May 15, 2016, 07:57:43 pm
copy it into mods\mapname\maps\ and comment out only line 42.
_loadout is compiled into your mapname_patch, so if you havent recompiled that it still grabs the old version from there. Add it to your mod and edit it to fix the error, then it overwrite's the one that's in your _patch

Turns out it was a memory limit issue that only occurred on some compiles and not others. Fixed it by removing assets and such.