Author Topic: The v1.22 beta bug report thread!  (Read 6144 times)

Qon

  • Full Member
  • ***
  • Posts: 112
    • View Profile
The v1.22 beta bug report thread!
« on: October 23, 2013, 07:41:46 am »
1st: Amazing work! <3
Now... what we have all been waiting for: Let's get started with the bug reports!

The game qrashed while I was flying around, no real qode (empty Step) running at that moment:
Code: [Select]
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

the _3D() funqtions used with a not yet loaded qoordinate qrashes the game. Hard to avoid since there is no way to know if a place is safe to qall a _3D() funqtion on. (When the game is starting everything is loading so no qooordinate is safe really)
Supporter since 2013-09-08 17:16 GMT+1

Toupie

  • Jr. Member
  • **
  • Posts: 62
    • View Profile
Re: The v1.22 beta bug report thread!
« Reply #1 on: October 23, 2013, 09:06:24 pm »
PushVoxelTo() still don't remove the the voxel type when quantity reaches zero. (PlaceVoxel works.)

If you pick up a single voxel from the inventory with the mouse, it is possible to place it with a right click but still having it on the mouse.  So when you let go off the left mouse button it will place the voxel as zero quantity. It is also possible to pick up this zero quantity voxel and move it somewhere. There is no visual differance between a single voxel and a zero quantity voxel in the inventory since neither of them show a quantity number.


Toupie

  • Jr. Member
  • **
  • Posts: 62
    • View Profile
Re: The v1.22 beta bug report thread!
« Reply #2 on: October 25, 2013, 07:59:40 pm »
User Texture Engine (voxelinfo_75.txt) does not have a MiningType.
This makes it so you can't pick up the User Texture Engine that you get when you start with the constructor/destructor tool you have when you start.

Toupie

  • Jr. Member
  • **
  • Posts: 62
    • View Profile
Re: The v1.22 beta bug report thread!
« Reply #3 on: October 27, 2013, 01:02:10 am »
The result from GetGameTime() seems to start over from 0 at an odd time. I've seem the value go as high as 1271305784 before starting from 0. But 1271305784 isn't even near max value for a 32 bit integer. And the value also seems to start very high.

If I did the math correctly there should take 49 days before the value would overflow in an unsigned 32 bit integer, half that if it's signed and only positive numbers are used. But I've seen it start over from 0 several times in one day.

olive

  • Administrator
  • Full Member
  • *****
  • Posts: 149
    • View Profile
Re: The v1.22 beta bug report thread!
« Reply #4 on: October 27, 2013, 02:57:13 am »
The result from GetGameTime() seems to start over from 0 at an odd time. I've seem the value go as high as 1271305784 before starting from 0. But 1271305784 isn't even near max value for a 32 bit integer. And the value also seems to start very high.

If I did the math correctly there should take 49 days before the value would overflow in an unsigned 32 bit integer, half that if it's signed and only positive numbers are used. But I've seen it start over from 0 several times in one day.

Yep, that's not regular. Shouldn't have such values. So, there is a problem hiding somewhere.

With the last modification the values are now relative from the start of the game and saved when exiting. So, value shouldn't be so high.

Will look at that.
Blackvoxel is now a free software!  Visit the official website http://www.blackvoxel.com
Follow us on twitter | Follow us on facebook

Qon

  • Full Member
  • ***
  • Posts: 112
    • View Profile
Re: The v1.22 beta bug report thread!
« Reply #5 on: October 27, 2013, 02:04:25 am »
Code: [Select]
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

I'm trying to build endless fraqtals which means heavy usage of the *3D() functions.
I'm running this sqript (which is a work in progress) and when I get down to y=-500 or something like that the BV qlient qrashes.
The qomputer voxel should have millions or billions of user textured voxel 1 (or just change the sqript to use something else you have plenty of)
Code: [Select]
function log(str) {
Display(str,1000,2,0)
print(GetGameTime() + " " + str + "\n") //print doesnt work properly, use error instead
//error(GetGameTime() + " " + str + "\n")
}
function Voxel_Load() {
log("GetGameTime() " + GetGameTime())
//for(local q=0; q<16; ++q) log(""+q+": "+GetInfoName(q)+" = "+GetInfo(q))
/*log("callee() " + callee())
log("getroottable() " + getroottable())
log("getconsttable() " + getconsttable())
log("resurrectunreachable() " + resurrectunreachable())
log("collectgarbage() " + collectgarbage())
log("getstackinfos(0) " + getstackinfos(0))
log("_versionnumber_ " + _versionnumber_)
log("_version_ " + _version_)
log("_charsize_ " + _charsize_)
log("_intsize_ " + _intsize_)
log("_floatsize_ " + _floatsize_)*/
}
function mengerSponge(q) {
/* Menger sponge
* http://en.wikipedia.org/wiki/Menger_sponge
* The 3D version of the Sierpinski qarpet http://en.wikipedia.org/wiki/Sierpinski_carpet
* fqmax[xyz]-fqmin[xyz] (xyz = 1,2,3) should be 3^n for n-th iteration.
* Uses 20^n voxels in a 27^n volume
* n == 1 makes a 3x3x3 qube where each face is missing the center qube and where the qube in the center of the fraqtal is missing. Uses 20 qubes in a volume of 27.
*/
local x=q[0]-fqmin[0], y=q[1]-fqmin[1], z=q[2]-fqmin[2]
x = abs(x)
y = abs(y)
z = abs(z)
local l = fqmax[0]-fqmin[0]
while(x>0 && y>0 && z>0 && l>0){
if((x%3==1 && (y%3==1 || z%3==1)) || (y%3==1 && z%3==1))
return 0
x/=3
y/=3
z/=3
l/=3
}
return 1
}
qv <- null
pf <- null
pv <- null
opf <- null
opv <- null
init <- 1

