Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (549)
Games in Android Showcase (137)
games submitted by our members
Games in WIP (594)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  LWJGL enabling point sprites crashing  (Read 2637 times)
0 Members and 1 Guest are viewing this topic.
Offline roland
« Posted 2011-11-08 08:50:00 »

by enabling these 2 parameters my program crashes about half the time(producing a huge error log), the other half it works perfectly.
Does anyone know why this could be?


Offline gouessej

« In padded room »

« Reply #1 - Posted 2011-11-08 09:28:16 »


Which graphics card do you use? Are you sure this extension is supported on your hardware? Maybe it is simply a driver bug and then it has nothing to do with LWJGL.
Offline roland
« Reply #2 - Posted 2011-11-08 09:43:42 »

Its strange how it works sometimes though...

Primary Adapter      
Graphics Card Manufacturer   Powered by ATI   
Graphics Chipset   ATI Mobility Radeon HD 5650   
Device ID   68C1   
Vendor   1002   
Subsystem ID   144A   
Subsystem Vendor ID   103C   
Graphics Bus Capability   PCI Express 2.0   
Maximum Bus Setting   PCI Express 2.0 x16   
BIOS Version   
BIOS Part Number   BR38421.001   
BIOS Date   2010/09/07   
Memory Size   1024 MB   
Memory Type   DDR3   
Core Clock in MHz   550 MHz   
Memory Clock in MHz   800 MHz   
Total Memory Bandwidth in GByte/s   25.6 GByte/s   
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline theagentd

« JGO Bitwise Duke »

Medals: 383
Projects: 2
Exp: 8 years

« Reply #3 - Posted 2011-11-08 10:48:20 »

Probably a driver bug, but you might be doing something wrong. Seems like AMD strikes again...
What's the error?

Offline roland
« Reply #4 - Posted 2011-11-08 11:09:02 »

# A fatal error has been detected by the Java Runtime Environment:
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x69368f20, pid=1164, tid=6928
# JRE version: 6.0_29-b11
# Java VM: Java HotSpot(TM) Client VM (20.4-b02 mixed mode, sharing windows-x86 )
# Problematic frame:
# C  [atioglxx.dll+0x338f20]
# If you would like to submit a bug report, please visit:
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.

---------------  T H R E A D  ---------------

Current thread (0x0228a000):  JavaThread "main" [_thread_in_native, id=6928, stack(0x00240000,0x00290000)]

siginfo: ExceptionCode=0xc0000005, reading address 0x085d7c38

EAX=0x052b0640, EBX=0x00000001, ECX=0x0093ff6c, EDX=0x00000000
ESP=0x0028fa14, EBP=0x07c972ec, ESI=0x07c972b8, EDI=0x0028fa28
EIP=0x69368f20, EFLAGS=0x00010246

Top of Stack: (sp=0x0028fa14)
0x0028fa14:   07c972b8 07c972ec 00000000 00000020
0x0028fa24:   3f800000 41a00000 00000018 085aead0
0x0028fa34:   0028fa54 00000000 00000000 693688d5
0x0028fa44:   693688e2 41200000 00000000 07c972ec
0x0028fa54:   00000000 00000007 00000000 00000000
0x0028fa64:   07c972b8 6936820f 00000020 07c972b8
0x0028fa74:   69e89180 00000007 693f47ad 00000000
0x0028fa84:   07c972b8 00000001 00000007 6945d9ce

Instructions: (pc=0x69368f20)
0x69368f00:   24 14 52 6a 01 51 ff d0 f6 45 2c 21 0f 84 5d 01
0x69368f10:   00 00 80 fb 01 75 7b 8b 4d 48 69 c9 94 00 00 00
0x69368f20:   80 bc 31 14 0a 00 00 00 74 68 d9 ee 8b 4e 30 d9
0x69368f30:   54 24 18 8d 7c 24 18 d9 e8 d9 54 24 1c d9 5c 24

Register to memory mapping:

EAX=0x052b0640 is an unknown value
EBX=0x00000001 is an unknown value
ECX=0x0093ff6c is an unknown value
EDX=0x00000000 is an unknown value
ESP=0x0028fa14 is pointing into the stack for thread: 0x0228a000
EBP=0x07c972ec is an unknown value
ESI=0x07c972b8 is an unknown value
EDI=0x0028fa28 is pointing into the stack for thread: 0x0228a000

Stack: [0x00240000,0x00290000],  sp=0x0028fa14,  free space=318k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [atioglxx.dll+0x338f20]  atiPPHSN+0x8d530

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  org.lwjgl.opengl.GL11.nglBindTexture(IIJ)V+0
j  org.lwjgl.opengl.GL11.glBindTexture(II)V+16
j  map.MapObject.Draw()V+130
j  map.Map.Draw()V+196
j  Game.Draw()V+10
j  Main.<init>()V+99
j  Main.main([Ljava/lang/String;)V+3
v  ~StubRoutines::call_stub

looks like i could be doing something wrong... although I don't know what.
Offline theagentd

« JGO Bitwise Duke »

Medals: 383
Projects: 2
Exp: 8 years

« Reply #5 - Posted 2011-11-08 11:11:39 »

You're binding a texture! OMG! CALL THE POLICE!
Almost certain it's a driver bug. Check what you call glBindTexture() with?

Offline roland
« Reply #6 - Posted 2011-11-08 11:23:28 »

haha  Grin
It's just a particle image I load on startup.


Also: when it does work, the texture seems to take a while to load (Like the game is running, and my particles are drawing as untextured squares for about 2 seconds and then they switch to the texture they should be using Huh
Offline gouessej

« In padded room »

« Reply #7 - Posted 2011-11-08 11:44:41 »

Do you use textures whose size isn't a power of 2?
Offline princec

« JGO Spiffy Duke »

Medals: 452
Projects: 3
Exp: 16 years

Eh? Who? What? ... Me?

« Reply #8 - Posted 2011-11-08 12:55:41 »

This sounds like something else is up. You're not trying to load that texture in a different thread are you?

Cas Smiley

Offline roland
« Reply #9 - Posted 2011-11-08 23:03:32 »

thanks for the replies everyone.
I'm using a 64x64 texture, and my game is single threaded. I load the particle texture in a create method with all my other textures (and they work fine), so I think it's something strange with enabling point sprites
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Momoko_Fan

Junior Devvie

Medals: 2

« Reply #10 - Posted 2011-11-11 05:55:44 »

I believe there's a bug with certain versions of the ATI drivers that make point sprite crash when used to render lines or triangle meshes (e.g. non-point).
The solution is to enable point sprite only when rendering point meshes and disable it afterwards.
Offline gouessej

« In padded room »

« Reply #11 - Posted 2011-11-12 12:40:47 »

Thank you for the tip Momoko_Fan.
Offline roland
« Reply #12 - Posted 2011-11-28 10:10:35 »

Thanks Momoko_Fan!

That fixed it  Grin
Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.


Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

GamerIDGoesHere (20 views)
2015-01-27 01:23:23

GamerIDGoesHere (20 views)
2015-01-27 01:22:15

CopyableCougar4 (27 views)
2015-01-27 00:34:41

CopyableCougar4 (16 views)
2015-01-26 04:47:56

Olo (14 views)
2015-01-25 21:26:00

Olo (16 views)
2015-01-25 18:44:22

Robo11 (30 views)
2015-01-25 06:14:26

basil_ (27 views)
2015-01-17 22:29:32

wxwsk8er (26 views)
2015-01-16 21:42:21

wxwsk8er (22 views)
2015-01-16 20:44:20
2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21

Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!