[MV] Game crash when using items

Sowhart

Villager
Member
Joined
Sep 30, 2016
Messages
20
Reaction score
2
First Language
English
Primarily Uses
Hello. So I've ran into a problem with a game I'm making and i have no idea what has caused this issue to happen. The issue being that whenever I use an item in battle, the game just crashes. 

Here's the error message I get:

https://gyazo.com/1b05c0f856a2fc64c26b2e284ee4524d


Here is also the console log I get when the error happens:
TypeError: Failed to execute 'createLinearGradient' on 'CanvasRenderingContext2D': float parameter 3 is non-finite.
    at TypeError (native)
    at Bitmap.gradientFillRect (file:///D:/RPGMakerMV/Games/TNQ/js/rpg_core.js:781:24)
    at Bitmap.gradientFillRect (file:///D:/RPGMakerMV/Games/TNQ/js/plugins/YEP_CoreEngine.js:622:41)
    at Window_BattleStatus.Window_Base.drawGauge (file:///D:/RPGMakerMV/Games/TNQ/js/plugins/YEP_CoreEngine.js:1449:17)
    at Window_BattleStatus.Window_Base.drawActorHp (file:///D:/RPGMakerMV/Games/TNQ/js/rpg_windows.js:555:10)
    at Window_BattleStatus.drawGaugeArea (file:///D:/RPGMakerMV/Games/TNQ/js/plugins/YEP_BattleStatusWindow.js:498:10)
    at Window_BattleStatus.drawItem (file:///D:/RPGMakerMV/Games/TNQ/js/plugins/YEP_BattleStatusWindow.js:468:10)
    at Window_BattleStatus.processStatusRefresh (file:///D:/RPGMakerMV/Games/TNQ/js/plugins/YEP_BattleEngineCore.js:5021:10)
    at Window_BattleStatus.updateStatusRequests (file:///D:/RPGMakerMV/Games/TNQ/js/plugins/YEP_BattleEngineCore.js:5012:50)
    at Scene_Battle.updateStatusWindowRequests (file:///D:/RPGMakerMV/Games/TNQ/js/plugins/YEP_BattleEngineCore.js:4283:24)

If anyone knows how I can fix this then I really appreciate any help. :)
 

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,696
Reaction score
935
First Language
English
Primarily Uses
N/A
Something has gone wrong with your plugins. Something that should be a number is becoming infinite, which is likely the result of a division by 0, or something equally invalid in regular mathematics. Check your configuration for Yanfly's plugins, since those are directly named in the stack trace, and see if you can find anything out of place.
 

Sowhart

Villager
Member
Joined
Sep 30, 2016
Messages
20
Reaction score
2
First Language
English
Primarily Uses
Something has gone wrong with your plugins. Something that should be a number is becoming infinite, which is likely the result of a division by 0, or something equally invalid in regular mathematics. Check your configuration for Yanfly's plugins, since those are directly named in the stack trace, and see if you can find anything out of place.

I couldn't find what was wrong with the plugins I was using but I've just noticed that the error still happens after turning off all my plugins as well. So I'm unsure on if it is a problem caused by plugins or if it is something else.

Error log without the plugins:
TypeError: Failed to execute 'createLinearGradient' on 'CanvasRenderingContext2D': float parameter 3 is non-finite.
    at TypeError (native)
    at Bitmap.gradientFillRect (file:///D:/RPGMakerMV/Games/TNQ/js/rpg_core.js:781:24)
    at Window_BattleStatus.Window_Base.drawGauge (file:///D:/RPGMakerMV/Games/TNQ/js/rpg_windows.js:469:19)
    at Window_BattleStatus.Window_Base.drawActorHp (file:///D:/RPGMakerMV/Games/TNQ/js/rpg_windows.js:555:10)
    at Window_BattleStatus.drawGaugeAreaWithTp (file:///D:/RPGMakerMV/Games/TNQ/js/rpg_windows.js:5518:10)
    at Window_BattleStatus.drawGaugeArea (file:///D:/RPGMakerMV/Games/TNQ/js/rpg_windows.js:5511:14)
    at Window_BattleStatus.drawItem (file:///D:/RPGMakerMV/Games/TNQ/js/rpg_windows.js:5484:10)
    at Window_BattleStatus.Window_Selectable.drawAllItems (file:///D:/RPGMakerMV/Games/TNQ/js/rpg_windows.js:1250:18)
    at Window_BattleStatus.refresh (file:///D:/RPGMakerMV/Games/TNQ/js/rpg_windows.js:5478:10)
    at Function.BattleManager.refreshStatus (file:///D:/RPGMakerMV/Games/TNQ/js/rpg_managers.js:2046:24)
 

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,696
Reaction score
935
First Language
English
Primarily Uses
N/A
Ok, then check your damage formulas. Maybe you're doing something that ends up diving by 0 or something equally as invalid.
 

Sowhart

Villager
Member
Joined
Sep 30, 2016
Messages
20
Reaction score
2
First Language
English
Primarily Uses
Ok, then check your damage formulas. Maybe you're doing something that ends up diving by 0 or something equally as invalid.

Ah, I think I've figured out the issue. Some of my items had 0% Variance which I think was the problem since changing that fixed the issue. 
Thanks for the help though. :)
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,367
Reaction score
7,676
First Language
German
Primarily Uses
RMMV
@Sowhart


Variance 0 will not make a problem in an intact project - if changing variance to non-zero everywhere solves the problem, then some of the code got damaged or became incompatible.


1) did you start a new game before those tests or did you load a saved game? Especially after turning off all plugins?


Some data is stored in the savefile, and whenever something changed on the plugins, you need to start a new game to prevent errors such as the one you had.


2) another cause for this class of errors might be incompatibilites between different file versions.


This should not happen if all plugins are turned off and a new game is started, but in any other case it can happen if the plugins and core files are from different versions of the editor, you should update everything to the latest version (after a backup in case one of your plugins is not yet compatible with the newest versions of the core engine)
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.

Forum statistics

Threads
105,868
Messages
1,017,085
Members
137,583
Latest member
write2dgray
Top