installer woes

Discussion about the ZBasic language including the System Library. If you're not sure where to post your message, do it here. However, do not make test posts here; that's the purpose of the Sandbox.
Post Reply
dlh
Posts: 395
Joined: 15 December 2006, 12:12 PM
Location: ~Cincinnati

installer woes

Post by dlh »

In the past, whenever I used the installer, I only lost my font preferences and had to again turn off "auto-complete". This time it appears to have completely trashed my ZBasic installation, I no longer have a tab bar (nor a menu item for it), it doesn't remember any settings between starts, it doesn't recall my project, it will not compile my project, the IDE is version 1.0.2 while the previous IDE was 1.4.2, The Language menu offers about 25 choices but not ZBasic, the directory structure appears mangled (with a second ZBasic folder under the original) and...

How do I fix it?
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Re: installer woes

Post by dkinzer »

dlh wrote:In the past, whenever I used the installer, I only lost my font preferences and had to again turn off "auto-complete".
If you make such changes in your User Options file, you won't lose them at all. The installer doesn't touch the User Options file which is found at "\Documents and Settings\<your user name>\SciTEUser.properties". You can edit this file with any text editor. From the IDE you can load it using the entry "Open User Options File" on the Options menu.
dlh wrote:[...] the IDE is version 1.0.2 while the previous IDE was 1.4.2
This suggests that an outdated installer version was used or, at least, the IDE that you're executing is an older one. The IDE version contained in v2.5.0 installer is v1.4.3. You might check the properties of the item used to invoke the IDE and determine its location.

The only potential solution is to install again, ensuring that you're invoking the latest installer.
- Don Kinzer
dlh
Posts: 395
Joined: 15 December 2006, 12:12 PM
Location: ~Cincinnati

Post by dlh »

I'm sure I used the correct installer.

All of the files in the ZBasic folder that ended up embedded in the original folder were the latest files although ZBasicIDE.exe somehow got renamed to ZBasic~1.exe.

I renamed the original ZBasic folder as ZBasic_old, moved the embedded folder up a notch so it's now under the root and renamed ZBasic~1.exe as ZBasicIDE.exe and all is now well - except for my cardiac condition which took quite a hit when I thought all was lost ;-)
GTBecker
Posts: 616
Joined: 17 January 2006, 19:59 PM
Location: Cape Coral

installer woes

Post by GTBecker »

FWIW, Dave, I had some IDE odd problems some time ago which
reinstallation did not fix. I ultimately found that I had a very old
IDE version installed, too. Once that was removed the IDE became sane.

I think it appeared as a separate item in Control Panels/AddRemoveApps.


Tom
Tom
dlh
Posts: 395
Joined: 15 December 2006, 12:12 PM
Location: ~Cincinnati

Post by dlh »

ZBasic 2.5.0 is the only Control Panel entry. Either the installer or the installer was confused by something.

Now, I need to figure out why my application has stopped working. I updated the VM and the app choked when I restarted. I recompiled under 2.5.0 and get no output whatsoever. It normally outputs about a 20 line sign-on message but it's no longer outputting anything.
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Post by dkinzer »

dlh wrote:It normally outputs about a 20 line sign-on message but it's no longer outputting anything.
It is possible that there is a coding error that we didn't catch in the VM that results in interrupts being left disabled. That would cause the symptom that you're seeing.

One approach to narrowing down the source of the problem is to use a "binary search" strategy. To do this, disable about half of your initialization code by putting #if 0 ... #endif around it. If the system then responds as it should (with that part missing), the problem is located in the portion that is disabled. If not, it's either in the other half or related to an interaction between instructions in the two halves taken together. Once you know which part it is in, that part can be further divided in half, and so on, until you have narrowed it down to just a few instructions.
- Don Kinzer
dlh
Posts: 395
Joined: 15 December 2006, 12:12 PM
Location: ~Cincinnati

Post by dlh »

It outputs "ZBasic v2.5" and then goes mute. There have been no changes to the initialization code for several weeks.

I can reset the ZX-40a using DTR but not using the API whereas before both worked. None of the data I send to it is acknowledged whereas it was before.

Is there a link where I can download the previous compiler and VM?
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Post by dkinzer »

dlh wrote:There have been no changes to the initialization code for several weeks.
The problem is almost certainly in the VM, the issue is finding out which instruction or instructions in your specific program cause the problem. That is why I suggested the binary search method.
dlh wrote:Is there a link where I can download the previous compiler and VM?
I suspect that you'll only need to roll back the VM. In any event, here are the links.

The v2.3.0 VM for the ZX-40a is at:
http://www.zbasic.net/download/zvm/2.3/zx40a_2-3-0.zvm

The ZBasic compiler v2.4.2 is at:
http://www.zbasic.net/download/ZBasic/2 ... _2-4-2.zip

