Author Topic: How to fix crashing cos of Shiny Water?  (Read 511 times)

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
How to fix crashing cos of Shiny Water?
« on: January 26, 2015, 11:50:37 pm »


               

So I just found that one of the tile (ttu01_g15_01 - underdark stream into wall) Ive modified for my Community Patch project is causing crashes when Shiny Water is enabled. At least with mine graphic card (Geforce GT 640). The reason why I didn't noticed before is probably because this happens only with compiled models and Im usually testing with models in ASCII format. Or maybe this started after driver update I don't know, but I would like to solved it.


 


The problem is that nothing in my fixes caused this, If i take vanilla model decompile it and compile again the crash occurs as well. I tried to decompile&compile it by using NWMaxPlus but same story. I tried to clean it up with cleanmodels with water fixups enabled but still crashing. Is there anything else I can possibly do to avoid this? I mean other than keeping that tile uncompiled.


 


Note it looks its happening only with water in underdark, if I do this in forest tileset its not crashing.



               
               

               
            

Legacy_OldTimeRadio

  • Hero Member
  • *****
  • Posts: 2307
  • Karma: +0/-0
How to fix crashing cos of Shiny Water?
« Reply #1 on: January 27, 2015, 02:35:36 am »


               

First, how reliably can you make this crash your system?  What does that look like?  Blue screen or exit to desktop or...?


 


Second, when does it crash your system?  When you turn on shinywater or something like that?


 


Third, are you 100% sure it's the shiny water?  Like, have you pointed at a different texture for the water to see if it was something else which caused the crash?


 


I decompiled it using the decompiler included with Acaos' NWN Explorer Reborn 1.63 and compiled it using the same without any modifications.  On recompilation, I received the following error(s):


Compiling: ttu01_g15_01.asc

ttu01_g15_01.asc(1397): Warning: Face 21 contains duplicate vertices (39 39 41),  ignored

ttu01_g15_01.asc(1745): Warning: Face 19 contains duplicate vertices (36 37 36),  ignored

Total Execution time = 62 ms


 


After recompiling, I couldn't elicit any crashes, switching back and forth to shinywater with the tile in view.  Did you receive those errors when you recompiled? 


 


Whose compiler did you use?  When you say you decompiled and recompiled it with NWMax Plus, do you mean the compiler that comes with the scripts?



               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
How to fix crashing cos of Shiny Water?
« Reply #2 on: January 27, 2015, 03:31:30 am »


               


First, how reliably can you make this crash your system?  What does that look like?  Blue screen or exit to desktop or...?




100% reliable. Huge fps drop, either nothing or last frame in NWN, 100% cpu or gpu workload, whole computer slowed down and Nvidia error window pops after a while which confirmation will shutdown NWN.



 


Second, when does it crash your system?  When you turn on shinywater or something like that?



Yes, as soon as I turn off shiny water its doing what I explained above (its not a crash to be precise).



 


Third, are you 100% sure it's the shiny water?  Like, have you pointed at a different texture for the water to see if it was something else which caused the crash?



Good idea and yes if I use ttu01_black it does not crashes.



 


After recompiling, I couldn't elicit any crashes, switching back and forth to shinywater with the tile in view.  Did you receive those errors when you recompiled? 


 


Whose compiler did you use?  When you say you decompiled and recompiled it with NWMax Plus, do you mean the compiler that comes with the scripts?



Yes, no. More specific. I tried everything for decompiling/compiling. NWNExplorer 1.63, NWMaxPlus, nwnmdlcomp (that fixed version), cleanmodels. These two errors have nothing to do with this as cleanmodels can get rid of them but it still crashes.


               
               

               
            

Legacy_OldTimeRadio

  • Hero Member
  • *****
  • Posts: 2307
  • Karma: +0/-0
How to fix crashing cos of Shiny Water?
« Reply #3 on: January 27, 2015, 03:53:00 am »


               

I dunno.  If you want to send me your crashing model I can at least confirm that it does not crash on this end, which would point to driver differences.  If you'd like to do that, just make sure to let me know if you have a specific animation loop enabled on the tile so I can try to reproduce it as best as I can.


 


The code for shiny water is very old and driver implementation, even on NVidia cards, may be moving in and out of compliance with new driver releases.  When I first got this laptop (which has an on-chip ATI card and a discrete one), shinywater didn't work at all.  Only with recent driver releases has it started working agian.  I have every reason to believe ATI will break it again in the future.



               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
How to fix crashing cos of Shiny Water?
« Reply #4 on: January 27, 2015, 04:38:32 am »


               

It is driver related, since to reproduce it all you have to do its decompile that model, compile back and put into override.


 


Still. The vanilla compiled models are not doing this, neither uncompiled ones. That means that there is something wrong in the compiling process in nwnmdlcomp.exe (I believe NWMax uses it as well) something which might be avoided.



               
               

               
            

Legacy_Tiberius_Morguhn

  • Sr. Member
  • ****
  • Posts: 396
  • Karma: +0/-0
How to fix crashing cos of Shiny Water?
« Reply #5 on: January 27, 2015, 05:41:31 am »


               


