|
Verge crashes when I add another local INT or STRING Displaying 1-20 of 28 total.
12
next
Buckermann
|
As you can see from the title of this post, verge crashes withput a error when I try to declare a int or string in one of my functions. It dosen't matter in which function I try to declare it.
I guess it is the compiler, because I get a "vcc_verbose.txt" but no "V3.log".
Declaring variables as globals works fine.
Overall I have under 1000 lines of code (including comments).
2 include files; one with around 600 lines and one with only ~10 lines. The system.vc has around 300 lines.
I'm currently using the 04.21 build.
It would be really nice if somebody has a idea about what's wrong.
The vcc_verbose.txt:
Constructing VCCompiler object... Done.
int M_MenuC: offset 0, size 99, initializer:
int M_MenuC_X: offset 99, size 99, initializer:
int M_MenuC_Y: offset 198, size 99, initializer:
int M_List: offset 297, size 99, initializer:
int M_open: offset 396, size 1, initializer: =0
int M_MenuGD_Pic: offset 397, size 99, initializer:
int M_Menu_Max_Choices: offset 496, size 1, initializer: =251
string M_MenuCS: offset 0, size 251, initializer:
struct type declare STRUCT_TBMenu: 23 elements
struct instance declared TBMenu of type STRUCT_TBMenu (99 arraysize)
int diffxm: offset 2576, size 1, initializer:
int diffym: offset 2577, size 1, initializer:
int MTX: offset 2578, size 1, initializer:
int MTY: offset 2579, size 1, initializer:
func TB_Menu found with 1 args and shit.
func TB_MenuCopyStyle found with 2 args and shit.
func TB_MenuCloseAll found with 0 args and shit.
func TB_MenuClose found with 1 args and shit.
func LogM_List found with 0 args and shit.
func TB_CheckFontH found with 1 args and shit.
func TB_KeyUp found with 0 args and shit.
func TB_KeyDown found with 0 args and shit.
func TB_KeySelect found with 0 args and shit.
func TB_AnyKey found with 0 args and shit.
func TB_Wait found with 1 args and shit.
int Font: offset 2580, size 5, initializer:
int MouseCursor: offset 2585, size 1, initializer: =LoadImage("cur1.pcx")
int MouseBackup: offset 2586, size 1, initializer:
int MouseBackupX: offset 2587, size 1, initializer:
int MouseBackupY: offset 2588, size 1, initializer:
int MouseLayer: offset 2589, size 1, initializer:
int BackGroundLayer: offset 2590, size 1, initializer:
int WindowLayer: offset 2591, size 1, initializer:
int DisplayMouse: offset 2592, size 1, initializer: =1
int X_Res: offset 2593, size 1, initializer: =800
int Y_Res: offset 2594, size 1, initializer: =600
func autoexec found with 0 args and shit.
func InitMenu found with 0 args and shit.
func TB_Cursor found with 0 args and shit.
func TB_showpage found with 0 args and shit.
Compiling sysvc_global_initializers ->>>>
compiling libfunc LoadImage done
finished compiling globalinitializers
compiling function TB_Menu ->>>>
compiling libfunc RGB done
compiling libfunc RGB done
compiling libfunc RGB done
compiling libfunc FontHeight done
compiling libfunc EnableVariableWidth done
compiling libfunc ImageHeight done
compiling libfunc DuplicateImage done
compiling libfunc ImageHeight done
compiling libfunc Blit done
compiling libfunc ImageWidth done
compiling libfunc NewImage done
compiling libfunc GrabRegion done
compiling libfunc TextWidth done
compiling libfunc TextWidth done
compiling libfunc TextWidth done
compiling libfunc TextWidth done
compiling libfunc TextWidth done
compiling libfunc NewImage done
compiling libfunc RectFill compiling libfunc ImageWidth done
compiling libfunc ImageHeight done
compiling libfunc RGB done
done
compiling libfunc NewImage done
compiling libfunc RectFill compiling libfunc ImageWidth done
compiling libfunc ImageHeight done
compiling libfunc RGB done
done
compiling libfunc GrabRegion done
compiling libfunc GrabRegion compiling libfunc ImageHeight done
done
compiling libfunc GrabRegion compiling libfunc ImageWidth done
done
compiling libfunc GrabRegion compiling libfunc ImageWidth done
compiling libfunc ImageHeight done
done
compiling libfunc GrabRegion done
compiling libfunc GrabRegion compiling libfunc ImageHeight done
done
compiling libfunc GrabRegion done
compiling libfunc GrabRegion compiling libfunc ImageWidth done
done
compiling libfunc ImageWidth done
compiling libfunc ImageHeight done
compiling libfunc GrabRegion done
compiling libfunc NewImage done
compiling libfunc NewImage done
compiling libfunc ImageWidth done
compiling libfunc ScaleBlit compiling libfunc ImageHeight done
done
compiling libfunc ScaleBlit compiling libfunc ImageHeight done
done
compiling libfunc ScaleBlit compiling libfunc ImageWidth done
compiling libfunc ImageHeight done
done
compiling libfunc strcmp done
compiling libfunc NewImage compiling libfunc TextWidth done
done
compiling libfunc ImageWidth done
compiling libfunc ScaleBlit compiling libfunc ImageHeight done
done
compiling libfunc ScaleBlit compiling libfunc ImageHeight done
done
compiling libfunc ScaleBlit compiling libfunc ImageWidth done
compiling libfunc ImageHeight done
done
compiling libfunc ImageWidth done
compiling libfunc DuplicateImage done
compiling libfunc Blit done
compiling libfunc FreeImage done
compiling libfunc NewImage done
compiling libfunc TScaleBlit compiling libfunc ImageWidth done
compiling libfunc ImageHeight done
done
compiling libfunc len done
compiling libfunc TextWidth done
compiling libfunc PrintString compiling libfunc ImageWidth done
compiling libfunc TextWidth done
done
compiling libfunc ImageHeight done
compiling libfunc DuplicateImage done
compiling libfunc Blit done
compiling libfunc FreeImage done
compiling libfunc NewImage compiling libfunc ImageWidth done
done
compiling libfunc TScaleBlit compiling libfunc ImageWidth done
compiling libfunc ImageHeight done
done
compiling libfunc DuplicateImage done
compiling libfunc Blit done
Posted on 2004-05-20 18:36:31
|
rpgking
|
I had a weird problem like the one you described, to where when I added an extra variable anywhere, Verge crashes. So I went back and added an extra empty line at the end of all my source files, and it compiled fine... I'm not sure why that fixed it, but it worked.
Posted on 2004-05-20 19:08:21
|
Kildorf
|
Quote:Originally posted by rpgking
I had a weird problem like the one you described, to where when I added an extra variable anywhere, Verge crashes. So I went back and added an extra empty line at the end of all my source files, and it compiled fine... I'm not sure why that fixed it, but it worked. What I want to know is how you figured out to do that.
Posted on 2004-05-20 20:38:47
|
Buckermann
|
Sorry, no real winner.
I added a line at the beginning to all three source files one by one, starting V3 everytime afterward. No luck.
Then I added another line to all files. Still no luck.
Well, I thought, maybe I should try some lines at the end of the files. Again, no luck.
But then I added a declaration to some random functions.
Alas, it worked with all but one function! Sadly, this is the function where I need the new ints. And everytime I add a int or a string to this particular function, verge crashes.
I would post the function here, but it is around 400 lines(inluding comments) long. And I don't think it is the function itself who causes the trouble, because verge dosen't crash when I edit the function, like adding a loop or something.
I also tried:
deleting the system.XVC, just in case,
copying the content of my sourcefiles into new files and including them.
placing some function from the largest file into a new file.
Now I'm frustated.
(But thanks anyway for your suggestion, Rprking)
Posted on 2004-05-20 20:48:37
|
rpgking
|
Quote:Originally posted by Kildorf
Quote:Originally posted by rpgking
I had a weird problem like the one you described, to where when I added an extra variable anywhere, Verge crashes. So I went back and added an extra empty line at the end of all my source files, and it compiled fine... I'm not sure why that fixed it, but it worked. What I want to know is how you figured out to do that.
I remember there was a similar problem like this in early builds of Verge2, so I tried it. The code for my last HOV entry would not compile unless I did this. Maybe the compiler has been improved since then.
Posted on 2004-05-20 20:58:39 (last edited on 2004-05-20 20:59:08)
|
rpgking
|
Quote:Originally posted by Buckermann
Sorry, no real winner.
I added a line at the beginning to all three source files one by one, starting V3 everytime afterward. No luck.
Then I added another line to all files. Still no luck.
Well, I thought, maybe I should try some lines at the end of the files. Again, no luck.
But then I added a declaration to some random functions.
Alas, it worked with all but one function! Sadly, this is the function where I need the new ints. And everytime I add a int or a string to this particular function, verge crashes.
I would post the function here, but it is around 400 lines(inluding comments) long. And I don't think it is the function itself who causes the trouble, because verge dosen't crash when I edit the function, like adding a loop or something.
I also tried:
deleting the system.XVC, just in case,
copying the content of my sourcefiles into new files and including them.
placing some function from the largest file into a new file.
Now I'm frustated.
(But thanks anyway for your suggestion, Rprking)
If you still can't figure it out, might wanna try hosting your files somewhere so someone can take a look at it. It's kind of hard to see the problem without seeing the code...
Posted on 2004-05-20 21:01:24
|
Buckermann
|
After compairing the vcc_verbose file from a crash with a vcc_verbose file without a crash, I found that the next function to be compiled should be a NewImage function.
The last four lines of the crash vcc_verbose file:
compiling libfunc TScaleBlit compiling libfunc ImageWidth done
compiling libfunc ImageHeight done
done
compiling libfunc DuplicateImage done
compiling libfunc Blit done
And here the above four lines and some more from a non-crash vcc_verbose file:
compiling libfunc TScaleBlit compiling libfunc ImageWidth done
compiling libfunc ImageHeight done
done
compiling libfunc DuplicateImage done
compiling libfunc Blit done
compiling libfunc NewImage compiling libfunc ImageWidth done
compiling libfunc ImageHeight done
done
compiling libfunc GrabRegion compiling libfunc ImageWidth done
compiling libfunc ImageHeight done
That leads me to the conclusion that I don't know why NewImage crashes the verge compiler. Or if it's even the NewImage who is the culprit.
But I will see if I can upload my files somewhere.
Still frustated.
Posted on 2004-05-20 21:06:50
|
rpgking
|
I use NewImage in my menu system, and it compiles fine.
Posted on 2004-05-20 21:11:38
|
Buckermann
|
I also don't really think that it is NewImage that causes the crash. I used NewImage im my program quite some time before the compiler crashes.
But maybe it has something to do with the memory allocation when the compiler tries to allocate some memory to the NewImage.
Why this only happens when I add a int or string declaration to my function, still eludes me.
Maybe Vecna knows. Somebody care to explain the incantation to summon him to me?
But child sacrifices are out of the question. I already had to give the last one to the Treasury Department.
Posted on 2004-05-20 22:28:06
|
RageCage
|
The information you can povide with out actual code can only help us so much, maybe if you just post the 5 lines around the newImage()?
Posted on 2004-05-20 23:01:05
|
Buckermann
|
As you wish. But like I said, I don't believe that it's the NewImage function who causes the trouble.
I also tried comenting the NewImage out, but then the compiler will crash a few lines later at a IF statement.
(around line 250)
int M_MenuCS_IBackup = DuplicateImage(M_MenuCS_I);
Blit(0,0,M_MenuCS_I, M_MenuCS_IBackup);
int done =0;
int Update = 1;
int First_Time = 1;
int M_PY;
TBMenu[MenuNR].Pic_Restore = NewImage(ImageWidth(M_MenuCS_I), ImageHeight(M_MenuCS_I));
GrabRegion(M_M2X, M_M2Y, M_M2X+ImageWidth(M_MenuCS_I), M_M2Y+ImageHeight(M_MenuCS_I),0,0, BackgroundLayer, TBMenu[MenuNR].Pic_Restore);
//TB_wait(10);
while(TB_KeySelect())
{
TB_Wait(1);
}
while(!done)
{
//TB_ShowPage();
//TB_Cursor();
UpdateControls();
if (TB_KeyDown() || mouse.w (lower then) 0)
Posted on 2004-05-21 00:10:27 (last edited on 2004-05-21 00:11:42)
|
RageCage
|
ahh, after you said that about the problem changing places... let me let you in on a technique I use. use /* */ to initially comment out everything that might create errors, and make sure verge runs correctly. then uncomment some of it, chunk by chunk, each time seeing if verge runs correctly. once you get to the point it crashes again, try only commenting out the chunk you found it in, if it runs correctly start little by little uncommenting the lines within the chunk untill you find your error
Posted on 2004-05-21 12:32:18
|
vecna
|
I can't really help you debug this without being able to run it.
If you like, you can email me a zip of your project and I'll take a look.
Posted on 2004-05-21 12:53:29
|
Buckermann
|
Thanks Vecna!
I sended the ziped file to the Email adress in you user profile.
Subject line is "Verge Crash".
RageCage,
That is a technic I too usally use when I encounter a problem. But in this case it doesn't help me.
As long as I dont add a int or string declaration my function works as it should (more ore less, like allways). If I add any int/string declaration to the function, the compiler (my guess) crashes. After I comment the declaration out, everything works again.
Posted on 2004-05-21 13:36:22
|
vecna
|
Hmm, if you sent it, I haven't received it.
Its possible SpamAssassin ate it, I didnt see it in my spam folder but it is 1400+ messages at this time so I could've missed it.
You can try sending it to beirich at verge-rpg - it doesnt get any spam but I don't normally check it anymore unless I'm expecting something.
Posted on 2004-05-22 03:14:38
|
Buckermann
|
I mailed the file again, this time to your beirich adress. The zipped file is about 800kb in size.
I hope you'll get it this time.
Thanks again.
Edit:
Just in case you still didn't get the file, you can try this adress:
http://people.freenet.de/tabu_niw/tb_menu_01.zip
Posted on 2004-05-22 03:43:46 (last edited on 2004-05-22 04:08:58)
|
vecna
|
Is the zip supposed to crash as is? It seems to work for me. I tried adding a few local variables to autoexec() but its working there too. can you tell me exactly what code generates a crash for you?
Posted on 2004-05-25 01:50:30
|
rpgking
|
It worked for me too. And I declared ints/strings in random functions and it still worked.
Posted on 2004-05-25 02:44:04
|
Buckermann
|
That is strange.
What I do to crash Verge is very simple, I just change the beginning of the function int TB_Menu(int MenuNR) in the tb_menu.vc file from:
int TB_Menu(int MenuNR)
{
//int CrashTest;
to this:
int TB_Menu(int MenuNR)
{
int CrashTest;
And I don't think it's a problem with my Operating System, because I tried it under Win2K and Win98SE.
What kind of test editor do you use? Maybe it's a problem with TextPad (4.7.2 32 Bit Edition), which I use.
Posted on 2004-05-25 03:44:04
|
RageCage
|
yeah it's crashing me when I unignore that line... lemme see if I can figure out anything now...
Posted on 2004-05-25 03:53:04
|
Displaying 1-20 of 28 total.
12
next
|
|