The installer that contains the v2.4.2 compiler is at:
http://www.zbasic.net/download/zbasic-setup_2-4-3.exe
- Don Kinzer
dlh
Posts: 395
Joined: 15 December 2006, 12:12 PM
Location: ~Cincinnati

Post by dlh »

dkinzer wrote:The problem is almost certainly in the VM, the issue is finding out which instruction or instructions in your specific program cause the problem. That is why I suggested the binary search method.
I'm not so sure that my initialization code lends itself to your suggested binary method. It calls many other procedures

Code: Select all

Sub Initialize&#40;&#41;

  Dim b      As Byte 
  Dim p      As Byte
  Dim n      As Integer

  Call GetPersistent&#40;19,b,1&#41;
  If &#40;b<>&HFF&#41; Then
    b = &HFF
    Call PutPersistent&#40;19,b,1&#41;
  End If  

  Call PutPin&#40;16, zxInputTriState&#41;                              'ZC pin
  Call PutPin&#40;ICP, zxInputTriState&#41;                             'RF/IR input   
  Call PutPin&#40;28, zxOutputLow&#41;
  Call PutPin&#40;29, zxOutputLow&#41;

  Call OpenQueue&#40;iq0, SizeOf&#40;iq0&#41;&#41;
  Call OpenQueue&#40;oq0, SizeOf&#40;oq0&#41;&#41;
  Call OpenCom&#40;1, 19200, iq0, oq0&#41;
  Call Delay&#40;0.050&#41; 

  If FirstTime Then 
    Call Delay&#40;2.0&#41;
  End If

  tx = "roZetta &#40;tm&#41;" & CrLf                            
  Call PutStr&#40;0, tx&#41;
  Call Delay&#40;0.025&#41;
  tx = "Copyright © 2008  dlh" & CrLf                     
  Call PutStr&#40;0, tx&#41;
  tx = "All Rights Reserved" & CrLf             
  Call PutStr&#40;0, tx&#41;
  tx = "Compile Date&#58; " & compdata&#40;1&#41; & " " & compdata&#40;2&#41; & CrLf
  Call PutStr&#40;0, tx&#41; 
  Call GetEEPROMSize
  tx = tx & " - CODE&#58;" & CStr&#40;Register.CodeSize&#41; & CrLf
  Call PutStr&#40;0, tx&#41;
  Call GetCPU
  Call SerialNumber&#40;SerNum&#41;
  tx = tx & " - VM " & CStr&#40;SerNum&#40;1&#41;&#41; & "." & CStr&#40;SerNum&#40;2&#41;&#41; & "." _
          & CStr&#40;SerNum&#40;3&#41;&#41; & CrLf
  Call PutStr&#40;0, tx&#41; 
  Select Case Register.ResetFlags
    Case 1&#58; tx = "Power-On Reset" & CrLf
    Case 2&#58; tx = "External Reset &#40;DTR&#41;" & CrLf
    Case 4&#58; tx = "Brownout Reset" & CrLf
    Case 5&#58; tx = "Power-On + Brownout Reset" & CrLf
    Case 8
      If rstflag Then
        tx = "Software Reset &#40;API&#41;" & CrLf
      Else  
        tx = "Hardware or Watchdog Reset" & CrLf            
      End If
      rstflag = False  
    Case Else&#58; tx = "Mystery Reset " & CStrHex&#40;Register.ResetFlags&#41; & CrLf
  End Select
  Call PutStr&#40;0, tx&#41; 
  tx = "S0 OPEN @ 19200 8N1" & CrLf
  Call PutStr&#40;0, tx&#41;  
  Call ComChannels&#40;4, 9600&#41;
  For p = 1 To 4
    If &#40;LoByte&#40;ports&#40;p&#41;&#41;>0&#41; Then
      Select Case p
        Case 1&#58; Call DefineCom&#40;3,18,25,&H08&#41;    'non-inverted
        Case 2&#58; Call DefineCom&#40;4,24,19,&H08&#41;    'non-inverted
        Case 3&#58; Call DefineCom&#40;5,17,21,&H08&#41;    'non-inverted
        Case 4   
          b = &#40;HiByte&#40;ports&#40;p&#41; And &H80&#41;&#41; Or &H08
          Call DefineCom&#40;6,4,1,b&#41;               '8-bit, inverted/non-inverted
      End Select
      Call OpenSerialPort&#40;p&#41;
    End If  
  Next  
  Call InitTTL&#40;1&#41;
  Call InitTTL&#40;2&#41;
  Call InitW0 
  Call GetLocation
  Call GetHolidays&#40;1&#41;
  Call MemoryMap  
  tx = "GPIO PINS&#58;" & CStrBin&#40;HiByte&#40;pins&#41;&#41; & " "
  tx = tx & CStrBin&#40;LoByte&#40;pins&#41;&#41; & " - RSSI&#58;" & CStr&#40;rssi&#41; & CrLf
  Call PutStr&#40;0,tx&#41;
  tx = "RTC Board&#58;" & CStrBin&#40;rtc&#41; & CrLf
  Call PutStr&#40;0,tx&#41;
  If &#40;xpct<6&#41; Or &#40;xpct>18&#41; Then
    xpct=12
  End If	
  tx = "X-10 RF DIM&#58;" & CStr&#40;xpct&#41; & "%" & CrLf
  Call PutStr&#40;0,tx&#41;
  b=rtc
  Select Case GetBit&#40;b,0&#41; 
    Case 0					'query PC for timestamp
      tx="?RTC" & CrLf
      Call PutStr&#40;0, tx&#41;
    Case Else  	 				'query M41T81 for timestamp 
      'get rtc 
      'output when power loss occured, if any
      'output daughterboard configuration
      tx="RTC board&#58;" & CStrBin&#40;rtc&#41; & CrLf
      Call PutStr&#40;0, tx&#41;
  End Select 
    
