Author Topic: Bug Reports  (Read 155919 times)

0 Members and 1 Guest are viewing this topic.

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Bug Reports
« Reply #1560 on: October 17, 2011, 07:29:55 pm »
Hmmm, so maybe it has something to do with the total size of the program?

Offline Freyaday

  • The One And Only Serial Time Killing Catboy-Capoeirista-Ballerino
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1970
  • Rating: +128/-15
  • I put on my robe and pixel hat...
    • View Profile
Re: Bug Reports
« Reply #1561 on: October 17, 2011, 07:36:56 pm »
Hmmm, so maybe it has something to do with the total size of the program?
Then why did it still not work when, without those lines of code, I pressed ZOOM?
I checked, and the code w/o the peephole optimizations was still bigger than the code with the extra lines.
Also, are you compiling to an App?
In other news, Frey continues kicking unprecedented levels of ass.
Proud member of LF#N--Lolis For #9678B6 Names


I'm a performer at heart; I stole it last week.
My Artwork!

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Bug Reports
« Reply #1562 on: October 17, 2011, 07:38:23 pm »
Yeah i always try with and without app, and they have been the same all times.  Probably the best thing to do now is to get a version that doesnt work, and have someone look at the binary to see what it's *actually* doing

EDIT: also see how much of the program you can remove before it stops producing the error
« Last Edit: October 17, 2011, 07:40:33 pm by Builderboy »

Offline Freyaday

  • The One And Only Serial Time Killing Catboy-Capoeirista-Ballerino
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1970
  • Rating: +128/-15
  • I put on my robe and pixel hat...
    • View Profile
Re: Bug Reports
« Reply #1563 on: October 17, 2011, 07:48:07 pm »
Here's the bad app.
In other news, Frey continues kicking unprecedented levels of ass.
Proud member of LF#N--Lolis For #9678B6 Names


I'm a performer at heart; I stole it last week.
My Artwork!

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: Bug Reports
« Reply #1564 on: October 18, 2011, 11:13:17 pm »
From the Q&A thread:

Okay, I'm sure that this is just stupidity on my part, but I just can't see a bug in this.

Axe 1.0.5

Code: [Select]
.ZA

Text(0,0,F(5,6)>Dec)
Text(50,0,F(6,5)>Dec)

Text(0,10,F((6-1),(6+1))>Dec)
Text(50,10,F(6,6)-1>Dec)

Text(0,20,F(6,(5+4))>Dec)

Text(50,20,F(6,5)+F(6,4)>Dec)


Pause 5000

Lbl F
r1*r2+r1+r2
Return

Compiling halts at 57% during the first pass -- error message: "WRONG # OF ARGS".

Pressing [pgrm] jumps to the sixth 'Text'
Code: [Select]
Text(50,20,F(6,5)+F(6,4)>Dec)
                     ^

(In case anybody was wondering, I was brute-forcing a solution to an SAT problem (in my defense, I was feeling too tired to be clever)).

Runer's response:
Pick that post back up and take it right on over to the bug reports thread, because that's definitely Axe's fault, not yours. It's treating +F as adding the variable F instead of noticing the opening parenthesis immediately following it and treating it as adding the return value of a function.
My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Bug Reports
« Reply #1565 on: October 19, 2011, 02:33:38 am »
Oooo, that is a tricky case!  I suppose that should be considered call of F instead of the variable F due to the immediate open parenthesis following.  I will fix that, but in the mean time you can just use an extra parenthesis set after the addition.

Freyaday, I can't seem to replicate your error either, what were the steps you took to get to the error?  I'm not sure which part of your app is the broken, the game itself runs fine.
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Bug Reports
« Reply #1566 on: October 19, 2011, 03:38:48 am »
I found freyadays bug, it was in his code and not in Axe

Offline Freyaday

  • The One And Only Serial Time Killing Catboy-Capoeirista-Ballerino
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1970
  • Rating: +128/-15
  • I put on my robe and pixel hat...
    • View Profile
Re: Bug Reports
« Reply #1567 on: October 19, 2011, 09:41:55 am »
I found freyadays bug, it was in his code and not in Axe
Yeah. I am not used to weird code interactions like that so....
But it's all good now!
In other news, Frey continues kicking unprecedented levels of ass.
Proud member of LF#N--Lolis For #9678B6 Names