state <- 0
dmin <- null
dmax <- null
fqmin <- null
fqmax <- null

p <- null

farDist <- 64
function Voxel_Step()
{
pf = [GetPXf(), GetPYf(), GetPZf()]
pv = [GetPX(), GetPY(), GetPZ()]
if(init){
opf = pf
opv = pv
init = 0
}


set()
dmin = vadd(pv, [-farDist,-farDist,-farDist])
dmax = vadd(pv, [farDist,farDist,farDist])
fqmin = [0,0,0]//dmin
fqmax = [81,81,81]
local q1 = 0, q2=0
for(local x=dmin[0]; x<=dmax[0];) {
for(local y=dmin[1]; y<=dmax[1];) {
for(local z=dmin[2]; z<=dmax[2];) {
++q1
/*if((abs(x-pv[0])<farDist-1 && abs(y-pv[2])<farDist-1 && abs(z-pv[2])<farDist-1)
||
   (abs(x-opv[0])<=farDist && abs(y-opv[1])<=farDist && abs(z-opv[2])<=farDist) ){
} else {*/
local L = Look3D(x-p[0],y-p[1],z-p[2])
if (L!=108){
PickVoxel3D(x-p[0],y-p[1],z-p[2])
if(mengerSponge([x,y,z]))
PlaceVoxel3D(x-p[0],y-p[1],z-p[2],32768)
++q2
}
//}
++z
if(//(abs(x-pv[0])<farDist-1 && abs(y-pv[2])<farDist-1 && abs(z-pv[2])<farDist-1)
//||
       (abs(x-opv[0])<=farDist && abs(y-opv[1])<=farDist && abs(z-opv[2])<=farDist) ) {
//x=max(pv[0]+farDist-1, opv[0]+farDist+1)
//y=max(pv[1]+farDist-1, opv[1]+farDist+1)
z=max(pv[2]+farDist, opv[2]+farDist+1)
}
}
++y
}
++x
}
log("dmin "+dmin[0] +" "+ dmin[1] +" "+ dmin[2] +"   dmax "+ dmax[0] +" "+ dmax[1] +" "+ dmax[2]+" "+q1+" "+q2)

opf = pf
opv = pv
if(Look3D(GetPX()-GetX(),GetPY()+7-GetY(),GetPZ()-GetZ())==0)
MoveVoxel3D(0,0,0, GetPX()-GetX(),GetPY()+7-GetY(),GetPZ()-GetZ())
}
function Voxel_Unload() {}
function GetPX(){
return GetInfo(4)
}
function GetPY(){
return GetInfo(5)
}
function GetPZ(){
return GetInfo(6)
}
function GetPXf(){
return GetInfo(1)
}
function GetPYf(){
return GetInfo(2)
}
function GetPZf(){
return GetInfo(3)
}
function max(a,b) {
return a>b?a:b;
}
function min(a,b) {
return a<b?a:b;
}
function abs(a) {
return (a>=0?a:-a);
}
function sqr(a){
return a*a
}
function dist(a, b) {
return sqr(a[0]-b[0]) + sqr(a[1]-b[1]) + sqr(a[2]-b[2])
}
function vsub(a, b) {
return [a[0]-b[0], a[1]-b[1], a[2]-b[2]]
}
function vadd(a, b) {
return [a[0]+b[0], a[1]+b[1], a[2]+b[2]]
}
function vabs(a) {
return [abs(a[0]), abs(a[1]), abs(a[2])]
}
function veq(a, b) {
return (a[0]==b[0] && a[1]==b[1] && a[2]==b[2])
}
function set() {
p = [GetX(), GetY(), GetZ()]
}

