Where's my watch window gone?

Discuss about beta versions of mikroBasic
compiler.
Post Reply
Author
Message
Kalain
Posts: 1093
Joined: 11 Mar 2005 18:26
Location: Aubenas, France

Where's my watch window gone?

#1 Post by Kalain » 12 Nov 2006 22:09

Hi,

Here it is.
I can reproduce the problem each time.
http://www.mikroe.com/forum/viewtopic.p ... highlight=

I wonder for how long and I prefer to write this post before to restart my computer in order to check and be absolutly sure.

By now here is the fact and details. Some of the details could appear out of subject but as I suspect a windows problem, this will be probably usefull to know as much as possible the configuration :
Win XP SP1.
In a folder, I have all my "electronics shortcuts".
On my desktop, I have a shortcut to this folder.
I first open "electronics shortcut" folder. (window is open)
I clic on Mb shortcut.
Mb starts, it is first minimized and short time later Mb window open behind my "electronics shortcut" window. I minimize this window or clic on Mb window.

Here is the code of last project which is loaded automatically with Mb. (16F877A/ flags by default)
(code is only all my week end tries so do to look closely to it, it probably doesn't work.)

Code: Select all

program Led_blinking

dim txtlen as byte
dim text1 as string[30]
dim txtresult as string[30]

sub procedure str_left(dim byref result_txt as string[255], dim byref text as string[255], dim nb_char as byte)
  dim i as byte
  for i = 0 to nb_char - 1
    result_txt[i] = text[i]
  next i
end sub

sub procedure str_mid(dim byref result_txt as string[255], dim byref text as string[255], dim start, nb_char as byte)
  dim i,j as byte
  j = start-1
  for i = 0 to nb_char - 1
    result_txt[i] = text[j+i]
  next i
end sub

sub procedure str_right(dim byref result_txt as string[255], dim byref text as string[255], dim nb_char as byte)
  dim i,j as byte
  j = strlen(text)-nb_char
  for i = 0 to nb_char - 1
    result_txt[i] = text[j+i]
  next i
end sub

sub procedure str_clear(dim byref strtext as string[255], dim nb_car as byte)
dim i as byte
  for i = 0 to nb_car - 1
    strtext[i] = chr(0)
  next i
end sub

main:
  text1 = "AZERTYUIOPQ "
  txtresult = "AZERTYUIOP"
  txtlen = strlen(text1)
  text1[13] = "T"

  txtlen = strlen(text1)
  
  str_clear(text1, 50)

  text1 = ""

end.
- I compile by icon : build project, compilation is ok.
- Open debugger by icon : start debugger. Watch window is open. (First line of program is highlighted in blue : text1 = "AZERTYUIOPQ ")
- Now, if I click anywhere in editor window, watch window is not any more visible! (Debugger icons are still available.)
Now, icon "watch window" open watch window but it is displayed behind all others windows. you can see watch window displayed for few hundreds of ms.

By now, this happens all the time. I'm going to check if this still happen after to restart my computer.
Alain

Kalain
Posts: 1093
Joined: 11 Mar 2005 18:26
Location: Aubenas, France

#2 Post by Kalain » 12 Nov 2006 22:20

Hi,

I restart my computer, did exactly what's described in previous post and the problem is still there.
Seems this gremlins is catched. (at least on my computer.)

This is another problem to solve it. :wink:
Alain

xor
Posts: 5465
Joined: 18 May 2005 00:59
Location: NYC
Contact:

#3 Post by xor » 13 Nov 2006 02:52

I'm having my own problems with the Debugger, but I was wondering about your BYREF dimensioning of the string at 255. This is excessive for P16's, although for P18's it can work.
[color=darkred][b]xor[/b][/color]
[url=http://circuit-ed.com]CircuitED -[/url]

User avatar
zristic
mikroElektronika team
Posts: 6608
Joined: 03 Aug 2004 12:59
Contact:

#4 Post by zristic » 13 Nov 2006 09:44

xor wrote:I'm having my own problems with the Debugger, but I was wondering about your BYREF dimensioning of the string at 255. This is excessive for P16's, although for P18's it can work.
He, he, when compiler sees "byref" it will assign only 1 byte for the parameter, since it accepts address.
This is a common misunderstanding, it is awkard, I admit.

xor
Posts: 5465
Joined: 18 May 2005 00:59
Location: NYC
Contact:

#5 Post by xor » 13 Nov 2006 14:28

zristic....you're right and I should have known that, having looked at and explained to others this type of variable in the debugger a hundred times. Thanks for reminding me. :)
[color=darkred][b]xor[/b][/color]
[url=http://circuit-ed.com]CircuitED -[/url]

Kalain
Posts: 1093
Joined: 11 Mar 2005 18:26
Location: Aubenas, France

#6 Post by Kalain » 14 Nov 2006 21:06

Hi,

Here is some more information about this problem.
This is independant of the code. I have tried with another code and still the same behaviour : MB starts, MB window is first minimized and short time later MB window open behind my "electronics shortcut" window.

This is sign that debugger window won't be openned by icon "watch window"

I have tried to open MB with shortcut from window program list.
MB window opened (without to minimize) and the problem doesn't any more apear !!!! and I can't reproduce it any more !!!!! even if i start MB like previously described !!!! (from "electronic shortcut" window.) :shock: :shock: :shock:

The gremlin has gone away.....
Alain

Post Reply

Return to “mikroBasic Beta testing”