Search Results

Search found 2053 results on 83 pages for 'signal'.

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

  • Does it mean JVM Suspended?

    - by Joe.wang
    When my application run . I got a message says : Ping: Timed out waiting for signal from JVM. The JVM was launched with debug options so this may be because the JVM is currently suspended by a debugger. Any future timeouts during this JVM invocation will be silently ignored. What does that mean? It seems it will block any web request from outside? because when I upload a file to it, it failed. help me .

    Read the article

  • Storing task state between multiple django processes

    - by user366148
    I am building a logging-bridge between rabbitmq messages and Django application to store background task state in the database for further investigation/review, also to make it possible to re-publish tasks via the Django admin interface. I guess it's nothing fancy, just a standard Producer-Consumer pattern. Web application publishes to message queue and inserts initial task state into the database Consumer, which is a separate python process, handles the message and updates the task state depending on task output The problem is, some tasks are missing in the db and therefore never executed. I suspect it's because Consumer receives the message earlier than db commit is performed. So basically, returning from Model.save() doesn't mean the transaction has ended and the whole communication breaks. Is there any way I could fix this? Maybe some kind of post_transaction signal I could use? Thank you in advance.

    Read the article

  • Trouble with QxtGlobalShortcut [solved]

    - by Ockonal
    Hello, i'm trying to set global shortcut for my applcation using QxtGlobalShortcut. Here is my code: QxtGlobalShortcut m_hotkeyHandle; m_hotkeyHandle.setShortcut( QKeySequence("Ctrl+Shift+X") ); m_hotkeyHandle.setEnabled(true); connect( &m_hotkeyHandle, SIGNAL(activated()), this, SLOT(hotkeyPressed()) ); void MainWindow::hotkeyPressed() { QMessageBox::information(this, "Good", "Hot key triggered", "yes", "no"); } But after applcation started i got: QxtGlobalShortcut failed to register: "Ctrl+Shift+X" And my programm doesn't activate after hot key pressing. What should i do? EDIT: There was a bug in Qxt-lib 0.5 with shortcut. I spoke with developer and knew that i just need to update library from dev-branch (0.5.1 is worked).

    Read the article

  • How can two programs talk to each other in Java?

    - by Arnon
    I want to ?reduce? the CPU usage/ROM usage/RAM usage - generally?, all system resources that my app uses - who doesn't? :) For this reason I want to split the preferences window from the rest of the application, and let the preferences window to run as ?independent? program. The preferences program ?should? write to a Property file(not a problem at all) and to send a "update signal" to the main program - which means it should call the update method (that i wrote) that found in the Main class. How can I call the update method in the Main program from the preferences program? To put it another way, is a way to build preferences window that take system resources just when the window appears? Is this approach - of separating programs and let them talk to each other (somehow) - the right approach for speeding up my programs?

    Read the article

  • Using pthread condition variable with rwlock

    - by Doomsday
    Hello, I'm looking for a way to use pthread rwlock structure with conditions routines in C++. I have two questions: First: How is it possible and if we can't, why ? Second: Why current POSIX pthread have not implemented this behaviour ? To understand my purpose, I explain what will be my use: I've a producer-consumer model dealing with one shared array. The consumer will cond_wait when the array is empty, but rdlock when reading some elems. The producer will wrlock when adding(+signal) or removing elems from the array. The benefit of using rdlock instead of mutex_lock is to improve performance: when using mutex_lock, several readers would block, whereas using rdlock several readers would not block.

    Read the article

  • What's wrong with my self-defined init method?

    - by user313439
    In ClassA: - (ClassA *)initWithID:(NSString *) cID andTitle:(NSString *) cTitle { ClassAID = cID; ClassATitle = cTitle; return self; } In ClassB: - (void)cellDidSelected { ClassA *classAController = [[ClassA alloc] init]; //Program received signal: “EXC_BAD_ACCESS” when executing the following line. classAController = [classAController initWithClassAID:ClassAID andClassATitle:ClassATitle]; NSLog(@"I want to get the value of ID:%@ and Title:%@ here.", [classAController ClassATitle], [classAController ClassAID]) } Could anyone point where is wrong? Thanks a lot.

    Read the article

  • VHDL Simulation Timing Behaviour

    - by chris
    I'm trying to write some VHDL code that simply feeds sequential bits from a std_logic_vector into a model of an FSM. However, the bits don't seem to be updating correctly. To try figure out the issue, I have the following code, where instead of getting a bit out of a vector, I'm just toggling the signal x (the same place I'd be getting a bit out). clk <= NOT clk after 10 ns; process(clk) begin if count = 8 then assert false report "Simulation ended" severity failure; elsif (clk = '1') then x <= test1(count); count <= count + 1; end if; end process; EDIT: It appears I was confused.I've put it back to trying to take bit by bit out of the vector. This is the output. I would have thought that on when count is 1, x would take on the value of test1(1) which is a 1.

    Read the article

  • How to debug lost events posted from non-GUI thread in Qt?

    - by gp
    As the subject says, I'm posting events from non-GUI thread (some GStreamer thread, to be precise). Code looks like this: GstBusSyncReply on_bus_message(GstBus* bus, GstMessage* message, gpointer data) { bool ret = QMetaObject::invokeMethod(static_cast<QObject*>(data), "stateChanged", Qt::QueuedConnection); Q_ASSERT(ret); return GST_BUS_PASS; } The problem is, stateChanged (doesn't matter whether it is a slot or signal) is not called. I've stepped into QMetaObject::invokeMethod with debugger, followed it till it called PostMessage (it is Qt 4.6.2 on Windows, by the way) – everything seemed to be OK. Object pointed to by data lives in GUI thread, I've double-checked this. How can I debug this problem? Or, better, maybe sidestep it altogether?

    Read the article

  • How to get text in QlineEdit when QpushButton is pressed in a string?

    - by esafwan
    I have given my code below, have problem in implementing a function I want the text in lineedit with objectname 'host' in a string say 'shost'. when the user click the pushbutton with name 'connect'.How do i do it? I tried and failed. How to implement this function? import sys from PyQt4.QtCore import * from PyQt4.QtGui import * class Form(QDialog): def __init__(self, parent=None): super(Form, self).__init__(parent) le = QLineEdit() le.setObjectName("host") le.setText("Host") pb = QPushButton() pb.setObjectName("connect") pb.setText("Connect") layout.addWidget(le) layout.addWidget(pb) self.setLayout(layout) self.connect(pb, SIGNAL("clicked()"),self.button_click) self.setWindowTitle("Learning") def button_click(self): #i want the text in lineedit with objectname #'host' in a string say 'shost'. when the user click # the pushbutton with name connect.How do i do it? # I tried and failed. How to implement this function? app = QApplication(sys.argv) form = Form() form.show() app.exec_() Now how do i implement the function "def button_click(self):" ? I have just started with pyQt!

    Read the article

  • Killing a subprocess including its children from python

    - by user316664
    Hi, I'm using the subprocess module on python 2.5 to spawn a java program (the selenium server, to be precise) as follows: import os import subprocess display = 0 log_file_path = "/tmp/selenium_log.txt" selenium_port = 4455 selenium_folder_path = "/wherever/selenium/lies" env = os.environ env["DISPLAY"] = ":%d.0" % display command = ["java", "-server", "-jar", 'selenium-server.jar', "-port %d" % selenium_port] log = open(log_file_path, 'a') comm = ' '.join(command) selenium_server_process = subprocess.Popen(comm, cwd=selenium_folder_path, stdout=log, stderr=log, env=env, shell=True) This process is supposed to get killed once the automated tests are finished. I'm using os.kill to do this: os.killpg(selenium_server_process.pid, signal.SIGTERM) selenium_server_process.wait() This does not work. The reason is that the shell subprocess spawns another processfor the java program, and the pid of that process is unknown to my python code. I've tried killing the process group with os.killpg, but that kills also the python process which runs this code in the first place. Setting shell to false, thus avoiding the java program to run inside a shell environment, is also out of the question, due to other reasons. Does anyone have an idea how I can kill the shell and any other processes generated by it? Cheers, Ulas

    Read the article

  • What does that mean? "mi_cmd_stack_list_frames: Not enough frames in stack."

    - by HelloMoon
    Debugger is telling me this, when I run my app on device: Program received signal: “EXC_BAD_ACCESS”. mi_cmd_stack_list_frames: Not enough frames in stack. mi_cmd_stack_list_frames: Not enough frames in stack. I don't get information about where in code that happens. That's all I get. Any idea what that could mean? The app crashes after that. When the device is not connected to the mac, it still crashes, so not a debugger problem.

    Read the article

  • Broadcast message or file to nearby Bluetooth devices

    - by Medjeti
    Hiya, A client of ours is attending a business fair and would like to push some sort of "welcome message" to people visiting their space. I'm not too familiar with Bluetooth, so I have a few questions: What kind of content can you transfer via Bluetooth? (Is it files only or is it possible to send a simple text message?) Is it possible to push content only to recipients within a certain distance? (ie. based on signal strength or similar) Can anybody recommend a piece of software that can do some or all of the above? If necessary we could program a custom solution ourselves (.NET), but I'm sure there must be a program out there that can do the job. I've googled a bit and came across the 32feet.NET framework - does anybody have any experience with this framework? Thanks in advance for any suggestions!

    Read the article

  • When should we use * and & and . and -> ?

    - by uzay95
    Why we are using * character when we are creating button but we aren't adding it to app instance? #include <QApplication> #include <QPushButton> int main(int argc,char *argv[]) { QApplication app(argc,argv); QPushButton *button = new QPushButton("Button Text"); QObject::connect(button,SIGNAL(clicked()),&app,SLOT(quit())); button->show(); return app.exec(); } When should we use * and & and . and - ?

    Read the article

  • overriding callbacks avoiding attribute pollution

    - by pygabriel
    I've a class that has some callbacks and its own interface, something like: class Service: def __init__(self): connect("service_resolved", self.service_resolved) def service_resolved(self, a,b c): ''' This function is called when it's triggered service resolved signal and has a lot of parameters''' the connect function is for example the gtkwidget.connect, but I want that this connection is something more general, so I've decided to use a "twisted like" approach: class MyService(Service): def my_on_service_resolved(self, little_param): ''' it's a decorated version of srvice_resolved ''' def service_resolved(self,a,b,c): super(MyService,self).service_resolved(a,b,c) little_param = "something that's obtained from a,b,c" self.my_on_service_resolved(little_param) So I can use MyService by overriding my_on_service_resolved. The problem is the "attributes" pollution. In the real implementation, Service has some attributes that can accidentally be overriden in MyService and those who subclass MyService. How can I avoid attribute pollution? What I've thought is a "wrapper" like approach but I don't know if it's a good solution: class WrapperService(): def __init__(self): self._service = service_resolved # how to override self._service.service_resolved callback? def my_on_service_resolved(self,param): ''' '''

    Read the article

  • Waiting for ServerSocket accept() to put socket into "listen" mode

    - by inazaruk
    I need a simple client-server communication in order to implement unit-test. My steps: Create server thread Wait for server thread to put server socket into listen mode ( serverSocket.accept() ) Create client Make some request, verify responses Basically, I have a problem with step #2. I can't find a way to signal me when server socket is put to "listen" state. An asynchronous call to "accept" will do in this case, but java doesn't support this (it seems to support only asynchronous channels and those are incompatible with "accept()" method according to documentation). Of cause I can put a simple "sleep", but that is not really a solution for production code. So, to summarize, I need to detect when ServerSocket has been put into listen mode without using sleeps and/or polling.

    Read the article

  • Should i use lock.lock(): in this method?

    - by user962800
    I wrote this method whose purpose is to give notice of the fact that a thread is leaving a specific block of code A thread stands for a car which is leaving a bridge so other cars can traverse it . The bridge is accessible to a given number of cars (limited capacity) and it's one way only. public void getout(int diection){ // release the lock semaphore.release(); try{ lock.lock(); //access to shared data if(direction == Car.NORTH) nNordTraversing--; //decreasing traversing threads else nSudTraversing--; bridgeCond.signal(); }finally{ lock.unlock(); } } My question is: should I use lock.lock(); or it's just nonsense? thanks in advance

    Read the article

  • Segfaults with singletons

    - by Ockonal
    Hello, I have such code: // Non singleton class MyLogManager { void write(message) {Ogre::LogManager::getSingletonPtr()->logMessage(message);} } class Utils : public singleton<Utils> { MyLogManager *handle; MyLogManager& getHandle { return *handle; } }; namespace someNamespace { MyLogManager &Log() { return Utils::get_mutable_instance().getHandle(); } } int main() { someNamespace::Log().write("Starting game initializating..."); } In this code I'm using boost's singleton (from serialization) and calling Ogre's log manager (it's singleton-type too). The program fails at any trying to do something with Ogre::LogManager::getSingletonPtr() object with code User program stopped by signal (SIGSEGV) I checked that getSingletonPtr() returns address 0x000 But using code Utils::get_mutable_instance().getHandle().write("foo") works good in another part of program. What's wrong could be there with calling singletons?

    Read the article

  • Void pointer cast C++ and GTK

    - by Tarantula
    See this GTK callback function: static gboolean callback(GtkWidget *widget, GdkEventButton *event, gpointer *data) { AnyClass *obj = (AnyClass*) data; // using obj works } (please note the gpointer* on the data). And then the signal is connected using: AnyClass *obj2 = new AnyClass(); gtk_signal_connect(/*GTK params (...)*/, callback, obj2); See that the *AnyClass is going to be cast to gpointer* (void**). In fact, this is working now. The callback prototype in GTK documentation is "gpointer data" and not "gpointer *data" as shown in code, what I want to know is: how this can work ? Is this safe ?

    Read the article

  • .Net Compact Framework - is there any way in the SerialPort class to set the RTS control to TOGGLE ?

    - by egapotz
    Hi, I found very annoying the fact that the SerialPort class in the .NET Framework doesn't allow to set the rts control to TOGGLE. There is a property called RTSEnable that lets me control directly the status of the RTS signal, but in a Compact Framework app there is not much precision to make it work well. Another solution can be to write a class that calls unmanaged APIs and set the rts control via the DCB structure, but I don't like it since I am using some external libraries that need to reference to a SerialPort instance. Have you any other idea ? Thanks !

    Read the article

  • Break the limit of threading, segmentation fault

    - by user353573
    use pthread_create to create limited number of threads running concurrently Successfully compile and run However, after adding function pointer array to run the function, Segmentation fault Where is wrong? workserver number: 0 Segmentation fault void* workserver(void arg) { int status; while(true) { printf("workserver number: %d\n", (int)arg); ( job_queue[(int)arg])(); sleep(3); status = pthread_mutex_lock(&data.mutex); if(status != 0) printf("%d lock mutex", status); data.value = 1; status = pthread_cond_signal(&data.cond); if(status != 0) printf("%d signal condition", status); status = pthread_mutex_unlock(&data.mutex); if(status != 0) printf("%d unlock mutex", status); } }

    Read the article

  • QConnect find no such slot on QCombobox by Qt Creater

    - by user2534154
    I create a window inherit from QWidget I set grid layout to that Window I make a function called handleHeroChange(int index) in public slot inside that window I add a Qcombobox to call that function handleHeroChange(int index). Qtcreator keep telling: QObject::connect: No such slot QWidget::handleHeroChange(int) in ../Testing/Window.cpp:92 Why did i do wrong? THE CODE: Window::Window(QWidget *parent) : QWidget(parent) { QGridLayout *grid = new QGridLayout(this); QComboBox *comboHeroClass = new QComboBox(); comboHeroClass->addItem("Witcher"); comboHeroClass->addItem("Maurander"); comboHeroClass->setCurrentIndex(1); grid->addWidget(comboHeroClass, 2,3,1,1); QComboBox::connect(comboHeroClass, SIGNAL(currentIndexChanged(int)),this, SLOT(handleHeroChange(int))); } void Window::handleHeroChange(int index){ QPixmap myImage; if(index == 0){ }else if(index == 1){ } }

    Read the article

  • Postfix evaluation in C

    - by Andrewziac
    I’m taking a course in C and we have to make a program for the classic Postfix evaluation problem. Now, I’ve already completed this problem in java, so I know that we have to use a stack to push the numbers into, then pop them when we get an operator, I think I’m fine with all of that stuff. The problem I have been having is scanning the postfix expression in C. In java it was easier because you could use charAt and you could use the parseInt command. However, I’m not aware of any similar commands in C. So could anyone explain a method to read each value from a string in the form: 4 9 * 0 - = Where the equals is the signal of the end of the input. Any help would be greatly appreciated and thank you in advance :)

    Read the article

  • what's the job of std::unique_lock when used with std::conditional_variable::wait()

    - by Mike
    I'm quite confused with the need of a std::unique_lock when wait a std::conditional_variable. So I look into the library code in VS 2013 and get more confused. This is how std::conditional_variable::wait() implemented: void wait(unique_lock<mutex>& _Lck) { // wait for signal _Cnd_waitX(&_Cnd, &_Lck.mutex()->_Mtx); } Is this some kind of joke? Wrap a mutex in a unique_lock and do nothing but get it back latter? Why not just use mutex in the parameter list?

    Read the article

  • How to automatically reflect the new Updates (on Database) to User Pages

    - by user296436
    I am trying to create a new Notice Alert using PHP and Javascript. Suppose that a 100 users are currently logged into to the Online Notice Board Application and any One user posts a new notice. I want an immediate alert signal on all the users screen. I know, that the simplest way of doing it is to constantly Ping the server but I don't want to do it as it will slow down the server. Moreover, I am on a shared host. So I don't have access to any Socket Port. That means, I cannot establish any direct Socket Communication Channel from the Server to the User Machine. Can any one suggest me some other solution to this kind of problems???

    Read the article

  • Qt QMainWindow at Close

    - by Cenoc
    Hey, this may seem like a very simple question, but I want to dump some data whenever the QMainWindow closes, so I used the following piece of code: QObject::connect(MainWindow.centralwidget, SIGNAL(destroyed()), this, SLOT(close())); but this doesnt seem to make it call close(). Am I doing this wrong? Isnt the centralwidget suppose to be destroyed? Or perhaps the application closes before close() can be called? Any other ways of doing it then? Thanks in advance!

    Read the article

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