# bug, code or Windows problem?

**URL:** <https://forum.xojo.com/t/bug-code-or-windows-problem/20461>\
**Category:** General\
**Created:** [November 21, 2014, 10:19am UTC](https://forum.xojo.com/t/bug-code-or-windows-problem/20461 "2014-11-21T10:19:07Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Sunderland](https://forum.xojo.com/letter_avatar_proxy/v4/letter/j/dc4da7/32.png) [@John\_Sunderland](https://forum.xojo.com/u/John_Sunderland)\
**Post date:** [November 21, 2014, 10:19am UTC](https://forum.xojo.com/t/bug-code-or-windows-problem/20461/1 "2014-11-21T10:19:07Z")

</div>

I have an app. which I have used for years to examine the bit content of any file. Now converted to Xojo it runs ok in debug mode but the build has a problem -  
When I cliick the menu item to open a file I get this error message:  
[![](http://i104.photobucket.com/albums/m199/sundit1/bug_zpsb89eb873.jpg)](http://s104.photobucket.com/user/sundit1/media/bug_zpsb89eb873.jpg.html)

I would appreciate some help if any one understands the significance of this error.

---

<div class="post-metadata">

**Author:** ![Michel\_Bujardet](https://forum.xojo.com/user_avatar/forum.xojo.com/michel_bujardet/32/252_2.png) [@Michel\_Bujardet](https://forum.xojo.com/u/Michel_Bujardet)\
**Post date:** [November 21, 2014, 11:14am UTC](https://forum.xojo.com/t/bug-code-or-windows-problem/20461/2 "2014-11-21T11:14:55Z")

</div>

[quote=144847:@John Sunderland]I have an app. which I have used for years to examine the bit content of any file. Now converted to Xojo it runs ok in debug mode but the build has a problem -  
When I cliick the menu item to open a file I get this error message:  
[![](http://i104.photobucket.com/albums/m199/sundit1/bug_zpsb89eb873.jpg)](http://s104.photobucket.com/user/sundit1/media/bug_zpsb89eb873.jpg.html)

I would appreciate some help if any one understands the significance of this error.[/quote]

Posting the code that triggers this error is the only way to text and know what may be going on.

---

<div class="post-metadata">

**Author:** ![Greg\_O\_Lone](https://forum.xojo.com/user_avatar/forum.xojo.com/greg_o_lone/32/49_2.png) [@Greg\_O\_Lone](https://forum.xojo.com/u/Greg_O_Lone)\
**Post date:** [November 21, 2014, 11:18am UTC](https://forum.xojo.com/t/bug-code-or-windows-problem/20461/3 "2014-11-21T11:18:37Z")

</div>

It could be that the application doesn’t have permission to access something on disk.

---

<div class="post-metadata">

**Author:** ![Michel\_Bujardet](https://forum.xojo.com/user_avatar/forum.xojo.com/michel_bujardet/32/252_2.png) [@Michel\_Bujardet](https://forum.xojo.com/u/Michel_Bujardet)\
**Post date:** [November 21, 2014, 11:25am UTC](https://forum.xojo.com/t/bug-code-or-windows-problem/20461/4 "2014-11-21T11:25:24Z")

</div>

> [@144853:@Greg O'Lone](#):
>
> It could be that the application doesn’t have permission to access something on disk.

By the error message, it looks more like the folderitem is not there. But it could also be due to the use of a space in the item. “Version Cue” is not a valid shell name. Windows needs the DOS short name (something like "VERSIO~1"provided by FolderItem.ShellPath. As I wrote, until we see the code, we can only conjecture.

---

<div class="post-metadata">

**Author:** ![John\_Sunderland](https://forum.xojo.com/letter_avatar_proxy/v4/letter/j/dc4da7/32.png) [@John\_Sunderland](https://forum.xojo.com/u/John_Sunderland)\
**Post date:** [November 21, 2014, 11:33am UTC](https://forum.xojo.com/t/bug-code-or-windows-problem/20461/5 "2014-11-21T11:33:40Z")

</div>

Code for the menu item ‘FileOpen’ is:

’ f, b are global  
f=GetOpenFolderItem("")  
Lbl.text = f.name  
if f\<\>nil then  
EdLen.text = str(f.length)  
EdPages.text = str(f.length/(16\*32))  
b=BinaryStream.Open(f,true)  
'b.LittleEndian=true  
Page =0  
end if

There is no problem with the code if pasted into a trial project. There has been no problem with it in previous versions of Windows and RB. Of course, it is only GetOpenFolderItem("") that is significant in the above. This is where it sticks.

---

<div class="post-metadata">

**Author:** ![Michel\_Bujardet](https://forum.xojo.com/user_avatar/forum.xojo.com/michel_bujardet/32/252_2.png) [@Michel\_Bujardet](https://forum.xojo.com/u/Michel_Bujardet)\
**Post date:** [November 21, 2014, 1:02pm UTC](https://forum.xojo.com/t/bug-code-or-windows-problem/20461/6 "2014-11-21T13:02:13Z")

</div>

[quote=144857:@John Sunderland]Code for the menu item ‘FileOpen’ is:

’ f, b are global  
f=GetOpenFolderItem("")  
Lbl.text = f.name  
if f\<\>nil then  
EdLen.text = str(f.length)  
EdPages.text = str(f.length/(16\*32))  
b=BinaryStream.Open(f,true)  
'b.LittleEndian=true  
Page =0  
end if

There is no problem with the code if pasted into a trial project. There has been no problem with it in previous versions of Windows and RB. Of course, it is only GetOpenFolderItem("") that is significant in the above. This is where it sticks.[/quote]

I created Version Cue as an empty text file, in Documents.  
This code does not generate any error here… Windows 10. I tried triggering the error by removing the file between the getopenfolderitem and the f.open, but I get a Xojo error message 'An exception of class IO Exception was not handled."

The window you posted does not look like a Xojo error message, but from another application. Maybe Windows itself. Are you using any helper app from a third party ?

---

<div class="post-metadata">

**Author:** ![John\_Sunderland](https://forum.xojo.com/letter_avatar_proxy/v4/letter/j/dc4da7/32.png) [@John\_Sunderland](https://forum.xojo.com/u/John_Sunderland)\
**Post date:** [November 21, 2014, 3:28pm UTC](https://forum.xojo.com/t/bug-code-or-windows-problem/20461/7 "2014-11-21T15:28:02Z")

</div>

Panic over, thank you for your help.  
It is a Xojo bug. I have re-created the project and it works fine if I type the code afresh, but if I copy it from the old project it crashes. I have found extraneous and invisible bugs like this in Xojo to a greater extent than they ever occurred in older versions of RealBasic.

---

<div class="post-metadata">

**Author:** ![Michel\_Bujardet](https://forum.xojo.com/user_avatar/forum.xojo.com/michel_bujardet/32/252_2.png) [@Michel\_Bujardet](https://forum.xojo.com/u/Michel_Bujardet)\
**Post date:** [November 21, 2014, 3:57pm UTC](https://forum.xojo.com/t/bug-code-or-windows-problem/20461/8 "2014-11-21T15:57:29Z")

</div>

[quote=144899:@John Sunderland]Panic over, thank you for your help.  
It is a Xojo bug. I have re-created the project and it works fine if I type the code afresh, but if I copy it from the old project it crashes. I have found extraneous and invisible bugs like this in Xojo to a greater extent than they ever occurred in older versions of RealBasic.[/quote]

It would greatly help if you could report the bug with the non working project. I am sure Xojo would love fixing it, but as it seems elusive, the bug needs to be caught pants down…

---

<div class="post-metadata">

**Author:** ![John\_Sunderland](https://forum.xojo.com/letter_avatar_proxy/v4/letter/j/dc4da7/32.png) [@John\_Sunderland](https://forum.xojo.com/u/John_Sunderland)\
**Post date:** [November 21, 2014, 4:16pm UTC](https://forum.xojo.com/t/bug-code-or-windows-problem/20461/9 "2014-11-21T16:16:18Z")

</div>

Well, I have reported bugs before but never seen any action. In any case, I do not pay for continued support (too expensive, they don’t support home hobbyist users any more) so they no longer accept feedback from me.

---

<div class="post-metadata">

**Author:** ![system](https://forum.xojo.com/uploads/default/original/1X/455b4dcc0e61630e9f81940004ddffa49c432a46.png) [@system](https://forum.xojo.com/u/system)\
**Post date:** [October 29, 2020, 5:29pm UTC](https://forum.xojo.com/t/bug-code-or-windows-problem/20461/10 "2020-10-29T17:29:54Z")

</div>