End Sub
dlh
Posts: 395
Joined: 15 December 2006, 12:12 PM
Location: ~Cincinnati

Post by dlh »

dkinzer wrote:I suspect that you'll only need to roll back the VM.
Rolling back to VM 2.3.0 did the trick.

Code: Select all

15&#58;19&#58;26 ZBasic v2.3
15&#58;19&#58;26 roZetta &#40;tm&#41; Copyright  2008  dlh
15&#58;19&#58;26 All Rights Reserved
15&#58;19&#58;26 Compile Date&#58; Jun 25 2008 13&#58;35&#58;23
15&#58;19&#58;26 EEPROM&#58;65536 - CODE&#58;11322
15&#58;19&#58;26 CPU&#58; ZX40a - VM 2.3.0
15&#58;19&#58;26 External Reset &#40;DTR&#41;
15&#58;19&#58;26 S0 OPEN @ 19200 8N1
15&#58;19&#58;26 S1 OPEN @ 9600 8N1 MR26X, XTD&#58;S3, PSD&#58;S3, STD&#58;S2
15&#58;19&#58;26 S2 OPEN @ 4800 8N1 2414S
15&#58;19&#58;26 S3 OPEN @ 4800 8N1 CM11A
15&#58;19&#58;26 S4 OPEN @ 9600 8N1 BINARY Non-Inverted
15&#58;19&#58;26 T1&#58; TW523
15&#58;19&#58;26 T2&#58; CTL + OPTOS 63, XTD&#58;S2, STD&#58;S2
15&#58;19&#58;26 W0&#58; RF+RSSI 0000_0000 2500&#58;14
15&#58;19&#58;26 LOCATION&#58; -84.56 39.04 -5.00
15&#58;19&#58;26 HOLIDAYS&#58; 1 21 49 147 186 245 287 316 332 360 
15&#58;19&#58;26 Memory Map&#58; 25000 29000 33000 37000 41000 45000 49000 53000 57000 61000 
15&#58;19&#58;26 Record Sizes&#58; 10 14 10 10 10 10 10 10 7 ??
15&#58;19&#58;26 GPIO PINS&#58;1111_0000 1111_1100 - RSSI&#58;1
15&#58;19&#58;27 RTC Board&#58;0000_0000
15&#58;19&#58;27 X-10 RF DIM&#58;12%
15&#58;19&#58;27 ?RTC
15&#58;19&#58;27 RTC&#58; 25 JUN 2008 15&#58;19&#58;06 DST&#58; 11,1658&#58;00,7370&#58;00,4263&#58;19
15&#58;19&#58;27 NOW&#58;1519 DAY&#58;177 SUNRISE&#58;0614 SUNSET&#58;2108 HOLIDAY&#58;False
If you can make some targetted suggestions, I'll try to narrow it down but I fatigue quickly and start making dumb mistakes that only complicate troubleshooting things like this.
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Post by dkinzer »

dlh wrote:If you can make some targetted suggestions, I'll try to narrow it down but I fatigue quickly and start making dumb mistakes that only complicate troubleshooting things like this.
My recollection is that you use the low level X-10 routines (DefineX10(), OpenX10(), etc.) so I began sleuthing around in those areas. I found that the data structures used by those routines are not being properly initialized so the functions sometimes work and sometimes don't depending on the previous content of RAM.

I would suggest commenting out all code related to the X-10 functionality. It is especially important to be sure to comment out code that adds data to the X-10 transmission queue because the PutQueue*() routines will hang when there is no space left in the queue.
- Don Kinzer
dlh
Posts: 395
Joined: 15 December 2006, 12:12 PM
Location: ~Cincinnati

Post by dlh »

Still NG. I can email you my code if it will help you run this down.

BTW, "Options|Device Options|Program Memory Configuration" does not retain the page size setting.
Post Reply