Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Exception..

  1. #1
    Developer Sor's Avatar
    Join Date
    Aug 2010
    Location
    The Medieval City of Bruges
    Posts
    747

    Default Exception..

    Razo can you explain to me why I get this error whenever I execute a script, which uses many new commands, too quickly during mapload?
    Reborn EXCEPTION: G_Prechache - RebornLoaderSetup! EXCEPTION CODE: -1073741819
    Also, did you make it we can spawn listeners before waittill spawn now? For some reason it works now and it definitely didn't before.
    Morpheus Script (MoH) => You try to shoot yourself in the foot only to discover that MorpheusScript already shot your foot for you.

  2. #2
    Über Prodigy & Developer Razo[R]apiD's Avatar
    Join Date
    May 2010
    Location
    Poland, Lublin
    Posts
    3,257

    Default

    There must be an error in reborn_loader.scr or any other script you try to run from sv_rebornloader so it doesn't get compiled and patch can't execute it, it throws an error which spawns an error in the engine.

    This is the most often reason.

  3. #3
    Developer Sor's Avatar
    Join Date
    Aug 2010
    Location
    The Medieval City of Bruges
    Posts
    747

    Default

    Funny thing is, if I execute it AFTER level waittill prespawn, the error never happens :s
    Morpheus Script (MoH) => You try to shoot yourself in the foot only to discover that MorpheusScript already shot your foot for you.

  4. #4
    Über Prodigy & Developer Razo[R]apiD's Avatar
    Join Date
    May 2010
    Location
    Poland, Lublin
    Posts
    3,257

    Default

    Then I'd need to check this in debugger to see what happens. If you can prepare a copy or something, it would be nice.

    Also you may need to use waitexec instead of waitthread, because it's not a good thing to run any threaded stuff in there. See what happens if you use waitexec.

    EDIT:

    There's also a small bug in flist. It may cause the error on irregular basis or return bad data that you later try to execute which may also cause an error.

    I've fixed it in my local copy and didn't put into test channel yet. I'll do this this evening. Maybe this is causing problems.

  5. #5
    Developer Sor's Avatar
    Join Date
    Aug 2010
    Location
    The Medieval City of Bruges
    Posts
    747

    Default

    I was actually using 'exec' but I've tried all four but the exception still pops up. However, I've been able to pin down the problem. Apparently reborn_loader.scr & all threads executed from it (or possibly all scripts in reborn/?)
    refuse to be read/executed further if a SimpleEntity with a targetname is spawned before level waittill prespawn.

    I explicitly mention the targetname because without it I don't encounter any problems. If do the same in a mapscript then it works like it should.

    When I used the flist command with as extension filter only one "." dot-character then I get extra results with just one or more dot-characters. Is this the bug you're referring to?
    Last edited by Sor; November 11th, 2012 at 11:55 AM.
    Morpheus Script (MoH) => You try to shoot yourself in the foot only to discover that MorpheusScript already shot your foot for you.

  6. #6
    Über Prodigy & Developer Razo[R]apiD's Avatar
    Join Date
    May 2010
    Location
    Poland, Lublin
    Posts
    3,257

    Default

    Nope. Single dot means current directory, double dot means previous directory.

  7. #7
    Developer Sor's Avatar
    Join Date
    Aug 2010
    Location
    The Medieval City of Bruges
    Posts
    747

    Default

    Any news on this issue, Razo? We need to be able to spawn entities before prespawn for the framework. So far, it's not working in any script connected to reborn_loader.scr.
    Morpheus Script (MoH) => You try to shoot yourself in the foot only to discover that MorpheusScript already shot your foot for you.

  8. #8
    Über Prodigy & Developer Razo[R]apiD's Avatar
    Join Date
    May 2010
    Location
    Poland, Lublin
    Posts
    3,257

    Default

    Can you provide me with a test .pk3 ?

    Does it only happen when you execute a lot of commands or whenever you try to create an entity?

  9. #9
    Developer Sor's Avatar
    Join Date
    Aug 2010
    Location
    The Medieval City of Bruges
    Posts
    747

    Default

    I've attached a zip file. Extract its contents using folder names into your main/ directory. Then simply run any map and the console should produce the exception.

    I've also discovered that not only the act of giving entities targetnames but also the act of referencing to a
    targetnamed entity before prespawn in any script executed from reborn_loader.scr results in the same error.

    I hope this narrows the problem down.
    Attached Files Attached Files
    Last edited by Sor; December 2nd, 2012 at 10:13 AM.
    Morpheus Script (MoH) => You try to shoot yourself in the foot only to discover that MorpheusScript already shot your foot for you.

  10. #10
    Developer Sor's Avatar
    Join Date
    Aug 2010
    Location
    The Medieval City of Bruges
    Posts
    747

    Default

    Okay, I think I have this problem figured out. Basically, it's due to the fact that reborn_loader.scr is executed so early.
    CM_LoadMap( maps/dm/mohdm1.bsp, 0 )
    Loading Reborn Loader...
    Adding script: 'dm/mohdm1_precache.scr'
    -------------------- Spawning Entities -----------------------
    soundtrack switched to .
    ^~^~^ Event 'sunflare' does not exist.
    ^~^~^ Failed execution of event for class 'World'
    MOHAA Archive Version 14
    172 memory allocated for navigation.
    -------------------- Actual Spawning Entities -----------------------
    -------------------- Actual Spawning Entities Done ------------------ 3 ms
    0 teams with 0 entities
    Adding script: 'dm/mohdm1.scr'
    Adding autosave names
    33 entities spawned
    94 simple entities spawned
    0 entities inhibited
    -------------------- Spawning Entities Done ------------------ 30 ms
    Notice how long it lasts before the mapscript gets loaded. This happens after 'Actual Spawning Entities' which
    refers to the spawning of entities found in the .bsp file.
    I tried the exact same thing in the map's precache script which as you can see is executed right before this event,
    and the game simply crashed. I'm guessing when you start up the execution of reborn_loader.scr, you enclosed the
    code in a try{}catch{}-statement which is how you prevent the crash.

    In short, the targetname system gets initialized at the start of the "Actual Spawning Entities" event. Why? Possibly as an
    optimization effort since the targetname system is quite nifty (eg: 'instant' array reconcatenation). The point is that it's
    awesome to have such a head-start to do pre-processing and stuff but I need my targetnamed entities ready by the
    time the mapscript is executed or by the time level waittill prespawn stops waiting.

    What I'm asking is, Razo, can you at present find out when the 'Actual Spawning Entities' event (bsp spawning) begins?
    Or does it need reversing? If so, could you provide a way to tell the script that the event has started? A cvar switch
    would be too slow to detect... but a void, parameterless ScriptThread command that pauses the calling script until this
    event has started, would be a godsend.

    I think 'level_waittill_bspspawn' has a nice ring to it since it would in fact behave just like 'level waittill <event>'.
    Last edited by Sor; February 11th, 2013 at 08:37 AM.
    Morpheus Script (MoH) => You try to shoot yourself in the foot only to discover that MorpheusScript already shot your foot for you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •