раз вроде Exception in thread и точно незнаю но там было написано refresh и внизу javalangnullpointerexceptionУдалил обновил скачал 64 бит скачал 32 бит Java но ничто не помогает даже установил 64 бит и 32 бит две java видекарта intel
Ali
05.07.15
Технологии
1 ответ
При запуске программы вылетает вот такой отчёт об ошибке
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at core.Main.sendData(Main.java:76)
at core.Main$1.actionPerformed(Main.java:46)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Вот часть кода, где вылетает ошибка:
public static void sendData(Object obj) {
try {
output.flush(); //76 строка
output.writeObject(obj);
} catch (IOException e) {
e.printStackTrace();
}
}
Вот часть кода, где находится метод, в котором вылетает ошибка
public void actionPerformed(ActionEvent arg0) {
if (arg0.getSource() == b1) {
sendData(t1.getText()); //46 строка
}
}
The code:
RollerBall roller = new RollerBall(game);
roller.setPosition(new Vec2(-50,-120));
is not mentioned in the stack trace.
This is mentioned in the stack trace:
at game.RollerBall.inRangeLeft(RollerBall.java:23)
at game.StandStillState.update(StandStillState.java:10)
at fsm.FSM.update(FSM.java:47)
at game.RollerBall.preStep(RollerBall.java:39)
So the error is in here somewhere, but you have not shown line numbers:
public boolean inRangeLeft() {
Player p = game.getPlayer();
float gap = getPosition().x - p.getPosition().x;
return gap < RANGE && gap > 0;
}
So is game
, getPosition()
, p
, or p.getPosition()
null?
Actually, if the line numbers are consistent with the posting we can work it out. If:
game.RollerBall.preStep(RollerBall.java:39)
Then we can count back to line 23 and it’s this line:
Player p = game.getPlayer();
so I’m guessing that game
is null.
EDIT — Looking at your constructor:
game = game;
This won’t assign game
to your class’s game
field. You need this:
this.game = game;
0 / 0 / 0
Регистрация: 19.03.2012
Сообщений: 22
1
24.04.2014, 18:11. Показов 9049. Ответов 4
Помогите пожалуйста разобраться с ошибкой.
Java | ||
|
Java | ||
|
Текст ошибки
Connected.
clean
123
456
Exception in thread «AWT-EventQueue-0» java.lang.NullPointerException
at MainDebt.note(MainDebt.java:26)
at DebtWin$2.actionPerformed(DebtWin.java:76)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
0
GET: version.md5
Java Path: C:/Program Files (x86)/MinecraftLauncher1/jreAMD64/bin/java.exe
Heap size: 679.0
System Arch: amd64
16 achievements
Head acc: + 87
Body acc: + 8
CONFLICT @ -134
452 recipes
lang: ru_RU
water_mode: 0
anti_aliasing: 2
reflection_resolution: 4
reflective_items: true
reflective_clouds: false
reflect_player: true
render_v3: 1.0
water_surface_transparency: 0.05
waterfall_transparency: 0.4
water_color: 0.0, 0.4, 0.3
waterfall_color: 1.0, 1.0, 1.0
waterfall_fog: true
WARNING: Found unknown Windows version: Windows 7
Attempting to use default windows plug-in.
Loading: net.java.games.input.DirectAndRawInputEnvironmentPlugin
Starting up SoundSystem…
Initializing LWJGL OpenAL
(The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org)
OpenAL initialized.
Card name: NVIDIA Corporation
Connecting to n1.mcgl.ru, 1138
Remove /gui/planets/13.png
Remove /gui/planets/14.png
Remove /gui/systems/1024×512/0-on.png
Remove /gui/systems/1024×512/0-off.png
Remove /gui/systems/1024×512/1-on.png
Remove /gui/systems/1024×512/1-off.png
Remove /gui/systems/1024×512/2-on.png
Remove /gui/systems/1024×512/2-off.png
Remove /gui/systems/1024×512/3-on.png
Remove /gui/systems/1024×512/3-off.png
Remove /gui/systems/1024×512/4-on.png
Remove /gui/systems/1024×512/4-off.png
Remove /gui/systems/1024×512/bg.png
IP: 86.62.89.4
Server proto: 2
LOGIN: user = rostislav.bat, uid = 295684, proto = 2
Hogwarts
pos: -2,30,-46
Loc: 0 : 1377720000000
Add paint: http://forum.mcgl.ru/images/shyvakin/strelka, tm: 0
pos: -5,28,-20
Loc: 1381480628960 : 1380139200000
Add paint: http://forum.mcgl.ru/images/-_LeOn_-/gonki, tm: 0
pos: 1,30,-46
pos: 0,32,-25
pos: 6,28,-20
pos: 1,29,-25
Spawn PLAYER: CraftMan18RUS
Spawn PLAYER: DUMBASS77
Spawn PLAYER: vlad2003vlad
New max size: 324
New max size: 484
New max size: 784
Load URL: http://forum.mcgl.ru/getdata/295684/skin
Load region: map_57_-256_-256.png
Load URL: http://forum.mcgl.ru/getdata/295684/cloak
Load region: map_57_-256_0.png
Load region: map_57_0_-256.png
Load region: map_57_0_0.png
Load URL: clans/_npc
Load URL: http://forum.mcgl.ru/getdata/110344/skin
Load URL: http://forum.mcgl.ru/getdata/110344/cloak
Load URL: http://forum.mcgl.ru/getdata/391442/skin
Load URL: http://forum.mcgl.ru/getdata/391442/cloak
Load URL: http://forum.mcgl.ru/getdata/378035/skin
Load URL: http://forum.mcgl.ru/getdata/378035/cloak
java.lang.NullPointerException
at net.minecraft.I.em.B(Unknown Source)
at net.minecraft.I.em.A(Unknown Source)
at net.minecraft.N.e.C(Unknown Source)
at net.minecraft.N.cb.G(Unknown Source)
at net.minecraft.U.mo.A(Unknown Source)
at net.minecraft.G.ky.A(Unknown Source)
at net.minecraft.U.ro.A(Unknown Source)
at net.minecraft.U.mo.B(Unknown Source)
at net.minecraft.N.cb.?(Unknown Source)
at net.minecraft.client.Minecraft.S(Unknown Source)
at net.minecraft.client.Minecraft.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
java.lang.NullPointerException
at net.minecraft.L.D.A(Unknown Source)
at net.minecraft.L.H.I(Unknown Source)
at net.minecraft.L.A.run(Unknown Source)
java.lang.NullPointerException
at net.minecraft.L.D.A(Unknown Source)
at net.minecraft.L.H.I(Unknown Source)
at net.minecraft.L.A.run(Unknown Source)
java.lang.NullPointerException
at net.minecraft.L.D.A(Unknown Source)
at net.minecraft.L.H.I(Unknown Source)
at net.minecraft.L.A.run(Unknown Source)
java.lang.NullPointerException
at net.minecraft.L.D.A(Unknown Source)
at net.minecraft.L.H.I(Unknown Source)
at net.minecraft.L.A.run(Unknown Source)
java.lang.NullPointerException
at java.util.Hashtable.hash(Unknown Source)
at java.util.Hashtable.get(Unknown Source)
at java.util.Properties.getProperty(Unknown Source)
at java.util.Properties.getProperty(Unknown Source)
at net.minecraft.C.ogb.D(Unknown Source)
at net.minecraft.M.hrl.‹init›(Unknown Source)
at net.minecraft.client.Minecraft.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Stopping!
Exception in thread «AWT-EventQueue-0» java.lang.NullPointerException: component argument pData
at sun.java2d.windows.GDIWindowSurfaceData.initOps(Native Method)
at sun.java2d.windows.GDIWindowSurfaceData.‹init›(Unknown Source)
at sun.java2d.windows.GDIWindowSurfaceData.createData(Unknown Source)
at sun.java2d.d3d.D3DScreenUpdateManager.getGdiSurface(Unknown Source)
at sun.java2d.d3d.D3DScreenUpdateManager.createGraphics(Unknown Source)
at sun.awt.windows.WComponentPeer.getGraphics(Unknown Source)
at java.awt.Component.getGraphics(Unknown Source)
at sun.awt.RepaintArea.paint(Unknown Source)
at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
SoundSystem shutting down…
Author: Paul Lamb, www.paulscode.com