Difficult to explain problem

Started by rrioja, December 01, 2008, 01:33:44 PM

Previous topic - Next topic

rrioja

I have a large program which works perfectly except for a strange problem.

I have a global defined as: Global LockBits As Byte,
and a function with a local defined as: Local strInString As String

The function contains the following statement several times:

LockBits = CByt(Val("&H" + strInString))

However, when I added the above statement one more time, I got the dreaded "PBWin.exe has encountered a problem and needs to close.  We are sorry for the inconvenience." followed by the "Send Error Report" and "Don't Send" buttons.  After I press either button I get another message that says "Compiler log file not found.  The most common cause of this type of failed compile is that the Project is in a deeply nested directory ....."

If I replace the offending statement with the following two lines:

strInString = "&H" + strInString
LockBits = CByt(Val(strInString))

then compilation proceeds without any problems.  What is really strange is that I can use the single line version many times throughout the program without any problems, but I get the errors in only one location.  I can then solve the error by switching to the two line version.

The source is in a directory off the root directory of my C: drive.  Therefore, it is not in a deeply nested directory.

Any ideas?

TechSupport

That's a tough one because it could be FireFly, your code or PBWIN. I expect that is may be a combination of your code and the way that FireFly is manipulating it maybe.

Don't worry about the "deeply nested directory" message. That will occur because PBWIN GPF'd thereby not creating the log file that FireFly attempted to read. The problem is why is PBWIN GPF'ing.

What version of PBWIN are you using? Version 9?

If you feel comfortable emailing me the source code then I can attempt to determine if it is a FireFly parsing issue or not.

If you change Global LockBits As Byte to a LONG does it make any difference (overflowing the Byte). Granted this appears to be a compile time error as opposed to a run time overflow so maybe it won't make any difference.




rrioja

Thanks for the reply.  I am using the latest PB version 9.  Since my original post, I added more to other parts of my program.  I did not touch the part that was flaky.  Now I went back to change LockBits to a LONG and changed the two line assignment back to the original one line.  Everything works !!!  Then I went back to making LockBits a BYTE and everything still works as it should !!   Therefore, I can only conclude that adding lines to other parts of the program somehow affected FireFly's sense of reality.  It will be difficult to remember exactly what I changed in the rest of the program and change it all back to see at what point FireFly begins to hallucinate again, but I will try.