• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Need Help Screen Freeze (exit-enter game)

Which of these ships is the best one in your opinion in terms of gameplay and or cosmetics?

  • HMS Endeavor/Dauntless (Gameplay in General)

  • HMS Endeavor/Dauntless (Cosmetics)

  • Soleil Royal (Gameplay in General)

  • Soleil Royal (Cosmetics)

  • US 2nd Rate Ship-of-the-Line/Victory (Gameplay in General)

  • US 2nd Rate Ship-of-the-Line/Victory (Cosmetics)


Results are only viewable after voting.

DavyJack

Pirate Queen
Staff member
Storm Modder
Hi! Sorry for the weird title. So, I always get this error log after I temporarily exit the game through windows key and check other files and go back but it somehow froze. Just the screen though. Everything else I think is still functioning. You can hear the background music and the sound effects when you do certain things like main menu and scroll or unsheathe/sheathe sword. Just the screen is frozen.

Here's more, there's a certain window of opportunity where I can exit and return to the game without a problem. I have to do it quick like no less than 20sec. More than that and the game screen will freeze.

error.log:
Code:
RUNTIME ERROR - file: battle_interface\BattleInterface.c; line: 720
process event stack error
RUNTIME ERROR - file: battle_interface\BattleInterface.c; line: 720
function 'Event' stack error
RUNTIME ERROR - file: NK.c; line: 3989
Using reference variable without initializing
RUNTIME ERROR - file: NK.c; line: 3989
Using reference variable without initializing
RUNTIME ERROR - file: NK.c; line: 3989
Using reference variable without initializing
RUNTIME ERROR - file: NK.c; line: 3989
Using reference variable without initializing
RUNTIME ERROR - file: NK.c; line: 3989
Using reference variable without initializing
RUNTIME ERROR - file: NK.c; line: 3989
Using reference variable without initializing
RUNTIME ERROR - file: NK.c; line: 3989
Using reference variable without initializing
RUNTIME ERROR - file: NK.c; line: 3989
Using reference variable without initializing
RUNTIME ERROR - file: NK.c; line: 3989
Using reference variable without initializing
RUNTIME ERROR - file: NK.c; line: 3989
Using reference variable without initializing
RUNTIME ERROR - file: NK.c; line: 3989
Using reference variable without initializing
RUNTIME ERROR - file: NK.c; line: 3989
Using reference variable without initializing
RUNTIME ERROR - file: NK.c; line: 3989
Using reference variable without initializing
RUNTIME ERROR - file: NK.c; line: 3989
Using reference variable without initializing
RUNTIME ERROR - file: NK.c; line: 3989
Using reference variable without initializing
NK.c:
Code:
string GetAttribute(ref tmp, string att)
{
    if(CheckAttribute(tmp,att)) return tmp.(att);     <-----------------This line
    return "-1";//MAXIMUS: and now we can use it for int and float check
}

*Oh and yes, I'm still using an older version of the game lol v14.941 :cheeky and I may have tweaked some other values to a number of files so feel free to ask. xD
 

Attachments

  • compile.log
    67.2 KB · Views: 187
  • engine.ini
    35.2 KB · Views: 183
  • error.log
    1.5 KB · Views: 201
  • system.log
    280 KB · Views: 200
Some times when this happens to me i alt+tab out of the game and in again maybe this would help you, @DavyJack.

No, not in this case as the "task switching" is exactly the problem...playing in fullscreen mode. The system.log:

The device cannot be reset

That means that focus was switched to another app while in fullscreen mode and the original did not implement/support properly resetting the DirectX device to allow resuming.

The only one that does support this properly in fullscreen is Maelstrom because I fixed it.
 
No, not in this case as the "task switching" is exactly the problem...playing in fullscreen mode. The system.log:

The device cannot be reset

That means that focus was switched to another app while in fullscreen mode and the original did not implement/support properly resetting the DirectX device to allow resuming.
You are correct @ChezJfrey but, i have taken a look at @DavyJack's engine.ini and full screen is set to 0, so task switching should work.