I'm a performer at heart; I stole it last week.
My Artwork!

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Bug Reports
« Reply #1568 on: October 20, 2011, 02:06:35 am »
I believe I have found a fairly obscure bug. It appears that comments do not work properly on Lbl or Goto lines. Not only does a period not start a comment, but it also makes the parser "forget" that the current line is a Lbl or Goto line and parses whatever follows the period like normal code.


EDIT: For that matter, it looks like Lbl and Goto are a little wonky with spaces as well. Spaces in label names are ignored by the parser, although they should probably end the label name.
« Last Edit: October 20, 2011, 02:15:37 am by Runer112 »

Offline jacobly

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 205
  • Rating: +161/-1
    • View Profile
Re: Bug Reports
« Reply #1569 on: October 20, 2011, 09:00:14 pm »
Here is a strange bug:
Code: (axm.z80) [Select]
#include "Axe.inc"
.dw AXM_HEADER

.dw 3
.db AXM_ALL
.dw tok_Load
.db AXM_INLINE
.db AXM_1ARG
 call sub_Axiom2

.dw 1
.db AXM_ALL
.dw 0
.db AXM_SUB
.db AXM_0ARGS
 ret

.dw 0
Code: (A) [Select]
:.AA
:#Axiom(AXM)
:Pic0
:Load()
:Data(255)->Pic0
Code: (B) [Select]
:.BB
:#Axiom(AXM)
:Data(255)->Pic0
:Pic0
:Load()
When A and B are compiled and disassembled:
Code: (AA) [Select]
ld   hl,$9d9c
 call $9d9c
 ret
 ret
 .db $ff
Code: (BB) [Select]
ld   hl,$9d9c
 call $9d9d
 ret
 .db $ff
 ret
In AA the data pointer is wrong, and in BB the second axiom comes after the data. ???

Offline jacobly

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 205
  • Rating: +161/-1
    • View Profile
Re: Bug Reports
« Reply #1570 on: October 21, 2011, 11:14:09 pm »
Compiling a program containing only the line (or possibly ending in the line):
Code: [Select]
Copy(L₆,GetCalc("Pic0"),756)
Fails when peep-hole opts are enabled:
Code: (Zooming...) [Select]
ld   hl,plotSScreen
 push hl
 ld   hl,Pic0
 call p_GetCalc
 push hl
 ld   hl,756
 pop  de
 ex   (sp),hl
 pop  bc
 ldir
 ret
p_GetCalc:
 ; ...
Pic0:
 .db PictObj,tVarPict,tPic0
Code: (Compiling...) [Select]
ld   hl,plotSScreen
 push hl
 ld   hl,Pic0
 call p_GetCalc
 push hl
 ld   hl,756
 pop  de
 ex   (sp),hl
 pop  bc
 .db $ed ; ???
p_GetCalc:
 ; ...
Pic0:
 .db PictObj,tVarPict,tPic0
The second one is missing half the ldir and the ret! Also o_PushPop6 was not applied...

Offline jacobly

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 205
  • Rating: +161/-1
    • View Profile
Re: Bug Reports
« Reply #1571 on: October 24, 2011, 01:05:51 am »
Here is an easy one. :)
L appearing inside of a string should expand to db ListObj,tVarLst, not itself.
In the mean time, "LA" can be replaced with [015D]"A".

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Bug Reports
« Reply #1572 on: October 24, 2011, 01:35:04 am »
jacobly, what do you mean by that?  Do you mean it doesn't display correctly?  How do you think it should be displayed? o.O

Offline jacobly

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 205
  • Rating: +161/-1
    • View Profile
Re: Bug Reports
« Reply #1573 on: October 24, 2011, 02:52:12 am »
jacobly, what do you mean by that?  Do you mean it doesn't display correctly?  How do you think it should be displayed? o.O

What I mean is that GetCalc("LBLAH") does not currently work, because GetCalc requires .db ListObj,tVarLst,"BLAH",0 instead of .db LlistL,"BLAH",0 to be able to find named lists.

EDIT:
In the mean time, "LA" can be replaced with [015D]"A".

And by this I mean that GetCalc([015D]"BLAH") does work correctly.
« Last Edit: October 24, 2011, 02:57:36 am by jacobly »

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Bug Reports
« Reply #1574 on: October 24, 2011, 03:23:23 am »
Ah i see, that's a good one ^^