It is driver related, since to reproduce it all you have to do its decompile that model, compile back and put into override.


 


Still. The vanilla compiled models are not doing this, neither uncompiled ones. That means that there is something wrong in the compiling process in nwnmdlcomp.exe (I believe NWMax uses it as well) something which might be avoided.




 


As an aside to this - is there really any benefit to compiling models anymore on modern systems?  I can see the need for pre-compilation on circa-2002 systems when NWN was released (and developed on even older hardware), but is it really useful now?  I seem to recall someone did some load speed tests on compiled versus non-compiled models, but my search-fu is lacking....


               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
How to fix crashing cos of Shiny Water?
« Reply #6 on: January 27, 2015, 06:16:37 am »


               


As an aside to this - is there really any benefit to compiling models anymore on modern systems?  I can see the need for pre-compilation on circa-2002 systems when NWN was released (and developed on even older hardware), but is it really useful now?  I seem to recall someone did some load speed tests on compiled versus non-compiled models, but my search-fu is lacking....




And that speed test showed its still faster to have them compiled. Anyway, since the crash is not occuring due to my edits in tile I think I can keep that tile uncompiled and deal with it.


 


I just thought that great modelling wizards might encounter this in past and have some good suggestion how to fix this.


               
               

               
            

Legacy_Proleric

  • Hero Member
  • *****
  • Posts: 1750
  • Karma: +0/-0
How to fix crashing cos of Shiny Water?
« Reply #7 on: January 27, 2015, 07:49:50 am »


               

I've encountered this problem with OC tiles. It may be card-related, but I advise players to turn Shiny Water off.



               
               

               
            

Legacy_Pstemarie

  • Hero Member
  • *****
  • Posts: 4368
  • Karma: +0/-0
How to fix crashing cos of Shiny Water?
« Reply #8 on: January 27, 2015, 10:53:35 am »


               

How big is your texture. I recall a thread where the modeler had made some new water tiles and was having this issue. they were using a 512x512 texture. Their resolution was reducing the size of the texture to 256x256. Have you tried that?



               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
How to fix crashing cos of Shiny Water?
« Reply #9 on: January 27, 2015, 12:19:21 pm »


               


How big is your texture. I recall a thread where the modeler had made some new water tiles and was having this issue. they were using a 512x512 texture. Their resolution was reducing the size of the texture to 256x256. Have you tried that?




Good idea, it was Chaos Theocrat and I put his her water fix into my patch. Tried to replace "bitmap TTU01_water" with "bitmap ttz01_water01" but after compiling it crashed nevertheless.



               
               

               
            

Legacy_Pstemarie

  • Hero Member
  • *****
  • Posts: 4368
  • Karma: +0/-0
How to fix crashing cos of Shiny Water?
« Reply #10 on: January 27, 2015, 01:04:09 pm »


               

Is it possible it's the "water fix" causing issues? Not the smaller cube texture, but something within the TXI files associated with those textures.



               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
How to fix crashing cos of Shiny Water?
« Reply #11 on: January 27, 2015, 02:10:11 pm »


               


Is it possible it's the "water fix" causing issues? Not the smaller cube texture, but something within the TXI files associated with those textures.




no as the fix is not for TTU01_water bitmap but only for tilesets from Patch 1.69


               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
How to fix crashing cos of Shiny Water?
« Reply #12 on: January 28, 2015, 05:14:10 am »


               

Hm... Today it stopped crashing but instead it messed up with icons on my quickbar.


 


Anyway, I tried few more things and found something.


 


I tried to change TTU01_water for ttf01_water01, previously it didn't work with ttz01_water01 but this time no problems! So I was trying to compare whats different, unfortunately even when I copied txi (2changes) or differences in water mesh I wasn't able to make it work without the crash/icons mess.


 


However, using ttf01_water01 fixes the issue and it looks absolutely the same. So I think Im going for it unless there is a reason  why I shouldn't?



               
               

               
            

Legacy_OldTimeRadio

  • Hero Member
  • *****
  • Posts: 2307
  • Karma: +0/-0
How to fix crashing cos of Shiny Water?
« Reply #13 on: January 28, 2015, 02:27:48 pm »


               

I guess the thing I wonder is, at that point, are you actually fixing a legitimate bug or just tweaking it to work better on your, personal, system.  I realize it may be difficult to honestly tell the difference sometimes.


               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
How to fix crashing cos of Shiny Water?
« Reply #14 on: January 28, 2015, 03:12:51 pm »


               


I guess the thing I wonder is, at that point, are you actually fixing a legitimate bug or just tweaking it to work better on your, personal, system.  I realize it may be difficult to honestly tell the difference sometimes.




As I see it I am fixing a bug in external model compiler. Problem which is not related to my work but when appears on anyone elses system it will be brought up as my patch issue. And I can't afford that. Had to change few script because of a bug in external script compiler already, this is the same issue.


 


I can't afford that anyone else using my community patch will get same crash. Unlike CEP, where bugs and issues are pardoned, any mistake I do is punished hard.