The only one that does support this properly in fullscreen is Maelstrom because I fixed it.
Nice!!! :cheers
 
Last edited:
You are correct @ChezJfrey but, i have taken a look at @DavyJack's engine.ini and full screen is set to 0...
Indeed, I disabled fullscreen mode ut still has the resolution running at 2560x1440 32bit xD
Not true, I fixed it a long time ago ;)
:shockwhy is it not working for me? :modding I disabled fullscreen mode in config.exe but still has the resolution running at 2560x1440 32bit and I'm running the game with the RivaTuner and set up ENGINE framerate limit to 60fps
 
Indeed, I disabled fullscreen mode ut still has the resolution running at 2560x1440 32bit xD

:shockwhy is it not working for me? :modding I disabled fullscreen mode in config.exe but still has the resolution running at 2560x1440 32bit and I'm running the game with the RivaTuner and set up ENGINE framerate limit to 60fps
LostDevice can occur in windowed mode also. Stock engines don't handle that in a correct way so there's nothing you can do in such cases
TBH, I don't remember how this can be fixed in the POTC engine.. you can either try @The Nameless Pirate advice or use @ChezJfrey engine if it can run NH
 
Well, I kind of figured out a workaround with this issue of mine. If I don't open any files while I'm temporarily out of the game through windows button with the fullscreen mode deactivated, I can check files that are already opened and go back to the game with no issue. So I have my console and several other files that I know I'm gonna need already opened before starting the game. Kinda tedious but whatever. xD It's not really fixed fixed so I'll leave the label as it is for now. Maybe someone will find a more permanent solution in the future. :yes:dance
 
Maybe someone will find a more permanent solution in the future. :yes:dance

The solution requires extensive recoding within the engine, so no script modding can solve it. As @kb31 already mentioned, there are other scenarios that can cause a lost device (spec indicates that all situations that can cause it are unspecified and unlisted), though usually it is changing focus in fullscreen mode. More details: Lost Devices (Direct3D 9) - Windows applications

I suspect that RivaTuner, or things like SwiftShader, that intercept and rework DX calls might also induce a Lost Device in certain cases even without fullscreen, but again, the engine must handle it properly and the original was flawed and vastly inadequate; the solution is to add much code to release and reestablish all DX resources (index/vertex buffers, textures, etc.) that use the default pool. This required much reordering of releases (all releases must be performed in reverse order of exactly when the resource was initialized in DirectX, else they don't really release when instructed and the reset still fails), adding procedures in every object to help reestablish properly, etc.

All of this has been done, as well as fixing the memory leaks, heap corruption...all the things listed in your signature that were hacked around in the various .dll files, but "correctly" in the source so without the side effects of causing more memory leaks and other corruptions in the game, which is what those hacks cause. But, no, this can't be done with the stock engine.
 
I had the same issue and finally fixed it today !
As you did, I changed my screen resolution and used config.exe by accident. It completly destroyed my "option" file to 0 kb of data.
Fortunately I found an old copy in a modding folder and put it in the main folder, and everything goes well right now !

I attached the file in a zip archive for those who encounter the same issue in the future.
 

Attachments

  • options.zip
    2 KB · Views: 157
I changed my screen resolution and used config.exe by accident. It completly destroyed my "option" file to 0 kb of data.
That doesn't make sense.
Config.exe only modifies engine.ini .

If you delete "options", the game will create a new clean one.
 
That doesn't make sense.
Config.exe only modifies engine.ini .

If you delete "options", the game will create a new clean one.

It happened after my use of config.exe though but sorry for the wrong hypothesis. So what can delete all of its data ? o_O I precise I never edited any file linked to options management or any value in engine.ini other than full_screen and screen_x-y.

Indeed I never tried to delete option file. It's definitely an easier way.
 
It's a known problem that sometimes the options file gets corrupted.
No apparent reason.

Usually it accumulates garbage end at the end though instead of suddenly becoming all empty.
So it's still really weird what happened in your case...

When you remove the options file, the game will reset to its defaults.
You'll have to change it back to your own preferences again.
 
Back
Top