PDA

View Full Version : Runs on Win7 but not on XP



RobbeK
26-01-2014, 20:44
Hi all,

Same problem as previous ..
I stripped down the attached code to console and oxygen only. (w the intention to print 100 values to the console).
It gives one value on screen and then crashes.

(works on Win7)

best Rob

Charles Pegge
26-01-2014, 23:29
Could you try this one with XP, Rob.

The finish function (containing terminate) is important. It ensures that that Oxygen's global working memory is retained until explicitly released by this function. Otherwise it is automatically released on leaving o2_exec, causing the XP crash. Memory resources seem to be handled differently in Vista and Windows7, so the problem remains hidden.

sub finish link #pBye
terminate
end sub

RobbeK
27-01-2014, 00:39
Hi Charles,

Not yet -- but now I get an error signature ! (attached)

I saved the --- "send to MS" --- file too , if you need it ? (around 200Kb text ! I wonder why MS needs all this info - the prototype of the text shown on screen is different from the one to send (and this document is immidiatly erased, well ,well )

best Rob

Charles Pegge
27-01-2014, 00:56
Could be an overflow here:

function g3D() link #p3D
for i=0 to 99
dx=x
da=a+i/50
for j=1 to 100 ' should be 0 to 99?
..


You can also work arrays in base 0, if it is more convenient:

indexbase 0


then your index expression beomes slightly simpler:

m3D(i+100*j).y=..

RobbeK
27-01-2014, 01:14
Hi Charles,

Oops, yes ... looping till 10100 :-c

Yes, it works now on XP.
I'll have a look at that previous program, if terminate() and/or my erroneous index caused the crash.

so , with indexbase 0 then , dim (100) allocates 101 items ?? 0...100.

Many thanks, Rob

Charles Pegge
27-01-2014, 01:46
Yes, 101 items when dimensioning after an indexbase 0 directive. This is a BASIC legacy precaution.

RobbeK
27-01-2014, 11:34
Ah, ok , thanks ..

In that case :

tb : m(100)

O2 : m at #m --> O2's m(0) = TB's m(1) ..... till .... O2 m(99) = m(100) in TB.

The 0 indexbase (in this case) is the more logical imho , because the sequence x0, x1 ... xn contains n+1 values. (not excluding the starting point from a representation.)

.. then the step has to be dx/99 or dx/(n-1) in general to be conform with TB -- or in TB dim m(101) .. ok, got it.

best Rob