Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Basic4ppc Wishlist > Bug Reports
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Bug Reports Post about errors or bugs encountered.

Bug - Optomized Compile Generates Error

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-13-2011, 03:03 PM
Junior Member
 
Join Date: Sep 2008
Posts: 29
Default Bug - Optomized Compile Generates Error

The attached works on W98, W2K, Server 2000/2003 and Windows 7 in debug mode.

After compiling, it works on all O/S`s EXCEPT Windows 7.

This is just a code snippet; it is normally part of a security check routine to identify the Workstation and the User that is trying to execute the program. I didn't know there was a problem until I recently got a new laptop (W7), ported all development work to laptop and found out that no .exe files would run. It doesn't matter if you compile the program on the W7 machine or any other; the .exe file just bombs.

The registry fetch works, the Computer Name (Sec_Svr) is correct and the error occurs when trying to test (or msgbox or anything else) on what should be the User Name (Sec_User). Work around is to use ErrorLabel.

Regards,

Ed Sharp
Attached Files
File Type: sbp Test.sbp (553 Bytes, 2 views)
Reply With Quote
  #2 (permalink)  
Old 07-13-2011, 03:32 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,701
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Which error do you get?
Reply With Quote
  #3 (permalink)  
Old 07-13-2011, 03:48 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

It doesn't work on Vista either. The reason is that Registry.GetString returns Null in a compiled program if the entry is missing so your StrLength throws an exception. You can check for this.
Code:
If IsNull(Sec_User) OR StrLength(Sec_User) = 0 Then Msgbox("No User")
This works because of short-circuit evaluation on the If condition. If IsNull returns True then the StrLength function is not evaluated.
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #4 (permalink)  
Old 07-13-2011, 07:54 PM
Junior Member
 
Join Date: Sep 2008
Posts: 29
Default Error Message

To Erel,

Error message is attached.


To Agraham,

Thank you for the information.


As always, great, great support.


Regards,

Ed Sharp
Attached Images
File Type: jpg Error.jpg (5.9 KB, 7 views)
Reply With Quote
  #5 (permalink)  
Old 07-19-2011, 07:20 PM
RacingDog's Avatar
Senior Member
 
Join Date: Apr 2009
Location: Fleet, Hants, UK
Posts: 183
Send a message via Yahoo to RacingDog
Default

I also have W7. So when can we expect a version which works on W7?
__________________
Racing Dog's Kennel - to get my B4PPC efforts and my other freebie proggies,
and find out a bit about me.
Reply With Quote
  #6 (permalink)  
Old 07-20-2011, 06:29 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,701
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

The above issue is not related to Windows 7 which is fully supported.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Compile Error junaidahmed Basic4android Updates and Questions 7 09-01-2011 06:23 PM
Compile Error in B4A v1.5 RichardN Basic4android Updates and Questions 4 05-17-2011 06:36 AM
Need Help ! Compile error edsphu Questions (Windows Mobile) 5 10-09-2009 11:36 PM
Compile error Ricky D Questions (Windows Mobile) 2 09-08-2008 12:21 PM
Optomized compiling problems again. J12345T Questions (Windows Mobile) 10 09-08-2008 11:34 AM


All times are GMT. The time now is 02:54 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0