Search Results

Search found 1788 results on 72 pages for 'debugger'.

Page 56/72 | < Previous Page | 52 53 54 55 56 57 58 59 60 61 62 63  | Next Page >

  • Problem bounding name to a class in Django

    - by martinthenext
    Hello! I've got a view function that has to decide which form to use depending on some conditions. The two forms look like that: class OpenExtraForm(forms.ModelForm): class Meta: model = Extra def __init__(self, *args, **kwargs): super(OpenExtraForm, self).__init__(*args, **kwargs) self.fields['opening_challenge'].label = "lame translation" def clean_opening_challenge(self): challenge = self.cleaned_data['opening_challenge'] if challenge is None: raise forms.ValidationError('??????? ???, ??????????? ?????? ???. ???????????') return challenge class HiddenExtraForm(forms.ModelForm): class Meta: model = Extra exclude = ('opening_challenge') def __init__(self, *args, **kwargs): super(HiddenExtraForm, self).__init__(*args, **kwargs) The view code goes like that: @login_required def manage_extra(request, extra_id=None, hidden=False): if not_admin(request.user): raise Http404 if extra_id is None: # Adding a new extra extra = Extra() if hidden: FormClass = HiddenExtraForm else: FormClass = OpenExtraForm else: # Editing an extra extra = get_object_or_404(Extra, pk=extra_id) if extra.is_hidden(): FromClass = HiddenExtraForm else: FormClass = OpenExtraForm if request.POST: form = FormClass(request.POST, instance=extra) if form.is_valid(): form.save() return HttpResponseRedirect(reverse(view_extra, args=[extra.id])) else: form = FormClass(instance=extra) return render_to_response('form.html', { 'form' : form, }, context_instance=RequestContext(request) ) The problem is somehow if extra.is_hidden() returns True, the statement FromClass = HiddenExtraForm doesn't work. I mean, in all other conditions that are used in the code it works fine: the correct Form classes are intantiated and it all works. But if extra.is_hidden(), the debugger shows that the condition is passed and it goes to the next line and does nothing! As a result I get a UnboundLocalVar error which says FormClass hasn't been asssigned at all. Any ideas on what's happening?

    Read the article

  • Switch/case without break inside DllMain

    - by Sherwood Hu
    I have a Dllmain that allocates Thread local storage when a thread attaches to this DLL. Code as below: BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) { LPVOID lpvData; BOOL fIgnore; switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: onProcessAttachDLL(); // Allocate a TLS index. if ((dwTlsIndex = TlsAlloc()) == TLS_OUT_OF_INDEXES) return FALSE; // how can it jump to next case??? case DLL_THREAD_ATTACH: // Initialize the TLS index for this thread. lpvData = (LPVOID) LocalAlloc(LPTR, MAX_BUFFER_SIZE); if (lpvData != NULL) fIgnore = TlsSetValue(dwTlsIndex, lpvData); break; ... } I know that for the main thread, the DLL_THREAD_ATTACH is not entered, as per Microsoft Documentation. However, the above code worked. I am using VC2005. When I entered the debugger, I saw that after it entered DLL_THREAD_ATTACH case when ul_reason_for_call = 1! How can that happen? If I add `break' at the end of DLL_PROCESS_ATTACH block, the DLL failed to work. How can this happen?

    Read the article

  • OpenGL Calls Lock/Freeze

    - by Necrolis
    I am using some dell workstations(running WinXP Pro SP 2 & DeepFreeze) for development, but something was recenlty loaded onto these machines that prevents any opengl call(the call locks) from completing(and I know the code works as I have tested it on 'clean' machines, I also tested with simple opengl apps generated by dev-cpp, which will also lock on the dell machines). I have tried to debug my own apps to see where exactly the gl calls freeze, but there is some global system hook on ZwQueryInformationProcess that messes up calls to ZwQueryInformationThread(used by ExitThread), preventing me from debugging at all(it causes the debugger, OllyDBG, to go into an access violation reporting loop or the program to crash if the exception is passed along). the hook: ntdll.ZwQueryInformationProcess 7C90D7E0 B8 9A000000 MOV EAX,9A 7C90D7E5 BA 0003FE7F MOV EDX,7FFE0300 7C90D7EA FF12 CALL DWORD PTR DS:[EDX] 7C90D7EC - E9 0F28448D JMP 09D50000 7C90D7F1 9B WAIT 7C90D7F2 0000 ADD BYTE PTR DS:[EAX],AL 7C90D7F4 00BA 0003FE7F ADD BYTE PTR DS:[EDX+7FFE0300],BH 7C90D7FA FF12 CALL DWORD PTR DS:[EDX] 7C90D7FC C2 1400 RETN 14 7C90D7FF 90 NOP ntdll.ZwQueryInformationToken 7C90D800 B8 9C000000 MOV EAX,9C the messed up function + call: ntdll.ZwQueryInformationThread 7C90D7F0 8D9B 000000BA LEA EBX,DWORD PTR DS:[EBX+BA000000] 7C90D7F6 0003 ADD BYTE PTR DS:[EBX],AL 7C90D7F8 FE ??? ; Unknown command 7C90D7F9 7F FF JG SHORT ntdll.7C90D7FA 7C90D7FB 12C2 ADC AL,DL 7C90D7FD 14 00 ADC AL,0 7C90D7FF 90 NOP ntdll.ZwQueryInformationToken 7C90D800 B8 9C000000 MOV EAX,9C So firstly, anyone know what if anything would lead to OpenGL calls cause an infinite lock,and if there are any ways around it? and what would be creating such a hook in kernal memory ? Update: After some more fiddling, I have discovered a few more kernal hooks, a lot of them are used to nullify data returned by system information calls(such as the remote debugging port), I also managed to find out the what ever is doing this is using madchook.dll(by madshi) to do this, this dll is also injected into every running process(these seem to be some anti debugging code). Also, on the OpenGL side, it seems Direct X is fine/unaffected(I ran one of the DX 9 demo's without problems), so could one of these kernal hooks somehow affect OpenGL?

    Read the article

  • Applications result affected by another running application.

    - by Jamie Keeling
    This is a follow on from my previous question although this is about something else. I've been having a problem where for some reason my message that I pass from one process to another only displays the first letter, in this case "M". My application is based on a MSDN sample so to make sure I hadn't missed something I create a separate solution, added the MSDN sample (without any changes for my needs) and unsurprisingly it works fine. Now for the weird bit, when I run the MSDN sample running (as in debugging) and have my own application running, the text prints out fine without any problems. The second I run my on its own without the original MSDN sample being open, and it fails to work and only shows an "M". I've looked in the debugger and don't seem to notice anything suspicious (it's a slightly dated picture, I've fixed the data type inconsistency). Can anyone provide a solution for this? I've never encountered anything like this before. To look at my source code it's easier to just look at the link I posted at the top of the question, there's no point in me posting it twice. Thank you for any help.

    Read the article

  • Write Null/Nothing value with Databinding

    - by clawson
    I have extended a MaskedTextBox component to add some functionality. The text property of the extended MaskedTextBox is bound to a DateTime? property and the format of binding is set to a time format of "HH:mm:ss" (i.e. 24hr time). So that this masked text box will capture the display a time. The extra functionality I have added is to make the component readonly unless the component is double clicked or the enter button is pressed (the back color of the control helps to inform the users if the component is locked/readonly or not). When the enter button is pressed I also suspend the bindings so that bound data is updated the users input won't be lost. The information is then written back to the value and databindings resumed when the user presses the enter key again. This all works fine up to here, with values written and displayed as would be expected. However, I also want to write the null or nothing value to the DateTime? property if the user hasn't entered any text (or invalid text but let's just stick with no text) when enter key is pressed to submit the new value. Unlike with other valid entries in the MaskedTextBox, with no text entered when i execute: Me.DataBindings("Text").WriteValue() (when 'locking' the MaskedTextBox) it then branches to the bound properties Get method as I step into each line of code in the debugger (as opposed to the Set method with other valid entries) How can I write this null/nothing/"" value to the DateTime? property when no text "" is entered into the MaskedTextBox? Thanks for the help!

    Read the article

  • Diagnosing IIS Shutdowns

    - by Tom Ritter
    Symptoms: I attach a debugger, I wait a little while, it automatically detaches I watch the event log during normal operation - after a single request comes in, it waits a little bit, the shuts down Disagnosing. I've followed the following steps for logging shutdowns in IIS: http://weblogs.asp.net/scottgu/archive/2005/12/14/433194.aspx http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx I know these are working because... What I see in the Event Logs when I change the web.config: The description for Event ID 0 from source ASP.NET 2.0.50727.0 cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer. If the event originated on another computer, the display information had to be saved with the event. The following information was included with the event: _shutdownMessage=IIS configuration change HostingEnvironment initiated shutdown CONFIG change CONFIG change HostingEnvironment caused shutdown _shutdownStack= at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) at System.Environment.get_StackTrace() at System.Web.Hosting.HostingEnvironment.InitiateShutdownInternal() at System.Web.Hosting.HostingEnvironment.InitiateShutdown() at System.Web.Hosting.PipelineRuntime.StopProcessing() the message resource is present but the message is not found in the string/message table But it doesn't help because the mysetery error doesn't tell me anything. I see the same thing as from before I added this extra logging: The description for Event ID 0 from source ASP.NET 2.0.50727.0 cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer. If the event originated on another computer, the display information had to be saved with the event. The following information was included with the event: _shutdownMessage=HostingEnvironment initiated shutdown HostingEnvironment caused shutdown _shutdownStack= at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) at System.Environment.get_StackTrace() at System.Web.Hosting.HostingEnvironment.InitiateShutdownInternal() at System.Web.Hosting.HostingEnvironment.InitiateShutdown() at System.Web.Hosting.PipelineRuntime.StopProcessing() the message resource is present but the message is not found in the string/message table Anyone have any ideas for more debugging?

    Read the article

  • Javascript: Uncaught exception: "too few args"

    - by Rosarch
    I think I must be making some really stupid mistake. I'm using the latest version of jQuery to write an AJAX app. function refreshGPAForTerm(term) { var meta_data = term.children('.' + TERM_META_DATA_CLASS); meta_data.children('.' + MEDIAN_GPA_CLASS).fadeOut('slow').remove(); meta_data.append(_getMedianGPAElem(term.data('GPA'))).hide().fadeIn('slow'); } function moveToTerm(original_course, helper, term) { var cloned_course = original_course.clone(true); term.data('credits', term.data('credits') + cloned_course.data('credits')); term.data('median_GPA', term.data('median_GPA') + cloned_course.data('credits') * cloned_course.data('GPA')); // error here refreshGPAForTerm(term); refreshCreditForTerm(term); original_course.addClass('already-scheduled'); original_course.draggable('disable'); cloned_course.appendTo(term).hide().fadeIn('slow').draggable(); } When refreshGPAForTerm(term) is called, Firebug displays: "Uncaught exception - Too few arguments". Stepping through in a debugger, the code then goes into jQuery. Why is this happening? What am I doing wrong?

    Read the article

  • Using PLINQ to calculate and update values within the enclosure does not work

    - by Keith
    I recently needed to do a running total on a report. Where for each group, I order the rows and then calculate the running total based on the previous rows within the group. Aha! I thought, a perfect use case for PLINQ! However, when I wrote up the code, I got some strange behavior. The values I was modifying showed as being modified when stepping through the debugger, but when they were accessed they were always zero. Sample Code: class Item { public int PortfolioID; public int TAAccountID; public DateTime TradeDate; public decimal Shares; public decimal RunningTotal; } List<Item> itemList = new List<Item> { new Item { PortfolioID = 1, TAAccountID = 1, TradeDate = new DateTime(2010, 5, 1), Shares = 5.335m, }, new Item { PortfolioID = 1, TAAccountID = 1, TradeDate = new DateTime(2010, 5, 2), Shares = -2.335m, }, new Item { PortfolioID = 2, TAAccountID = 1, TradeDate = new DateTime(2010, 5, 1), Shares = 7.335m, }, new Item { PortfolioID = 2, TAAccountID = 1, TradeDate = new DateTime(2010, 5, 2), Shares = -3.335m, }, }; var found = (from i in itemList where i.TAAccountID == 1 select new Item { TAAccountID = i.TAAccountID, PortfolioID = i.PortfolioID, Shares = i.Shares, TradeDate = i.TradeDate, RunningTotal = 0 }); found.AsParallel().ForAll(x => { var prevItems = found.Where(i => i.PortfolioID == x.PortfolioID && i.TAAccountID == x.TAAccountID && i.TradeDate <= x.TradeDate); x.RunningTotal = prevItems.Sum(s => s.Shares); }); foreach (Item i in found) { Console.WriteLine("Running total: {0}", i.RunningTotal); } Console.ReadLine(); If I change the select for found to be .ToArray(), then it works fine and I get calculated reuslts. Any ideas what I am doing wrong?

    Read the article

  • How to open the download window when a dynamically created link is clicked in asp.net

    - by Ranjana
    i have stored the txtfile in the database.i need to show the txtfile when i clik the link. and this link has to be created dynamically. my code below: aspx code: aspx.cs protected void Page_Load(object sender, EventArgs e) { if(!Page.IsPostBack) { DataTable dtassignment = new DataTable(); dtassignment = serviceobj.DisplayAssignment(Session["staffname"].ToString()); if (dtassignment != null) { Byte[] bytes = (Byte[])dtassignment.Rows[0]["Data"]; //download(dtassignment); } divlink.InnerHtml = ""; divlink.Visible = true; foreach (DataRow r in dtassignment.Rows) { divlink.InnerHtml += "<a href='" + "'onclick='download(dtassignment)'>" + r["Filename"].ToString() + "</a>" + "<br/>"; } } } - public void download(DataTable dtassignment) { System.Diagnostics.Debugger.Break(); Byte[] bytes = (Byte[])dtassignment.Rows[0]["Data"]; Response.Buffer = true; Response.Charset = ""; Response.Cache.SetCacheability(HttpCacheability.NoCache); Response.ContentType = dtassignment.Rows[0]["ContentType"].ToString(); Response.AddHeader("content-disposition", "attachment;filename=" + dtassignment.Rows[0]["FileName"].ToString()); Response.BinaryWrite(bytes); Response.Flush(); Response.End(); } i have got the link dynamically, but i did not able to download the txtfile when i clik the link. how to carry out this. pls help me out...

    Read the article

  • strange run time error message from CIImage initWithContentsOfURL

    - by Adam
    When executing the following code I receive a run time error when the code executes the second line of code. The error (which shows up in the debugger) says: [NSButton initWithContentsOfURL:]: unrecognized selector sent to instance 0x100418e10. I don't understand this message, because it looks to me (based on my source code) like the initWithContentsOfURL message is being sent to the myImage instance (of the CIImage class) ... not NSButton. Any idea what is going on? If it matters ... this code is in the Application Controller class module of an Xcode project (a Cocoa application) -- within a method that is called when I click on a button on the application window. There is only the one button on the window ... // Step1: Load the JPG file into CIImage NSURL *myURL = [NSURL fileURLWithPath:@"/Users/Adam/Documents/Images/image7.jpg"]; CIImage *myImage = [myImage initWithContentsOfURL: myURL]; if (myImage = Nil) { NSLog(@"Creating myImage failed"); return; } else { NSLog(@"Created myImage successfully"); }

    Read the article

  • How to determine values saved on the stack?

    - by Brian
    I'm doing some experimenting and would like to be able to see what is saved on the stack during a system call (the saved state of the user land process). According to http://lxr.linux.no/#linux+v2.6.30.1/arch/x86/kernel/entry_32.S it shows that the various values of registers are saved at those particular offsets to the stack pointer. Here is the code I have been trying to use to examine what is saved on the stack (this is in a custom system call I have created): asm("movl 0x1C(%esp), %ecx"); asm("movl %%ecx, %0" : "=r" (value)); where value is an unsigned long. As of right now, this value is not what is expected (it is showing a 0 is saved for the user value of ds). Am I correctly accessing the offset of the stack pointer? Another possibility might be could I use a debugger such as GDB to examine the stack contents while in the kernel? I don't have much extensive use with debugging and am not sure of how to debug code inside the kernel. Any help is much appreciated.

    Read the article

  • Why does this extension method throw a NullReferenceException in VB.NET?

    - by Dan
    From previous experience I had been under the impression that it's perfectly legal (though perhaps not advisable) to call extension methods on a null instance. So in C#, this code compiles and runs: // code in static class static bool IsNull(this object obj) { return obj == null; } // code elsewhere object x = null; bool exists = !x.IsNull(); However, I was just putting together a little suite of example code for the other members of my development team (we just upgraded to .NET 3.5 and I've been assigned the task of getting the team up to speed on some of the new features available to us), and I wrote what I thought was the VB.NET equivalent of the above code, only to discover that it actually throws a NullReferenceException. The code I wrote was this: ' code in module ' <Extension()> _ Function IsNull(ByVal obj As Object) As Boolean Return obj Is Nothing End Function ' code elsewhere ' Dim exampleObject As Object = Nothing Dim exists As Boolean = Not exampleObject.IsNull() The debugger stops right there, as if I'd called an instance method. Am I doing something wrong (e.g., is there some subtle difference in the way I defined the extension method between C# and VB.NET)? Is it actually not legal to call an extension method on a null instance in VB.NET, though it's legal in C#? (I would have thought this was a .NET thing as opposed to a language-specific thing, but perhaps I was wrong.) Can anybody explain this one to me?

    Read the article

  • swfupload session problem destroy session

    - by saquib
    Hello Friends, I have a problem with swfupload. I am passing session_id() like this /upload-file.php?s=189477fcfa1ec7f630e70a09e1e84cae but its not maintaining session and destroying my current session (logging me out) here is code in file upload. <?php if(isset($_GET['s'])) { session_id($_GET['s']); session_start(); require_once 'admin/class/user.php'; $u = new User(); //Check for user logged in if($u->islogged() == FALSE) { header("location: index.php"); exit(); code continue ..... } because am not logged in server redirect me to the index.php this is swfupload debugger window output SWF DEBUG: ----- END SWF DEBUG OUTPUT ---- SWF DEBUG: SWF DEBUG: Event: fileDialogStart : Browsing files. Multi Select. Allowed file types: *.jpg SWF DEBUG: Select Handler: Received the files selected from the dialog. Processing the file list... SWF DEBUG: Event: fileQueued : File ID: SWFUpload_0_0 SWF DEBUG: Event: fileDialogComplete : Finished processing selected files. Files selected: 1. Files Queued: 1 SWF DEBUG: StartUpload: First file in queue SWF DEBUG: Event: uploadStart : File ID: SWFUpload_0_0 SWF DEBUG: ReturnUploadStart(): File accepted by startUpload event and readied for upload. Starting upload to /upload-file.php?s='189477fcfa1ec7f630e70a09e1e84cae' for File ID: SWFUpload_0_0 SWF DEBUG: Event: uploadProgress (OPEN): File ID: SWFUpload_0_0 SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 317793. Total: 317793 SWF DEBUG: Event: uploadError: HTTP ERROR : File ID: SWFUpload_0_0. HTTP Status: 302. SWF DEBUG: Event: uploadComplete : Upload cycle complete. SWF DEBUG: StartUpload: First file in queue SWF DEBUG: StartUpload(): No files found in the queue.

    Read the article

  • WPF RadioButton selected in UI, but seen by code as IsChecked == false

    - by Mike
    I have some radio buttons in a group box. I select the buttons randomly, and all works perfectly from a visual standpoint and also the event handler is called each time a new button is selected. Now I have a dependency property with a callback when the value changes. When in this callback procedure I read the IsChecked value of any button, the value is False, in spite the button is visually selected (they are all false at the same time, strange). The debugger also displays all buttons unchecked. Hu hu, I'm lacking ideas about the reason, after the basic verifications... <GroupBox> <StackPanel> <RadioButton x:Name="btNone" Content="Disconnected" IsChecked="True" Checked="OnSelChecked"/> <RadioButton x:Name="btManual" Content="Manual" Checked="OnSelChecked"/> </StackPanel> </GroupBox> Event handler: private void OnSelChecked(object sender, RoutedEventArgs e) { if (btManual.IsChecked == true) { // is called } } Dependency property: public static readonly DependencyProperty ManualProperty = DependencyProperty.Register("Manual", typeof(Position), typeof(SwitchBox), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.AffectsRender, new PropertyChangedCallback(OnManualChanged))); Dependency property callback: private static void OnManualChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args) { SwitchBox box = sender as SwitchBox; if (box.btManual.IsChecked == true) { // never true, why?? } }

    Read the article

  • Uploading file is not working

    - by VinTem
    I have done the following form <% form_for @anexo, :url => {:action => "create"}, :html => {:multpart => true} do |f| %> <%= f.error_messages %> <p> <%= f.label :descricao, "Descrição"%> <%= f.text_field :descricao %> </p> <p> <%= f.label :arquivo_anexo, "Arquivo Anexo" %> <%= f.file_field :arquivo_anexo %> </p> <p> <%= f.submit "Adicionar anexo" %> </p> <% end %> With a model like this: def arquivo_anexo=(novo_arqquivo) self.arquivo = novo_arquivo.read self.nome = File.basename(novo_arquivo.original_filename) self.content_type = novo_arquivo.content_type.chomp end But when I my file is not been sent through the form. When I check the params array using the debugger the data is not sent. Does anyone have any idea or sugestions? Thanks

    Read the article

  • ArrayList<String> NullPointerException

    - by Carlucho
    Am trying to solve a labyrinth by DFS, using adj List to represent the vertices and edges of the graph. In total there are 12 nodes (3 rows[A,B,C] * 4 cols[0,..,3]). My program starts by saving all the vertex labels (A0,..C3), so far so good, then checks the adjacent nodes, also no problems, if movement is possible, it proceeds to create the edge, here its where al goes wrong. adjList[i].add(vList[j].label); I used the debugger and found that vList[j].label is not null it contains a correct string (ie. "B1"). The only variables which show null are in adjList[i], which leads me to believe i have implemented it wrongly. this is how i did it. public class GraphList { private ArrayList<String>[] adjList; ... public GraphList(int vertexcount) { adjList = (ArrayList<String>[]) new ArrayList[vertexCount]; ... } ... public void addEdge(int i, int j) { adjList[i].add(vList[j].label); //NULLPOINTEREXCEPTION HERE } ... } I will really appreaciate if anyone can point me on the right track regrading to what its going wrong... Thanks!

    Read the article

  • Removing UITextField from superview does not make it disappear on screen

    - by moshy
    I have the following code // Breakpoint here [label removeFromSuperview]; [label release]; label = nil; stepping through it with the debugger outputs (gdb) po [self subviews] <NSCFArray 0x476af70>( <UIImageView: 0x47581a0; frame = (0 0; 232 81); opaque = NO; autoresize = W+H; userInteractionEnabled = NO; layer = <CALayer: 0x476b3d0>>, <UILabel: 0x4758870; frame = (15 11; 202 56); text = 'Test'; clipsToBounds = YES; autoresize = W+H; userInteractionEnabled = NO; layer = <CALayer: 0x476b590>> ) (gdb) po label <UILabel: 0x4758870; frame = (15 11; 202 56); text = 'Test'; clipsToBounds = YES; autoresize = W+H; userInteractionEnabled = NO; layer = <CALayer: 0x476b590>> (gdb) n (gdb) n (gdb) n (gdb) po [self subviews] <NSCFArray 0x478c4e0>( <UIImageView: 0x47581a0; frame = (0 0; 232 81); opaque = NO; autoresize = W+H; userInteractionEnabled = NO; layer = <CALayer: 0x476b3d0>> ) Yet it is still visible, it does not disappear. Not even if I do [self setNeedsDisplay] immediately after. Has anyone else come across this? Is it a bug in the SDK or am I missing something?

    Read the article

  • Flex NetConnection error: Property onDirtyList not found on flash.net.NetConnection

    - by David Wolever
    I'm having some trouble with NetConnection. The following code makes a connection without issue… var n:NetConnection = new NetConnection(); n.objectEncoding = ObjectEncoding.AMF0; n.addEventListener(NetStatusEvent.NET_STATUS, function(...args):void { trace("HERE"); }); n.connect("rtmp://...host...", ...args); But as soon as the NET_STATUS event handler finishes (ie, hitting "step into" with the debugger), I get this error: ReferenceError: Error #1069: Property onDirtyList not found on flash.net.NetConnection and there is no default value. Error #2044: Unhandled AsyncErrorEvent:. text=Error #2095: flash.net.NetConnection was unable to invoke callback onDirtyList. error=ReferenceError: Error #1069: Property onDirtyList not found on flash.net.NetConnection and there is no default value. at Test/___Test_Application1_creationComplete()[/Users/wolever/Workspace/Test/src/Test.mxml:13] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.core::UIComponent/dispatchEvent()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\core\UIComponent.as:9440] at mx.core::UIComponent/set initialized()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\core\UIComponent.as:1168] at mx.managers::LayoutManager/doPhasedInstantiation()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:718] at Function/http://adobe.com/AS3/2006/builtin::apply() at mx.core::UIComponent/callLaterDispatcher2()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8744] at mx.core::UIComponent/callLaterDispatcher()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8684] Which is kind of scary because onDirtyList only yields two hits on Google. So... Any suggestions?

    Read the article

  • Debugging a Google Web Toolkit application that has an error when deployed on Google App Engine

    - by gerdemb
    I have a Google Web Toolkit application that I am deploying to Google App Engine. In the deployed application, I am getting a JavaScript error Uncaught TypeError: Cannot read property 'f' of null. This sounds like the JavaScript equivalent of a Java NullPointerException. The problem is that the GWT JavaScript is obfuscated, so it's impossible to debug in the browser and I can't reproduce the same problem in hosted mode where I could use the Java debugger. I think the reason I'm only seeing the error on the deployed application is that the database I'm using on the GAE server is triggering something differently than the test database I'm using during testing and development. So, any ideas about the best way to proceed? I've thought of the following things: Deploy a non-obsfucated version of my application. Despite a lot of Googling, I can't figure out how to do this using the automatic deploy script provided with the Google Eclipse Plugin. Does anyone know? Download and copy my GAE data to the local server Somehow point my development code to use the GAE server for data instead of the local test database. This seems like the best idea... Can anyone suggest how to proceed here? Finally, is there a way to catch these JavaScript errors on the production server and log them somewhere? Without logging, I won't have anyway to know if my users are having errors that don't occur on the server. The GWT.log() function is automatically stripped out of the production code...

    Read the article

  • Setting White balance and Exposure mode for iphone camera + enum default

    - by Spectravideo328
    I am using the back camera of an iphone4 and doing the standard and lengthy process of creating an AVCaptureSession and adding to it an AVCaptureDevice. Before attaching the AvCaptureDeviceInput of that camera to the session, I am testing my understanding of white balance and exposure, so I am trying this: [self.theCaptureDevice lockForConfiguration:nil]; [self.theCaptureDevice setWhiteBalanceMode:AVCaptureWhiteBalanceModeLocked]; [self.theCaptureDevice setExposureMode:AVCaptureExposureModeContinuousAutoExposure]; [self.theCaptureDevice unlockForConfiguration]; 1- Given that the various options for white balance mode are in an enum, I would have thought that the default is always zero since the enum Typedef variable was never assigned a value. I am finding out, if I breakpoint and po the values in the debugger, that the default white balance mode is actually set to 2. Unfortunately, the header files of AVCaptureDevice does not say what the default are for the different camera setting. 2- This might sound silly, but can I assume that once I stop the app, that all settings for whitebalance, exposure mode, will go back to their default. So that if I start another app right after, the camera device is not somehow stuck on those "hardware settings".

    Read the article

  • Why doesn't Default route work using Html.ActionLink in this case?

    - by StuperUser
    I have a rather perculiar issue with routing. Coming back to routing after not having to worry about configuration for it for a year, I am using the default route and ignore route for resources: routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( "Default", // Route name "{controller}/{action}/{id}", // URL with parameters new { controller = "Home", action = "Index", id = UrlParameter.Optional }); I have a RulesController with an action for Index and Lorem and a Index.aspx, Lorem.aspx in Views Rules directory. I have an ActionLink aimed at Rules/Index on the maseter page: <li><div><%: Html.ActionLink("linkText", "Index", "Rules")%></div></li> The link is being rendered as http://localhost:12345/Rules/ and am getting a 404. When I type Index into the URL the application routes it to the action. When I change the default route action from "Index" to "Lorem", the action link is being rendered as http://localhost:12345/Rules/Index adding the Index as it's no longer on the default route and the application routes to the Index action correctly. I have used Phil Haack's Routing Debugger, but entering the url http://localhost:12345/Rules/ is causing a 404 using that too. I think I've covered all of the rookie mistakes, relevant SO questions and basic RTFMs. I'm assuming that "Rules" isn't any sort of reserved word in routing. Other than updating the Routes and debuugging them, what can I look at?

    Read the article

  • Error Message-The source attachment does not contain the source for the file ListView.class

    - by user603695
    Hello, new to Android. I get the following message in the debugger perspective: The source attachment does not contain the source for the file ListView.class You can change the source attachment by clicking the change attached Source Below Needless to say the app errors. I've tried to change the source attachment to the location path: C:/Program Files/Android/android-sdk-windows/platforms/android-8/android.jar However, this did not work. Any thoughts would be much appreciated. Code is: import android.app.ListActivity; import android.os.Bundle; import android.view.*; import android.widget.*; public class HelloListView extends ListActivity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setListAdapter(new ArrayAdapter<String>(this, R.layout.main, COUNTRIES)); ListView lv = getListView(); lv.setTextFilterEnabled(true); lv.setOnItemClickListener(new AdapterView.OnItemClickListener() { public void onItemClick(AdapterView<?> parent, View view, int position, long id) { // When clicked, show a toast with the TextView text Toast.makeText(getApplicationContext(), ((TextView) view).getText(), Toast.LENGTH_SHORT).show(); } }); } static final String[] COUNTRIES = new String[] { "Afghanistan", "Albania", "Algeria", "American Samoa... Thanks!

    Read the article

  • Delphi trace tool

    - by Max
    I was wondering if there's a tool or a component for Delphi that can trace method execution line by line and create a log file. With this kind of tool it is easy to compare how method performs on two sets of input data by comparing two log files. EDIT: Let's say there is a function 10: function MyFunction(aInput: Integer): Integer; 11: begin 12: if aInput 10 then 13: Result := 10 14: else 15: Result := 0; 16: end; I'm looking for a tool that would give the log which whould be similar to the following: When aInput parameter is 1: Line 10: 'function MyFunction(aInput: Integer): Integer;' Line 11: 'begin' Line 12: 'if aInput 10 then' Line 15: 'Result := 0;' Line 16: 'end;' and when aInput parameter is 11: Line 10: 'function MyFunction(aInput: Integer): Integer;' Line 11: 'begin' Line 12: 'if aInput 10 then' Line 13: 'Result := 10;' Line 16: 'end;' The only information that should be required by the tool is the function name. It's like stepping through the method under debugger, but in an automatic manner with logging every line of code.

    Read the article

  • Low-Hanging Fruit: Obfuscating non-critical values in JavaScript

    - by Piskvor
    I'm making an in-browser game of the type "guess what place/monument/etc. is in this satellite/aerial view", using Google Maps JS API v3. However, I need to protect against cheaters - you have to pass a google.maps.LatLng and a zoom level to the map constructor, which means a cheating user only needs to view source to get to this data. I am already unsetting every value I possibly can without breaking the map (such as center and the manipulation functions like setZoom()), and initializing the map in an anonymous function (so the object is not visible in global namespace). Now, this is of course in-browser, client-side, untrusted JavaScript; I've read much of the obfuscation tag and I'm not trying to make the script bullet-proof (it's just a game, after all). I only need to make the obfuscation reasonably hard against the 1337 Java5kryp7 haxz0rz - "kid sister encryption", as Bruce Schneier puts it. Anything harder than base64 encoding would deter most cheaters by eliminating the lowest-hanging fruit - if the cheater is smart and determined enough to use a JS debugger, he can bypass anything I can do (as I need to pass the value to Google Maps API in plaintext), but that's unlikely to happen on a mass scale (there will also be other, not-code-related ways to prevent cheating). I've tried various minimizers and obfuscators, but those will mostly deal with code - the values are still shown verbatim. TL;DR: I need to obfuscate three values in JavaScript. I'm not looking for bullet-proof armor, just a sneeze-guard. What should I use?

    Read the article

  • How to safely transfer reference to object across window?

    - by Morgan Cheng
    I'm debugging a web application. Javasript in one window create one object and use it as argument to invoke global method in another window. Pseudo code is like below. var obj = new Foo(); anotherWin.bar(obj); In anotherWin, the argument is stored in global variable. var g_obj; function bar(obj) { g_obj = obj; ... } When other function tries to reference g_obj.Id, it throws exception "Cannot evaluate expression". This happens in IE8.0.7600.16385 on Windows 7. In Visual Studio debugger, when this exception happens, the g_obj shows as {...} It looks all its properties are lost. Perhaps the root reason is the object is created in one window but only referenced in another window. The object might be garbage-collected at any time. Is there any way to work around this?

    Read the article

< Previous Page | 52 53 54 55 56 57 58 59 60 61 62 63  | Next Page >