showPicture crash

was trying to find the problem by debugging but I only got to this line after which there was no debugable code. I guess the crash happens inside the engine

Code:
Bitmap.prototype._onLoad = function() {
OK, I've had it.
I won't waste my free time on you any longer
If you can't answer questions then you can never expect any help from anyone around here.
@Andar didn't mean intentionally ignore your questions my mind is just somewhere else right now. sorry about that
and what exactly is that move picture you're trying to show?

the tiles the player can move to
Oh dear, it looks like one of these problems. My guess would be something breaking inside Pixi or its libraries. If it happens on a larger map and not on a smaller one, this could be RAM-related, as the images aren't able to be loaded and just crash the whole thing.

This will not be easy to debug for sure. First thing I'd recommend doing it to try and isolate the issue as much as possible. Does it still happen if you do nothing besides showing a picture? Can you show one, but run into problems when showing multiple? Basically try to create a function that causes a crash and make that function as simple as possible.

Also, have you changed the default pixi or nwjs versions (and if so to which ones)?
I found a way to reproduce the bug in empty map. First create a outside map size of 50x50. Then create an event that will trigger when player touches it and make it run this code:

Code:
for(let i = 1; i < 60; i++)
{
$gameScreen.showPicture( i, "Move", 0, ($gamePlayer.x + i) * 48, ($gamePlayer.y + i) * 48, 100, 100, 155, 0);
}

(and put the move image to img\pictures folder)
move.png


the game should crash when you trigger the event
Does it still happen if you do nothing besides showing a picture?

not sure how to try that

Also, have you changed the default pixi or nwjs versions (and if so to which ones)?

no they are same that came when I bought RM MV
Can you show one, but run into problems when showing multiple?

ran to this problem when using larger map size
havent tried single
we can only try to help you debug if you show the entire code + yo ucan set console.logs
like: console.log(`crash on showPicture`).
and set some in between to know WHERE the crash is or where it stops running.

as you only show a small portion of the code, it doesn't mean it is ONLY that portion,
but deeper in the code else where that is linked.

thats why we need more details and code to debug it like Andar said.

if you cannot answer or provide info we require, you get only "guesses" of a solution.

As a side note, more details is also more straight forwrd answer and solutions.
@ShadowDragon I just posted the repro to here: https://forums.rpgmakerweb.com/index.php?threads/showpicture-crash.162857/page-2#post-1396303

🙂
that isn't what we ask (a single line tells not much), as I said, the plugin code
could have a link which causes this crash, without knowing that code, we
cannot help you debug.

if you want straight answer, the ENTIRE code + screenshots are required.
if you provided that from the start or when asked, it might be already solved with
10 post, we are on 30 posts now, we can only guess and ask more questions in order
to help you solve it.

if you want it solve, than answer and provide stuff we ask you too.
if you want unwanted posts and guess that help you nowhere, than stop asking 🙂

We try to help you and give time in order for you to solve this part why it crashed,
without that, we just wasting time.
@ShadowDragon sorry I dont understand, the very reason of the crash can be reproduced by the steps I gave. If someone can solve that it will solve the very problem
I checked this thread and there seems to be some confusion (unless I'm the one confused, LOL). The crash happens even when he just spawns those pictures, it isn't about the plugin. My MV just takes an FPS drop, but otherwise no problems.
I checked this thread and there seems to be some confusion (unless I'm the one confused, LOL). The crash happens even when he just spawns those pictures, it isn't about the plugin. My MV just takes an FPS drop, but otherwise no problems.

did you try my repro? it may not crash 100% time but i can get it crashing that way....
I found a way to reproduce the bug in empty map. First create a outside map size of 50x50. Then create an event that will trigger when player touches it and make it run this code:

Code:
for(let i = 1; i < 60; i++)
{
$gameScreen.showPicture( i, "Move", 0, ($gamePlayer.x + i) * 48, ($gamePlayer.y + i) * 48, 100, 100, 155, 0);
}

(and put the move image to img\pictures folder)View attachment 283568

the game should crash when you trigger the event
I haven't been able to reproduce this sadly.
Spoiler: The result
1699802720952.png

I've created a new project, created a new 50x50 map, filled it with grass to be able to walk around, and created an event triggered by player touch with the script provided. It seems to behave as expected with no issues.
I've also tried it on a 999x999 map with the iteration count increased from 60 to 6000000, with the same result (albeit a bit slower).

One notable difference is that even though it's a fresh project, it's still of course using my updated version of nwjs. If this genuinely is the only difference between your setup and mine, then it is possible you've run across some really obscure nwjs bug which was fixed in a later version. Needless to say, in that case I'd highly recommend updating nwjs to 0.68 or later.
I haven't been able to reproduce this sadly.

ok so the problem could be in my setup, thx for letting me know ! 🙂
so anyone else tested my repro?
I'm about to update the nwjs but IDK what my current version is , the latest is 0.82.0 so its probably a big leap. just wanted to ask before I completely break my RM install 😉
check console log: process.versions if not mistaken.
when you open the arrow, you can check the nwjs version.

also win7 can go up to 0.6.8 I believe, win10+ above.
but for mv I recommend version 4.8.4 for nwjs with pixi 4.9.4 (which I use currently).

but you are free to go as high as you want though, make a backup first before adding it.
ok great I updated the nwjs (just copied the files over) and no more crashes!
though my repro doesnt always render anything, maybe some update issue
ok great I update the nwjs (just copied the files over) and no more crashes!
though my repro doesnt always render anything, maybe some update issue
If updating nwjs didn't work I'd probably be out of ideas, so I'm really glad that did it 😛
It's not everyday you run into problems this weird.

The repro not always rendering is probably just a simple logic error: you're using player coordinates in it, but show image uses screen coordinates (i.e. 0,0 will always draw on the top-left of the screen), so depending on the player's position it will sometimes try to draw it outside the screen.

EDIT: I've just realised that this is probably why it crashed on a 50x50 map but not on a 30x30 one. If you've made the same mistake in that larger script, then it wouldn't become apparent if the camera never moves, so map and screen coordinates are the same. And apparently in older versions of nwjs trying to draw something outside the screen just crashes the program rather than doing nothing.

Original thread: https://forums.rpgmakerweb.com/threads/showpicture-crash.162857/