And farDist=64 is the view distance it uses. It isn't fast enough to fly around with so the value is too high for real time generation but it's also too low since a "draw distance" is awkward. Would be nice with access to the terrain generation interface to get same generation speed as the procedural terrain you generate :>
« Last Edit: October 27, 2013, 02:17:10 am by Qon »
Supporter since 2013-09-08 17:16 GMT+1

olive

  • Administrator
  • Full Member
  • *****
  • Posts: 149
    • View Profile
Re: The v1.22 beta bug report thread!
« Reply #6 on: October 27, 2013, 02:17:39 am »
@Qon
We will test that. Maybe an "out of memory" issue. If so, that's already fixed with the next version.
Blackvoxel is now a free software!  Visit the official website http://www.blackvoxel.com
Follow us on twitter | Follow us on facebook

Toupie

  • Jr. Member
  • **
  • Posts: 62
    • View Profile
Re: The v1.22 beta bug report thread!
« Reply #7 on: October 27, 2013, 10:46:10 am »
v1.22b2
Got this message when I switched program on a programmable robot. Switched from one small script that has run without problems to another small script that has run without problems. The only thing special is that the game and the robot had been running for 12+ hours.

Code: [Select]
Assertion failed: _gc_chain==NULL, file /home/laurent/workspace/blackvoxel/src/sc_Squirrel3/squirrel/sqstate.cpp, line 204

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

Qon

  • Full Member
  • ***
  • Posts: 112
    • View Profile
Re: The v1.22 beta bug report thread!
« Reply #8 on: October 27, 2013, 10:56:45 pm »
The player-voxel interaction beqomes less precise under heavy load. Shift to avoid walking over the edge stops you at very different distances from the edge or sometimes not at all.
Supporter since 2013-09-08 17:16 GMT+1

Qon

  • Full Member
  • ***
  • Posts: 112
    • View Profile
Re: The v1.22 beta bug report thread!
« Reply #9 on: October 27, 2013, 11:55:25 pm »
Code: [Select]
PickVoxel3D(0,0,0)Qrashes the BV qlient :>
Supporter since 2013-09-08 17:16 GMT+1

Toupie

  • Jr. Member
  • **
  • Posts: 62
    • View Profile
Re: The v1.22 beta bug report thread!
« Reply #10 on: October 28, 2013, 01:04:55 pm »
V1.22b3 on Windows

GetPath(), GetInfo() and GetInfoName all just return -1 when called in Voxel_Load or Voxel_Unload where we really need them.

GetPath(0) return 3 instead of 4 as said in the release notes, but GetPath(4) returns the correct result.

olive

  • Administrator
  • Full Member
  • *****
  • Posts: 149
    • View Profile
Re: The v1.22 beta bug report thread!
« Reply #11 on: October 28, 2013, 07:30:45 pm »
V1.22b3 on Windows

GetPath(), GetInfo() and GetInfoName all just return -1 when called in Voxel_Load or Voxel_Unload where we really need them.

GetPath(0) return 3 instead of 4 as said in the release notes, but GetPath(4) returns the correct result.

Thanks a lot. That's fixed. New beta released now.

Code: [Select]
PickVoxel3D(0,0,0)Qrashes the BV qlient :>

Also fixed.
Blackvoxel is now a free software!  Visit the official website http://www.blackvoxel.com
Follow us on twitter | Follow us on facebook

olive

  • Administrator
  • Full Member
  • *****
  • Posts: 149
    • View Profile
Re: The v1.22 beta bug report thread!
« Reply #12 on: October 29, 2013, 03:12:15 am »
The player-voxel interaction beqomes less precise under heavy load. Shift to avoid walking over the edge stops you at very different distances from the edge or sometimes not at all.

Yes, the physic engine must be improved to better handle very heavy load situations.

As we had tried to avoid this kind of scenario in the game, this wasn't an urgent problem.

But we had planed to improve it at some point because it could happens. So it will be improved in the future.
Blackvoxel is now a free software!  Visit the official website http://www.blackvoxel.com
Follow us on twitter | Follow us on facebook

olive

  • Administrator
  • Full Member
  • *****
  • Posts: 149
    • View Profile
Re: The v1.22 beta bug report thread!
« Reply #13 on: October 29, 2013, 03:12:57 am »
Found a bug in GetInfo(22) when Voxel_Unload() is called during a program change. The program number indicated was wrong. Fixed.
Blackvoxel is now a free software!  Visit the official website http://www.blackvoxel.com
Follow us on twitter | Follow us on facebook

Toupie

  • Jr. Member
  • **
  • Posts: 62
    • View Profile
Re: The v1.22 beta bug report thread!
« Reply #14 on: October 31, 2013, 02:11:46 am »
v1.22b4 on Windows

PickVoxel3D(x,y,z) seems to fail when z is anything but 0.