Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Bug GUI problems

Joined
Feb 24, 2020
Messages
33
Constantly i experience two problems:

1. When resizing the runmate window while in developer mode i get this weird stuff:
Code:
java.lang.OutOfMemoryError
java.lang.OutOfMemoryError
    at sun.misc.Unsafe.allocateMemory(Native Method)
    at java.nio.DirectByteBuffer.<init>(Unknown Source)
    at java.nio.ByteBuffer.allocateDirect(Unknown Source)
    at com.sun.prism.impl.BufferUtil.newByteBuffer(BufferUtil.java:90)
    at com.sun.prism.impl.BufferUtil.newIntBuffer(BufferUtil.java:121)
    at com.sun.prism.impl.QueuedPixelSource.getUnusedPixels(QueuedPixelSource.java:153)
    at com.sun.javafx.tk.quantum.UploadingPainter.run(UploadingPainter.java:147)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
    at com.sun.javafx.tk.RenderJob.run(RenderJob.java:58)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:125)
    at java.lang.Thread.run(Unknown Source)
this occurs when my system has about 8Gb of ram left.

2. Why does it happen that bots GUI showing statistics(exp/hr etc...) gets often polluted with random data/negative values, this happens often with many different bots its not problem of one bot per se.
 
cuppa.drink(java);
Joined
Mar 13, 2018
Messages
7,101
I'm not sure about the error you're seeing but,

Why does it happen that bots GUI showing statistics(exp/hr etc...) gets often polluted with random data/negative values, this happens often with many different bots its not problem of one bot per se
This can be for a few different reasons. There's not a standard way to track this type of stuff in a bot, so a lot of methods people use are just kinda flawed and prone to breaking. Also a lot of bots just haven't been updated in a long time, so while the bot works fine which is why the bot is still up, the gui might be buggy.
 
Joined
Feb 24, 2020
Messages
33
I'm not sure about the error you're seeing but,


This can be for a few different reasons. There's not a standard way to track this type of stuff in a bot, so a lot of methods people use are just kinda flawed and prone to breaking. Also a lot of bots just haven't been updated in a long time, so while the bot works fine which is why the bot is still up, the gui might be buggy.

yeah that doesn't say much, what are the technical details surround this problem?

lets image we have something like:
Code:
public void onExperienceGained(SkillEvent event) {
        if (event.getSkill() == Skill.STRENGTH){
            GUIcontroller.strengthXP = Skill.STRENGTH.getExperienceAsPercent();
            GUIcontroller.strengthXPgained = GUIcontroller.strengthXPgained + event.getChange();

            Platform.runLater(() -> GUIcontroller.strengthBar.setProgress(GUIcontroller.strengthXP/100.0));
            Platform.runLater(() -> GUIcontroller.strengthPercent.setText(GUIcontroller.strengthXP + "%"));
        }

so how does the variable GUIcontroller.strengthXPgained gets polluted with random data so easily? Is this some kind of thread separation problem or wtf is going on here? Sometimes it happens on initialization otherwise it just happens randomly.

I don't know java even less so javaFX so just asking as its quite annoting.
 
Top