View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0001211 | FSSCP | multiplayer | public | 2007-01-13 19:58 | 2008-09-13 22:27 |
| Reporter | FUBAR-BDHR | Assigned To | WMCoolmon | ||
| Priority | normal | Severity | crash | Reproducibility | random |
| Status | resolved | Resolution | fixed | ||
| Product Version | 3.6.9 | ||||
| Summary | 0001211: Assert: banks_fired <= 3 | ||||
| Description | Received this error yesterday playing mission ts-bandit_m01.fs2. Not the first time I have seen it. Really don't have any more info on it. | ||||
| Additional Information | I was hosting 3.6.9 (1-12-07 build) players said they were running 3.6.9 final (1-1-07 build). No mods or media on my end. | ||||
| Tags | No tags attached. | ||||
|
2007-01-13 19:58
|
|
|
|
Was working on a mission today. No problems until I added an enemy wing of Seraphim bombers. First time I tested it after that I got this error. Don't know if it has something to do with the 3 banks of primaries or the 4 banks of seconaries but seems like a darn good possibility. |
|
|
Received the same error today while testing Kara's standalone fixes. Uploading logs from the standalone (the one that cashed) and the client (no crash just lost connect) |
|
2008-07-04 00:26
|
|
|
2008-07-04 00:27
|
|
|
|
Not going to work on this. |
|
|
I may have found the problem - cant really test if i'm right though. In ship.cpp ~ line 10661 banks_fired |= (1<<bank_to_fire); And later on this is handled by the same 'banks_fired <= 3' assertion though with ships having three primary banks it can quite possible get values up to 7. |
|
|
I've seen it too. That's a good candidate for it. I'll keep an eye out for it. |
|
|
It's in send_NEW_primary_fired_packet in MultiMsgs.cpp. The packet itself just sends notification that the ship needs to fire its primaries, and doesn't actually include anything based on the number of primaries. The problem is that a ship with three primaries will have bank_to_fire set to 0, 1, 2 if it fires all three primaries. 2^0+2^1+2^2 = 7. So Wanderer's right. It's the Assert that's the problem at this point. I'd recommend changing the assert to read "Assert ( banks_fired < (2^MAX_SHIP_PRIMARY_BANKS) );". If it still gets triggered, then something else is going on. But there's really not much reason to have that assert in send_NEW_primary_fired_packet anyway, since it doesn't care whether two primary banks are fired or two hundred. It just passes on the ship_fire_primary function call to the host or other clients. |
|
|
I'm going to implement my proposed 2^MAX_SHIP_PRIMARY_BANKS change in my next build, to see if that fixes things. |
|
|
It won't. 2^MAX_SHIP_PRIMARY_BANKS is 2 XOR MAX_SHIP_PRIMARY_BANKS. i.e 1 Which means it will assert almost every time. Took me some head scratching to notice that one though. |
|
|
I'm confused if 2^MAX_SHIP_PRIMARY_BANKS is the xor or an exponential |
|
|
It's definitely XOR. I noticed the problem when I ran a multiplayer mission and the client asserted as soon as it fired the primaries (even though banks fired was 1). From what I can see if you want to do powers you use the pow() function from math.h since if it didn't call bitwise XOR when you wrote int^int then it never would. |
|
|
That sounds right to me, I think I had to use pow() back in CS 228. |
|
|
Fixed with Kara's removal of the Assert (it was unneeded) |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2007-01-13 19:58 | FUBAR-BDHR | New Issue | |
| 2007-01-13 19:58 | FUBAR-BDHR | Status | new => assigned |
| 2007-01-13 19:58 | FUBAR-BDHR | Assigned To | => taylor |
| 2007-01-13 19:58 | FUBAR-BDHR | File Added: Media-01-13-07a.rar | |
| 2007-01-20 06:55 | FUBAR-BDHR | Note Added: 0007497 | |
| 2008-07-04 00:26 | FUBAR-BDHR | Note Added: 0009432 | |
| 2008-07-04 00:26 | FUBAR-BDHR | File Added: Core2Quad-07-03-08a.rar | |
| 2008-07-04 00:27 | FUBAR-BDHR | File Added: Media-07-03-08a.rar | |
| 2008-07-17 16:38 | taylor | Note Added: 0009476 | |
| 2008-07-17 16:38 | taylor | Assigned To | taylor => |
| 2008-07-17 16:38 | taylor | Status | assigned => new |
| 2008-08-23 09:13 | Wanderer | Note Added: 0009600 | |
| 2008-08-23 12:14 | karajorma | Note Added: 0009603 | |
| 2008-08-30 00:44 | WMCoolmon | Note Added: 0009622 | |
| 2008-08-30 01:27 | WMCoolmon | Status | new => assigned |
| 2008-08-30 01:27 | WMCoolmon | Assigned To | => WMCoolmon |
| 2008-08-30 01:28 | WMCoolmon | Note Added: 0009624 | |
| 2008-08-30 01:28 | WMCoolmon | Status | assigned => feedback |
| 2008-09-03 21:30 | karajorma | Note Added: 0009644 | |
| 2008-09-03 23:09 | phreak | Note Added: 0009645 | |
| 2008-09-04 05:49 | karajorma | Note Added: 0009648 | |
| 2008-09-05 03:46 | chief1983 | Note Added: 0009651 | |
| 2008-09-13 22:27 | WMCoolmon | Status | feedback => resolved |
| 2008-09-13 22:27 | WMCoolmon | Resolution | open => fixed |
| 2008-09-13 22:27 | WMCoolmon | Note Added: 0009667 |