Author Topic: Need someone to test this  (Read 4517 times)

0 Members and 1 Guest are viewing this topic.

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Need someone to test this
I added a second macro similar to Assert which also includes a message (similar to Warning and Error) earlier today. It seems to work just fine on Windows but as I can't compile stubs.cpp I've got no idea if I've done something wrong for the other platforms.

Can someone take a look at the patch I've attached and check it compiles and works fine. To test it, simply pick a fighter from the tables and change the $Default PBanks: ( "x") entry to $Default PBanks: ( "")

[attachment deleted by evil Tolwyn]
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 
Re: Need someone to test this
Disclaimer: I haven't tested this, and I'm not sure of its usage in the system!

This might suffer from the same problem that FRED2 is having - very long message boxes.
STRONGTEA. Why can't the x86 be sane?

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Need someone to test this
It might but it doesn't have to.

Basically the difference is that instead of getting an error message like this
Code: [Select]
Assertion Failed!
---------------------------
Assert: sip->primary_bank_weapons[i] >= 0
File: Ship.cpp
Line: 3853
Call stack:

You can now add a message to the assertion so you get this

Code: [Select]
Assertion Failed!
---------------------------
Assert: sip->primary_bank_weapons[i] >= 0
File: Ship.cpp
Line: 3853

Ship Class Ulysses has no $Default PBanks supplied for bank 0
Call stack:


Which is much more useful when tracking down errors. The first one requires a coder to explain exactly what went wrong. The second one can be fairly easily interpreted by anyone who knows how to edit tables. As long as people aren't silly with what they put in the message it shouldn't cause an increase in the long message boxes as all it adds is an extra line or two.

In other cases we could use it to output a little more information about the state of a few key variables at the time of the assertion. That wouldn't be much use to the end user but it can save the coder minutes or even hours when it comes to tracking down the cause of a bug and may even make it unnecessary to replicate the bug.
« Last Edit: May 03, 2009, 08:33:52 am by karajorma »
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Re: Need someone to test this
Looks like solution of lot of my problems ,thanks Kajorama.
Now I only need to know how to make it work.

 

Offline ShadowGorrath

  • Not funny or clever
  • 211
Re: Need someone to test this
Would be very useful to me ;)

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Need someone to test this
Probably not so much for the error you posted earlier. There's not much useful information you can actually give for that assertion since the function actually causing it doesn't know which ship it is reading the data for.

But in the long run, it probably will help you.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Need someone to test this
You know, if no one tests this I'm just going to assume it works. :p
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: Need someone to test this
I haven't tested it, but the patch looks ok to me at least. :)

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Need someone to test this
I noticed I missed a small but important change. I only tested the debug version and forgot to change

Code: [Select]
#if defined(NDEBUG)
#define Assert(x) do {} while (0)

to

Code: [Select]
#if defined(NDEBUG)
#define Assert(x) do {} while (0)
#define Assertion(x, y, ...) do {} while (0)

Without that release won't build. :)
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Aardwolf

  • 211
  • Posts: 16,384
    • Minecraft
Re: Need someone to test this
I'll give it a try.

If I don't post again in a bit, my computer asplode. That or I forgot about this.

Edit: Wait... what am I doing responding to a post in Cross-Platform Development? Anyway, I've got it compiled now (for Windows) so I'll try it...
« Last Edit: May 10, 2009, 09:10:26 pm by Aardwolf »

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Need someone to test this
It works for Windows. :) But I suppose there is no such thing as an unnecessary bug test. :)
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Aardwolf

  • 211
  • Posts: 16,384
    • Minecraft
Re: Need someone to test this
I couldn't remember where MSVC put the EXE, and didn't bother to go looking for it.

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Need someone to test this
Usually puts it in the root level of the drive the project is on, and in the project folder itself in the Debug or Release folders.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline Aardwolf

  • 211
  • Posts: 16,384
    • Minecraft
Re: Need someone to test this
:bump:

I know this is the non-Windows board, but... has anything been done with this? Has it been committed?

Because right now windows_stub (where the applied patch was) is the only folder in my /code directory that isn't identical to what's in trunk...

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Need someone to test this
Yeah I think this is in now.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays