Author Topic: ErrorMania  (Read 3554 times)

0 Members and 1 Guest are viewing this topic.

Peter

  • Guest
ErrorMania
« on: July 11, 2012, 07:17:30 AM »
Deleted.
« Last Edit: May 05, 2015, 11:50:57 AM by Peter »

Charles Pegge

  • Guest
Re: ErrorMania
« Reply #1 on: July 11, 2012, 09:59:55 AM »
Hi Peter,

I use text markers for trimming the memory image. PE files require each section to be trimmed to the nearest 512 bytes. In the memory image, 4096 bytes is required.

Have you tried running empty frames? what components cause the GPF....

Charles

Aurel

  • Guest
Re: ErrorMania
« Reply #2 on: July 11, 2012, 10:35:57 AM »
Hi Peter ...
I found that problem is in your Timer code..
btw in Timer2
look:
Code: [Select]
TestUfos
Timer1
'Timer2
Timer3
Timer4

Then work without crushing...why i don't know... :-\

Aurel

  • Guest
Re: ErrorMania
« Reply #3 on: July 11, 2012, 10:43:15 AM »
Hmm weird im not sure what i do i just add comment
in line where jv is set to null:

Sub Timer2()
jv = jv +1
iF jv =50
   'jv=0
   jx = jx +1
   iF jx = 21 Then jx=1
End iF
End Sub

And looks that there is no crush.. ::)

Aurel

  • Guest
Re: ErrorMania
« Reply #4 on: July 11, 2012, 10:48:10 AM »
Hey Peter.. :)

Game work on excellent speed on my old 1.6GHz Pentium4 . ;)
Of course i test version with your win.inc
 

Charles Pegge

  • Guest
Re: ErrorMania
« Reply #5 on: July 12, 2012, 06:46:20 AM »
Looks almost identical to LoadBmp apart from /xframes /yframes.

Have you tried using loadbmp to see if it still crashes?
Also possible array overflows? These often cause unpredictable crashes.

Charles

Aurel

  • Guest
Re: ErrorMania
« Reply #6 on: July 12, 2012, 08:24:50 AM »
I replace static type with ordinary INT inside fn LoadTiles():
Code: [Select]
Function LoadTiles(string File, sys xFrame,yFrame) as sys
iF xFrame=0 Then xFrame=1
iF yFrame=0 Then yFrame=1
int id: iF id <512 Then id +=1
THnd(id) = call LoadImage 0,File,0,0,0,16
THdc(id) = call CreateCompatibleDC(hdc)
call SelectObject THdc(id), THnd(id)
call GetObject THnd(id), sizeof info, &info
TWidth (id) = info.bmWidth /xFrame
THeight(id) = info.bmHeight/yFrame         
Return id
End Function       

and also i replace single with float type just to test how work.
float jv,zv,dv,r,za
And game work fine with good speed..
« Last Edit: July 12, 2012, 08:33:46 AM by Aurel »

Charles Pegge

  • Guest
Re: ErrorMania
« Reply #7 on: July 12, 2012, 10:49:53 AM »

If it is an array boundary problem, the bug may not lie within LoadTiles, it looks fine to me, but without sight of your source code, I can only speculate.

When I'm really stuck I perform a type of binary convergence. It catches the most obscure bugs, and though it can be time consuming,  it has not failed me yet. What is your debugging procedure Peter?

Charles

Aurel

  • Guest
Re: ErrorMania
« Reply #8 on: July 12, 2012, 01:28:47 PM »
Quote
I killed this thread
There are too many experts here and I'm completely stupid.

Next time I will ask my Grandmother, she is computer woman scientist.

Hey man...
Don't be angry....
I am not expert at all ,especially not for games.
I just use method try-work/try-not->work
that is all...i know something about GUI programming in some languages
but sometimes i stuck in some things that i cannot belive why don't work
how i mean that must work...i hope you understand... ;)

Aurel

  • Guest
Re: ErrorMania
« Reply #9 on: July 12, 2012, 01:32:06 PM »
Quote
Aurel,  STOP TESTING!

I am not STUPID!

Ok...man..im stupid to for many,many things...