Malfunction W1301

Posted By: pegamode

Malfunction W1301 - 09/24/21 06:23

Hey there,

while running the beta tests for our game, we noticed some sporadic crashes.

In the acklog.txt we always find the message:

Malfunction W1301

e.g.

Malfunction W1301: specBump.fx: Can't open file

Either the game crashes right after that or a bit later after some more files couldn't be opened.

All those files have been opened hundreds or thousand of times before in the game.
There seems to be something in the code that leeds to this behaviour, but we can't figure out what it might be.

Is there anything known to this issue? Any hints what we have to search for?

Best regards,
Sascha.
Posted By: jcl

Re: Malfunction W1301 - 09/28/21 11:34

Maybe the same file was accessed by another software or process at the same time.
Posted By: pegamode

Re: Malfunction W1301 - 09/28/21 11:53

The game only runs once and there's no other software accessing this file.

Is it possible that the engine accesses this file multiple times itself? The shader is assigned to several Entities so each of them accesses the file when it is created.

Also after this error occurs neither "file_save" nor "file_open" are working anymore.
Posted By: jcl

Re: Malfunction W1301 - 09/30/21 16:52

The engine won't access the same file twice, even when assigned to multiple entities. But if file functions don't work when this error was encountered, it might be a more global access problem unrelated to that particular file. It can be any file then. Does it only happen on one particular machine or on several PCs?
Posted By: pegamode

Re: Malfunction W1301 - 09/30/21 17:31

We had this issue at least on two different PCs.
Posted By: pegamode

Re: Malfunction W1301 - 02/02/22 06:58

We still have this issue.

I added log messages for "exe_dir" and "work_dir" and also the included paths.
They all look good when the error occurs.

The shader is set by mtl_set (it is not included in the mdl file itself).

Any other idea why the engine can't open this file? The error only occurs after playing the game for a long time and it's always this file.

And I've just encountered another question.
How exactly does DirectX / A8 access this file. I did a test where I removed the specBump.fx file while the level (and the entity using this shader) was already loaded and running.
The W1301 error occured immediately right after removing the file from the shaders folder. I didn't expected this behaviour and thought the error might only occur when loading the next level (wanted to check if the shader is cached or not).
Posted By: pegamode

Re: Malfunction W1301 - 02/02/22 14:13

We did some further analysis and noticed that the issue is not related to the loading of this file.

After playing the game a longer time at some point the engine isn't able to load or save any file.
As we load the specBumb.fx with every room change, it's just the most common file operation.

Though levels, their models etc. are still be loaded, commands like "file_open_read" return no valid handle.

At this point a "file_save" leads directly into an engine crash.

Any suggestion where to search? Any hint why the engine can't read or write any file anymore?
Posted By: jcl

Re: Malfunction W1301 - 02/02/22 21:13

Does this happen with any file? Even files outside the game?
Posted By: pegamode

Re: Malfunction W1301 - 02/02/22 21:33

Once the problem starts there seems to be at least three different commands that are not working any more:

1) mtl_set -> w1301 when it tries to read a fx file from the shaders folder (PATH is set correctly)
2) file_open_read -> returns 0 when it tries to read a file from the user's roaming folder
3) file_save -> engine crash when it tries to save a file into the user's roaming folder

All those commands are working fine until the point where suddenly all those commands are not working anymore.
Until now the problem occured only when the game was running for a long time. Last time it occured the tester played about 90 minutes until the issues started.

We use a nexus of 200mb and there were always at least 50mb left free.
From the task manager the game uses about 800mb of memory and VMMap shows a heap of about 1.1GB to 1.2GB.
Unfortunately we don't have memory values at the timepoint when the problem occurs yet.

Edit:

By the way ... level_load seems to work fine although the other commands fail ... our tester was able to walk through several rooms after the w1301 occured.
After every level_load we have a file_ope_read that returned 0 after the w1301 and the engine crashed when the tester tried to save (file_save).
Don't know why level_load is working while the other commands don't.
© 2024 lite-C Forums