Lemmings Forums

NeoLemmix => Bugs & Suggestions => Closed => Topic started by: mobius on September 09, 2021, 01:20:17 AM

Title: [BUG] PLAYER -- division by zero error when dowload styles
Post by: mobius on September 09, 2021, 01:20:17 AM
It simply says; "failed to download/// or / cannot read nxmo file etc. Attempted to divide by zero"

this error occurs for me a number of ways;

-When I try to 'update all styles'
-when I tried to download all styles at once
-when trying to load this level here: https://www.lemmingsforums.net/index.php?topic=5746.msg93489#msg93489
    the second level in question would get an error in the player saying some terrain pieces are missing; attempt to download missing styles? If clicked yes; this error appears. Some (most if not all, judging by the preview image, which seemed to work correctly??) of the terrain pieces load correctly.

-As in the attached error it seems to happen when there is a problem with nxmo (or nxmt) text file. Proxima confirmed that the issue with that particular file was a text error; a line was missing from the file. Maybe this occurred because of a recent update to how the text files should read?


When I have time (tomorrow hopefully) I will try to look at some of the files from L2 space and Raymanni's Toy set to see if there are similar text issues there as well, but I'm not sure if these two separate bugs I reported are related at all. It'll be really annoying if there's like one or a few text files out of the entire set that are an issue. Or is there some easy way to check for these type of issues?

EDIT by namida: Struck-out some of the text that is more to do with the bug reported in mobius's other topic, rather than this bug.
Title: Re: [BUG] PLAYER -- division by zero error when dowload styles
Post by: namida on September 09, 2021, 06:23:29 PM
The NXMO file you've attached is not expected to work with NL 12.10 and onwards. There were some minor tweaks to the format in 12.7; the editor dropped support for the older format very shortly afterwards, while the player kept support up to (inclusive) 12.9.4 but dropped it from 12.10.0 onwards (except for NXLV files, which backwards compatibility for is still maintained).

In order to work, it will need the following changes (none of this is case-sensitive):
- "EXIT" -> "EFFECT EXIT"
-> "FRAMES 6" -> "$PRIMARY_ANIMATION" / "FRAMES 6" / "$END" (three lines)

In particular, I made a point of updating myself all styles that were submitted to NL's style library. Obviously, I couldn't do anything for unreleased-at-the-time styles directly, though I did release a tool that would automate the format update for everything except custom pickup skill objects. There were a few cases where - despite me making as much of a big deal as I reasonably could about pointing out that this had happened, that the downloadable copies had already been format-updated, etc - people submitted "updates" to their styles that were based off the pre-12.7 copies, and had not been updated, resulting in the styles effectively "reverting" to the old format and becoming a ticking time bomb that broke when 12.10 released - unfortunately I don't have the patience to inspect every single style submission to look for this kind of thing, but I believe most cases have been sorted out now, and at any rate, creators would notice it unless they're still running a very outdated version of NL (and there isn't much I can do about people who refuse to keep updated, short of making NL refuse to run if it detects an available update, which - especially given that update checks should be possible to disable, and that a minority but non-negligable portion of the userbase has experienced issues with it - is not a path I am willing to go down).

As far as the issue with those levels in the other topic go - they are a seperate bug, which I have gone into more detail about in that topic.

I have struck-out the issue from this topic that are already covered by your other one, or otherwise unrelated to the style manager bug. Regarding the bug in the style manager itself, that is something I'll need to do some testing / looking over the code to sort out.
Title: Re: [BUG] PLAYER -- division by zero error when dowload styles
Post by: namida on November 16, 2021, 07:57:58 PM
Are you still having this (or any other) issue directly with downloading styles? (ie: error messages during or immediately after downloading / updating styles, before exiting the style manager)
Title: Re: [BUG] PLAYER -- division by zero error when dowload styles
Post by: mobius on November 17, 2021, 12:35:18 AM
I've let the player automatically and manually download styles a few times since then and have not had this or any other serious issue.