May 06, 2024, 07:09:02 AM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


troubleshooting

Started by J B Wood (Zumwalt), May 13, 2006, 05:13:20 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

J B Wood (Zumwalt)

Is there any way we can add a step into process, so that we can debug line by line so that we can see where it is breaking?
This generic output is killing me, its hard as crap to debug:


Call stack
Auroa3ImpactProject! <missing symbols>
Auroa3ImpactProject! <missing symbols>
Auroa3ImpactProject! <missing symbols>
Auroa3ImpactProject! <missing symbols>
kernel32! RegisterWaitForInputIdle + 73

Integer Registers
EAX: 0x00A84D20, EBX: 0x00000000
ECX: 0x77D489EA, EDX: 0x00A84D20
EDI: 0x00000001, ESI: 0x00000000
ESP: 0x0012FE1C, EBP: 0x0012FE3C
EIP: 0x0040265E, EFL: 0x00000216
CS: 0x001B, SS: 0x0023
DS: 0x0023, ES: 0x0023
FS: 0x003B, GS: 0x0000

FP Registers
ST0: 1.#INF000000000000
ST1: -1.#IND000000000000
ST2: 0.0000000000000000
ST3: -1.#IND000000000000
ST4: 0.0000000000000000
ST5: 0.0008854948682711
ST6: 0.0000000000000000
ST7: 448.0000000000000000


I have no clue what any of that means, it doesn't tell me which line in the code it is stopping at or why.

Parker

You need to check "Debug build" in the project or single exe build dialog, then line numbers will be included in the debug information. I also use the visual studio debugger when something like that happens, because it's very descriptive, but sometimes you don't have that luxury. To add a breakpoint, add the line
#emit int 3
into your source file.

J B Wood (Zumwalt)

May 13, 2006, 05:56:48 PM #2 Last Edit: May 13, 2006, 05:59:59 PM by zumwalt
The project is already set at debug build, that is my output.
Well, its not consistant, sometimes it gives me that generic <> other times it tells me the line but not why.
Right now, it doesn't make any sense, the function accepts 4 floats in, and returns a unisgned integer.

So..
unsigned int Camera;
Camera=iCameraCreate(0.0,0.0,1.0,1.0);

This is supposed to create a scene camera, full screen. The return in a pointer to the camera object, or in other words, the unsigned integer.
What is happening now, is that it is holding on to the old crap in memory, no matter what I do to the code and exit from the application and go back in and recompile, it still gives me the same line.. mind you, I have gone as far as remarking out the entire code section, including the problem line, and it still comes back and tells me there is a call stack error as I posted, I have had to physically reboot for it to flush from memory. Which is very odd.

Back to the drawing board, atleast the include file is totally finished, I would post it, but without a working tech demo, I don't want to post the code for the include file.

J B Wood (Zumwalt)


Call stack
Auroa3ImpactProject! doImpact + 1096 File: C:\Program Files\Aurora\projects\Aurora3Impact\Aurora3ImpactApp.src, Line: 169
Auroa3ImpactProject! doImpact + 722 File: C:\Program Files\Aurora\projects\Aurora3Impact\Aurora3ImpactApp.src, Line: 118
Auroa3ImpactProject! main + 163 File: C:\Program Files\Aurora\projects\Aurora3Impact\Aurora3ImpactApp.src, Line: 53
Auroa3ImpactProject! main + 32
kernel32! RegisterWaitForInputIdle + 73

Integer Registers
EAX: 0x0040712C, EBX: 0x00000001
ECX: 0x5EEAD7D8, EDX: 0x7C90EB94
EDI: 0x00000001, ESI: 0x00000024
ESP: 0x0012FE30, EBP: 0x0012FE40
EIP: 0x00405598, EFL: 0x00000216
CS: 0x001B, SS: 0x0023
DS: 0x0023, ES: 0x0023
FS: 0x003B, GS: 0x0000

FP Registers
ST0: -1.#IND000000000000
ST1: -1.#IND000000000000
ST2: -1.#IND000000000000
ST3: -1.#IND000000000000
ST4: -1.#IND000000000000
ST5: 0.0002557831176091
ST6: 3910.5622558593750000
ST7: 3910.5622558593750000



///code


sub Init()
{

   print ("init phase\n");
   UINT CAMERA;
   #emit int 3
   Camera = iCameraCreate(0.0f,0.0f,1.0f,1.0f);
}

/// end code

#emit int 3
did nothing, and line 169 is that of the Camera.
which is defined in its dll as

CAMERA* iCameraCreate(float,float,float,float)

Where CAMERA* is a unsigned int

J B Wood (Zumwalt)

Ok, figured it out, here is the list:
First, this language is case sensitive, although you can define a variable:
UINT Camera;
and then tyr to do a :
UINT CAMERA;

The compiler will tell you duplicate name, however, that is misleading, they are NOT the same at runtime, don't make that mistake, although you have one say CAMERA, and another Camera, they are different in code at run time, make them the same syntax.

Another flaw, keys are mapped wrong:
#define DIK_LEFT            0xCB
#define DIK_RIGHT           0xCD
#define DIK_UP              0xC8
#define DIK_DOWN            0xD0

This works in visual studio, but left in this engine of 0xCB is down, right of 0xCD is UP, up of 0xC8 is right, and down of 0xD0 is left.
I'll have to make a program to announce the key translations, and show the mappings here. For now, they are off for these 4 keys.
Startup is choppy, I have a tech demo available, keys are mis-mapped, I'll rig it for the demo only, but it needs corrected.

Ionic Wind Support Team

Aurora is case insensiitive but the linker preserves case across object files. An import difference.

As for keys mapping wrong?  They are your defines as I don't have any direct input classes done yet.  Virtual keys are different than DIK codes.
Ionic Wind Support Team

J B Wood (Zumwalt)

No worries, I am posting the tech demo in the code sharing section for anyone who wants to see how to get this done.
I am also going to post a seperate thread on the 3Impact boards, there was a person over there asking about integration with your compiler and there engine.
Its 3 megs so I hope it will upload.

J B Wood (Zumwalt)

Added to the software projects, 3 megs was to much so I placed it on my ftp server with a download link, I did post the code folder as a zip in the projects section.
This was a proof of concept attempt, since I just got the software on friday, it took me a few days to get aclimated to the software, and there is still alot of stuff for me to learn with it. This will be interesting to see where this heads.

Hope someone finds the work I did useful.

Ionic Wind Support Team

We all appreciate your efforts.  Good job on learning a new language so quickly ;)
Ionic Wind Support Team

J B Wood (Zumwalt)

Thanks, next I need to figure out what to do with the source, where to put it to use it.
Shouldn't be to hard.