X is ambiguous between declarations in Modules but there is only one - vb.net

So, I'm working in VS 2k5 and I've been copying some code from another project into this one. It's a VB Web Application. The code compiles, but when it tries to load the first page I get this:
Compiler Error Message: BC30554: 'FormFunctions' is ambiguous.
Source Error:
Line 103: Public ReadOnly Property EditMode() As EditMode
Line 104: Get
Line 105: Return FormFunctions.GetEditMode(HiddenCodeID, IsReadOnly)
Line 106: End Get
Line 107: End Property
Source File: Y:\My Documents\Visual Studio 2005\Projects\IntranetApps.Net\WebBase\BaseApplication\App_Code\BaseUserControl.vb Line: 105
Another thing is, when I try to put a breakpoint at line 103, it never gets hit. It's like it's running some phantom code somewhere.
The only GetEdit mode I have in my project is in the module FormFunctions.
How can I tell where it's seeing two methods at run time?

Related

Why JCL encountered error IGYWCL expansion

I wrote a cobol code to add record to a file and I runed it using jcl but encounterd an error. The error message is:
´´ procedure IGYWCL was expanded using system library sys1.proclib ´´.
How can i fix this error.

VBNC compile errors

I've just installed mono complete, mono-vb and associated libraries, it all appears to be there.
I've written the simplest of vb examples:
print "Hello, this is a test"
end
but vbnc gives me an error "Expected identifier" for each line. I've tested with more lines of code and I get an error for each line in my file.
What am I missing?

how to automatically break the lua program at the error line

I use my own interpreter to run the lua program and debug with zerobrane. If the interpreter encounters an error, how to let the debugger break at the error line?
There is no mechanism in Lua that allows to catch run-time errors. There was a call to debug.traceback function in Lua 5.1, but it's no longer called in Lua 5.2+. If you have your own error handling, you can call require("mobdebug").pause(), which will request ZeroBrane Studio debugger to stop on the next executable Lua line, which will allow you at least to see the stack trace and the location of the error, but this is probably all you can do. You can also try to assign debug.traceback to the function that calls pause, but, again, this will only work in Lua 5.1.
For example, try running the following script from the IDE:
require("mobdebug").start()
debug.traceback = function(...)
print("traceback", ...)
require("mobdebug").pause()
end
a()
print("done") -- it will never get here
If you save it into on-error.lua file and run, you should see the execution stopped on line 5 (after the pause()) call with the following message:
traceback on-error.lua:6: attempt to call global 'a' (a nil value) 2

PsychoPy - Workaround for (still ongoing) pyglet memory leak affecting text components displayed at frame-level

I too have run across the infamous pyglet memory leak, that occurs when one needs to update text components at the frame level (with a text variable typically computed in a separate code component, also at frame level).
The leak/bug crashes a running script with an error message of the sort:
File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.83.04-py2.7.egg\psychopy\visual\window.py", line 541, in flip
thisStim.draw()
File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.83.04-py2.7.egg\psychopy\visual\text.py", line 603, in draw
self._pygletTextObj.draw()
File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\pyglet\font\__init__.py", line 565, in draw
self._layout.draw()
File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\pyglet\text\layout.py", line 852, in draw
self.batch.draw()
File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\pyglet\graphics\__init__.py", line 544, in draw
func()
File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\pyglet\graphics\__init__.py", line 476, in <lambda>
(lambda d, m: lambda: d.draw(m))(domain, mode))
File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\pyglet\graphics\vertexdomain.py", line 313, in draw
glDrawArrays(mode, starts[0], sizes[0])
WindowsError: exception: access violation reading 0x00000010
Exception TypeError: "'NoneType' object is not callable" in <bound method Server.__del__ of <pyolib.server.Server object at 0x0EFB3670>> ignored
I know the PsychoPy community has linked this to a memory leak in pyglet that was meant to have been fixed around April 2016 according to this thread. I downloaded the latest version of Pyglet (which is v1.2.4 - released apparently in Sep 2015, so before the supposed fix of the leak) and replaced its contents under c:\Program Files (x86)\PsychoPy2\Lib\site-packages\pyglet\. However, this did not fix my problem.
Unfortunately, my experiment does not make sense if I give up the frame-wise computation that feeds the text component.
An older thread that I found suggested the following workaround: in the code component that computes frame-wise the value of the text variable being displayed, only assign this variable a new value if that new value actually differs from the previous value. However, even after changing my code component this way, the pyglet error still pops up.
Assuming the bug was fixed in Pyglet, is it not v1.2.4 that reflects this fix, and should it not be updated by overwriting the contents of c:\Program Files (x86)\PsychoPy2\Lib\site-packages\pyglet\ (maintaining the original folder structure)?
Assuming the bug was in fact NOT fixed in Pyglet, can anyone suggested a different workaround that I can try to make my PsychoPy expt not crash?
Many thanks indeed for your help.
(Apologies for the double post both here and on the psychopy group; will update both threads as soon as there is a response on the other, to avoid people wasting time with double answers).
One workaround is to use TextBox instead of TextStim. To do that, one first defines a stimulus object in a code component (under "begin routine"), such as
textbox = visual.TextBox(window=win,
text='Something',
font_size=21,
font_color=[-1,-1,1],
size=(1.9, .3),
pos=(0.0, 0.25),
grid_horz_justification='center',
units='norm')
then, perhaps under the "every frame" tab, one uses code to customise & call upon the thus-defined textbox, with syntax as found on http://www.psychopy.org/api/visual/textbox.html

objc_startCollectorThread() implicit declaration warning

I'm trying to work through Apple's CoreData Utility Tutorial. It asks me to create a 'Foundation Tool' project in the 'Command Line Utility' section. In XCode 3.2, I only found a 'Command Line Tool' section with a 'Foundation' type in the 'New Project' wizard.
So I created the 'Command Line Tool' 'Foundation' type project, and added the following line to enable garbage collection:
objc_startCollectorThread();
I also changed the 'Objective-C Garbage Collection' setting in my 'Target Info' 'Build' tab to 'Required [-fobjc-gc-only]'. When I run my build, I get the following error:
warning: implicit declaration of function 'objc_startCollectorThread'
The target runs fine so far. All it does is print 'Hello World' to the console. I'm just concerned about this warning. I must be doing something wrong if I'm getting warnings for something as basic as garbage collection on a command line tool.
You should #include <objc/objc-auto.h>, which is where this function is defined.