Search Results

Search found 586 results on 24 pages for 'hanging'.

Page 15/24 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • python: can't terminate a thread hung in socket.recvfrom() call

    - by Dihlofos
    Hello, everyone I cannot get a way to terminate a thread that is hung in a socket.recvfrom() call. For example, ctrl+c that should trigger KeyboardInterrupt exception can't be caught. Here is a script I've used for testing: from socket import * from threading import Thread from sys import exit class TestThread(Thread): def __init__(self,host="localhost",port=9999): self.sock = socket(AF_INET,SOCK_DGRAM) self.sock.bind((host,port)) super(TestThread,self).__init__() def run(self): while True: try: recv_data,addr = self.sock.recvfrom(1024) except (KeyboardInterrupt, SystemExit): sys.exit() if __name__ == "__main__": server_thread = TestThread() server_thread.start() while True: pass The main thread (the one that executes infinite loop) exits. However the thread that I explicitly create, keeps hanging in recvfrom(). Please, help me resolve this.

    Read the article

  • glDrawElements allocating memory and not releasing it

    - by Joshua Weinberg
    Using OpenGLES 1.1 on the iPhone 3G (device, not simulator), I do normal drawing fun. But at points during the run of the application I get giant memory spikes, after a lot of digging with instruments I have found that it is glDrawElements that is grabbing the memory. The buffer being allocated is 4 meg, which to me means its loading a texture into RAM, which I guess could be valid, but its never releasing this buffer, and is allocating multiple of them. How do I make sure that these buffers that GL is creating get destroyed, instead of just hanging around?

    Read the article

  • Cannot run 32bit compiled WPF applications on Windows 7 64bit

    - by adriaanp
    I created a WPF project in VS2008 and compiled it with Any CPU, x64 and x86. Any CPU and x64 works, but compiling to x86 the application is hanging when running through VS2008 and crashing when running without debugging. Debugging it with WinDbg I can see a StackOverflowException and sometimes a MissingMethodException relating to WPF methods. Common sense is telling something here that the CLR is not loading the correct assemblies or something when running 32bit WPF apps. I tried reinstalling .NET Framework 3.5 SP1, but it does not fix the problem. I don't know how to go about checking if the correct assemblies are loaded or used. Any ideas? UPDATE: Not a real solution but the best I could do quickly was to reinstall Windows 7

    Read the article

  • visual studio 2002: c# threading question

    - by dotnet-practitioner
    Hi, I have a piece of code where I send a file content over tcp/ip channel. There are times when this connection hangs causing entire application to freeze. Is there a way for my main thread to spawn a worker thread and monitor that worker thread. If worker thread succeeds, well and good. If it hangs , the main thread could log error message and continue. How can I simulate in my test code that a worker thread is hanging. please let me know what could the code look like. I am using C# Visual studio 2002.

    Read the article

  • Finding an HTTP proxy that will intercept static resource requests

    - by pkh
    Background I develop a web application that lives on an embedded device. In order to make dev times sane, frontend development is done using apache serving static documents, with PHP proxying out to the embedded device for specifically configured dynamic resources. This requires that we keep various server-simulation scripts hanging around in source control, and it requires updating those scripts whenever we add a new dynamic resource. Problem I'd like to invert the logic: if the requested document is available in the static documents directory, serve it; otherwise, proxy the request to the embedded device. Optimally, I want a software package that will do this for me (for Windows or buildable on cygwin). I can deal with forcing apache to do it with PHP, but I'm unsure how to configure it to make it happen. I've looked at squid and privoxy, but neither of them seem to do what I want. Any ideas? I'd rather not have to roll my own.

    Read the article

  • Possible to get the line number of the currently executing sproc in SQL Server?

    - by Ian Kemp
    A few years back I worked in a Sybase/Delphi environment, using the BDE to connect to the DB server. We had a little Delphi app that, given the name of a currently executing stored procedure, could tell you what line of that sproc was currently being executed. This was exceptionally useful for debugging sprocs that seemed to be hanging. I'd like to use this functionality in SQL Server, but I can't remember whether it was a Sybase or a BDE feature. Is this functionality available in SQL Server and if so, what command(s) do I need to use to view this information?

    Read the article

  • How do I safely Debug.Assert in ASP.NET?

    - by MatthewMartin
    Asserts can't be caught. This is good because some errors I don't want to be wrapped in try/catch, at least not on the development server. But Asserts seem awefully dangerous. If they get onto production, it can hang the ASP.NET server with a msgbox. //Don't want this on prod even if debug=true is in the web.config #if DEBUG //A future client programmer can wrap this in a try{}catch{} if (!EverythingIsOkay) throw new InvalidOperationException("Dagnabbit, programming error"); //This stops the but has less information that an // Exception and hangs the server if this accidentally // runs on production System.Diagnostics.Debug.Assert(!EverythingIsOkay); #endif Is there better way to communicate an violation of a inviolable condition to a developer without risking hanging IIS? UPDATE: After reading the first replies, I guess the answer hinges on a foolproof way to detect when code is running in a development environment and when it is on a production server, or figuring out how to throw an exception that can't be caught and ignored.

    Read the article

  • What mutex/locking/waiting mechanism to use when writing a Chat application with Tornado Web Framewo

    - by user272973
    We're implementing a Chat server using Tornado. The premise is simple, a user makes open an HTTP ajax connection to the Tornado server, and the Tornado server answers only when a new message appears in the chat-room. Whenever the connection closes, regardless if a new message came in or an error/timeout occurred, the client reopens the connection. Looking at Tornado, the question arises of what library can we use to allow us to have these calls wait on some central object that would signal them - A_NEW_MESSAGE_HAS_ARRIVED_ITS_TIME_TO_SEND_BACK_SOME_DATA. To describe this in Win32 terms, each async call would be represented as a thread that would be hanging on a WaitForSingleObject(...) on some central Mutex/Event/etc. We will be operating in a standard Python environment (Tornado), is there something built-in we can use, do we need an external library/server, is there something Tornado recommends? Thanks

    Read the article

  • PHP float bug: PHP Hangs On Numeric Value

    - by jeroen
    I just read an interesting article about php hanging on certain float numbers, see The Register and Exploring Binary. I never explicitly use floats, I use number_format() to clean my input and display for example prices. Also, as far as I am aware, all input from for example forms are strings until I tell them otherwise so I am supposing that this problem does not affect me. Am I right, or do I need to check for example Wordpress and Squirrelmail installations on my server to see if they cast anything to float? Or better, grep all php files on my servers for float?

    Read the article

  • Memory leak with ContextMenuStrip

    - by Dave
    I'm creating a lot of custom controls and adding them to a FlowLayoutPanel. There is also a ContextMenuStrip created and populated at design time. Every time a control is added to the panel it has its ContextMenuStrip property assigned to this menu, so that all controls "share" the same menu. But I noticed when the controls are removed from the panel and disposed of, the memory in use in Task Manager doesn't drop. It rises around 50kB every time a control is created and added to the layout panel. I downloaded the trial of .NET Memory Profiler and it showed there were references to the menu strip hanging around after the controls were disposed. I changed the code to explicitly set the ContextMenuStrip property to null before disposing of the control, and yep, the memory is now released. Why is this? Shouldn't the GC clean up this type of thing?

    Read the article

  • session_start() Hangs The Server

    - by Narcissus
    Totally confused by this one... We have a WAMPServer installation set up, running a number of virtual hosts from various document roots. Just recently, one particular domain has started hanging the server. We traced it down to session_start(). If we comment it out, there are no problems (except, of course, for the fact that we can't do anything with the session). With it uncommented, it will hang the page load and, with enough reloads, will hang the entire server. All of the other sites still work perfectly with their sessions. As far as I know, there is nothing different with the way sessions are being worked with. I am looking further into it (in case someone changed something) but right now I'm hoping for some direction :) So, any thoughts?

    Read the article

  • How can I recursively read out directories in Perl?

    - by Przemek
    Hi, I want to read out a directory recursively to print the data-structure in an HTML-Page with Template::Toolkit. But I'm hanging in how to save the Paths and Files in a form that can be read our easy. My idea started like this sub list_dirs{ my ($rootPath) = @_; my (@paths); $rootPath .= '/' if($rootPath !~ /\/$/); for my $eachFile (glob($path.'*')) { if(-d $eachFile) { push (@paths, $eachFile); $paths[$i] = &list_dirs($eachFile); } else { push (@files, $eachFile); } } return @paths; } How could I solve this problem?

    Read the article

  • How to run lengthy tasks from an ASP.NET page?

    - by Jimmy C
    I've got an ASP.NET page with a simple form. The user fills out the form with some details, uploads a document, and some processing of the file then needs to happens on the server side. My question is - what's the best approach to handling the server side processing of the files? The processing involves calling an exe. Should I use seperate threads for this? Ideally I want the user to submit the form without the web page just hanging there while the processing takes place. I've tried this code but my task never runs on the server: Action<object> action = (object obj) => { // Create a .xdu file for this job string xduFile = launcher.CreateSingleJobBatchFile(LanguagePair, SourceFileLocation); // Launch the job launcher.ProcessJob(xduFile); }; Task job = new Task(action, "test"); job.Start(); Any suggestions are appreciated.

    Read the article

  • Is there any conflict between NFS and calling getFD().sync()?

    - by Dr.Dredel
    My boss is worried that our NFS file system will not be happy with the jboss run java process calling getFD().sync on the files we are writing. We have noticed that frequently the time stamp on the created file is minutes (sometimes as many as 15 minutes) after the log claims the file was finished writing. My only guess is that the NFS is hanging on to the file in memory and not writing it till it feels like it. sync should solve that probelm, right? I also noticed that there is never a close() called on the file. Wondering if that could have been the cause as well? any thoughts appreciated.

    Read the article

  • DispatcherOperations.Wait()

    - by Mark
    What happens if you call dispatcherOperation.Wait() on an operation that has already completed? Also, the docs say that it returns a DispatcherOperationStatus, but wouldn't that always be Completed since it (supposedly) doesn't return until it's done? I was trying to use it like this: private void Update() { while (ops.Count > 0) ops.Dequeue().Wait(); } public void Add(T item) { lock (sync) { if (dispatcher.CheckAccess()) { list.Add(item); OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, item)); } else { ops.Enqueue(dispatcher.BeginInvoke(new Action<T>(Add), item)); } } } I'm using this in WPF, so all the Add operations have to occur on the UI thread, but I figured I could basically just queue them up without having to wait for it to switch threads, and then just call Update() before any read operations to ensure that the list is up to date, but my program started hanging.

    Read the article

  • Python HTTPSConnection.close() does not appear to close the connection?

    - by Dave
    I'm not sure if this is a bug or if I'm just doing something wrong. If I were to do an HTTP connection like this: import httplib http_connection = httplib.HTTPConnection("192.168.192.196") http_connection.request("GET", "/") http_connection.sock.settimeout(20) response = http_connection.getresponse() data = response.read() http_connection.close() Then at a DOS prompt, I do this: netstat -ano | find /i "192.168.192.196:80" | find /i "ESTABLISHED" I get nothing. However, if I do the same thing, but change it to an HTTPSConnection: import httplib http_connection = httplib.HTTPSConnection("192.168.192.196") http_connection.request("GET", "/") http_connection.sock.settimeout(20) response = http_connection.getresponse() data = response.read() http_connection.close() Then do this: netstat -ano | find /i "192.168.192.196:443" | find /i "ESTABLISHED" I will actually see that the connection remains established until I actually ^Z out of the Python shell. This is happening in one of the applications I'm responsible for. Python isn't actually hanging there - it's simply leaving the connection open. Am I doing something wrong here? Do I need extra code to close the HTTPS connection? This is Python 2.6.4, btw.

    Read the article

  • Streaming large result sets with MySQL

    - by configurator
    I'm developing a spring application that uses large MySQL tables. When loading large tables, I get an OutOfMemoryException, since the driver tries to load the entire table into application memory. I tried using statement.setFetchSize(Integer.MIN_VALUE); but then every ResultSet I open hangs on close(); looking online I found that that happens because it tries loading any unread rows before closing the ResultSet, but that is not the case since I do this: ResultSet existingRecords = getTableData(tablename); try { while (existingRecords.next()) { // ... } } finally { existingRecords.close(); // this line is hanging, and there was no exception in the try clause } The hangs happen for small tables (3 rows) as well, and if I don't close the RecordSet (which happened in one method) then connection.close() hangs.

    Read the article

  • Shell_exec with git pull ?

    - by rnaud
    Hi everyone, I am setting up a github account, to work on a small project with some friends. I would like to have my home machine able to do a git pull via php, so that we just have to call this small php file for the machine to be up to date. As of right now : <?php $output = shell_exec('git help'); echo "<pre>$output</pre>"; ?> This works perfectly and I get the output, I am in the right directory, so git pull should work just as well, but I get a hanging page, no error, nothing. Any idea ?

    Read the article

  • Crash when checking BOF property of pessimistic locked ADO recordset

    - by Patrick
    Bit of an odd one for you: I've got two connections to a database, on one I've opened a _RecordsetPtr with a pessimistic lock. I can no longer send an UPDATE command on the other connection. I can send a SELECT command on the second connection and data is returned. If I use a read only lock then there are no problems however when I use a pessimistic lock on the second connection as well I can check the State == adStateOpen but the program hangs when I test the BOF property! If I don't test the BOF property and try to call moveNext on the second connection the software hangs If I do neither of these I am able to access the data via the second connection but trying to access the data from the first connection causes the software to hang. Any one seen anything similar as I'm a bit stuck? EDIT : it wasn't hanging, someone had put a 30 minute timeout on the connection and I wasn't waiting that long while testing...

    Read the article

  • How do you plan for starting a new web system?

    - by Kerry
    I've been creating more and more systems recently and I find more and more planning and preparation I do before starting the project. I determine what libraries or frameworks I will be using, what languages, the basic architecture of how the site will flow, etc. I've also heard of other design processes such as hanging styrofoam balls to show where classes are and how they relate, which is a process I've never heard of nor do I know how it works. Is there any software that helps with this process? Are there any guidelines or steps or do you have a recommended set of steps or guidelines that you follow when designing a new project?

    Read the article

  • Do you prefer to code on a Laptop or a Desktop, or both ?

    - by CAD bloke
    What is your primary development machine - a Desktop or a laptop? Why? Do you use both - if so, do you use source control to keep them synched? This might seem like a dumb question but I'm on the steep part of the learning curve & I'd be interested in your insights. [edit] - Using a laptop assumes hanging an Imax-sized screen off it when it is docked. Using a desktop assumes 2x Imax screens. [edit] - This is faster than Twitter! IDE is VS2008 - laptop is 17 (or 15) inch, 1920x1200

    Read the article

  • MultiThreading question

    - by TiGer
    Hi, I am developing on Android but the question might be just as valid on any other Java platform. I have developed a multi-threaded app. Lets say I have a first class that needs to do a time-intensive task, thus this work is done in another Thread. When it's done that same Thread will return the time-intensive task result to another (3rd) class. This last class will do something and return it's result to the first-starting class. I have noticed though that the first class will be waiting the whole time, maybe because this is some kind of loop ? Also I'd like the Thread-class to stop itself, as in when it has passed it's result to the third class it should simply stop. The third class has to do it's work without being "incapsulated" in the second class (the Thread one). Anyone knows how to accomplish this ? right now the experience is that the first one seems to be waiting (hanging) till the second and the third one are done :(

    Read the article

  • How can I make a view get bigger again, as soon as the status bar goes back to normal height after a

    - by Thanks
    In the simulator I went to Hardware menu and activated the simulation of bigger status bar during phone call. Now, I tried to make a view in my nib that takes up the whole screen. As soon as the status bar gets smaller, I want my view to get bigger, so it uses that space up there. But regardless of any autoresizing settings, my view will keep pressed down after that status bar gets smaller. There is a empty slot left where the status bar was after hanging up the call. What's that actually supposed to be? Is my app recognizing the status bar as a view, or is the status bar indeed making my screen smaller? I mean...does it mess around with my views as if it was a view itself, or do my views not know about a status bar, but about a smaller screen size when the status bar gets bigger? How do you get your views big again when the status bar returns to normal height?

    Read the article

  • Where do you hang your semantic information, html?

    - by bobobobo
    Well, I keep putting semantic information about what an element means for the page logically in the class attribute <li class="phone-number">555-5555</li> It seems to work for this dual purpose of hanging semantic information and a pointer to how to style it. I'm not sure if this is the best idea, I'm trying to see if others have other ways of doing it. I also started to use a hidden input: <li>555-5555 <input class="semantics" type="hidden" value="phone-number" /></li> inside an element, so with jQuery, I can retrieve additional information about the element using li.find( '.semantics' ).val() To get an element's semantics from JavaScript

    Read the article

  • Why does my git push hang after successfully pushing?

    - by John
    On a newly set up ssh git repo, whenever I push, I get normal output like this: ? git push Counting objects: 15, done. Delta compression using up to 4 threads. Compressing objects: 100% (9/9), done. Writing objects: 100% (9/9), 989 bytes, done. Total 9 (delta 7), reused 0 (delta 0) It happens very quickly, and the changes are immediately available on the server repo. But the output hangs there for about a minute, and then finishes with: To [email protected]:baz.git c8c391c..1de5e80 branch_name -> branch_name If I control-c before it finishes, everything seems to continue to be normal and healthy, locally and remotely. What is it doing while hanging? Is something configured incorrectly on the server side?

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >