Search Results

Search found 1358 results on 55 pages for 'concurrency violation'.

Page 9/55 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Access violation of member of pointer object

    - by Martin Lauridsen
    So I am coding this client/server program. This code is from the client side. The client has an instance of an object mpqs_sieve *instance_; The reason I make it as a pointer is, that mpqs_sieve only has a constructor that takes 3 arguments, and I want to instantiate it at a later point in time. The client first gets some data from the server, and uses this to instantiate instance_. After this, it will request some more data, and upon receiving this (these are three coeffecients for a quadratic polynomial), it should set these in the instance_ object. However upon calling a member function of instance_, I get an access violation on one of the members of instance_ within that function call. I posted my code here: on pastebin, and I get the error on line 100. The call comes from line 71, and before that line 21. Any ideas to solve this? Thanks!

    Read the article

  • C++ Access violation when calling dll function

    - by Manjoor
    I have a function definition in my VC++ Win32 DLL DEMO2_API void ProcessData(char* i_buff, unsigned short i_len, char* o_buf, unsigned *o_len, unsigned short *errorCode) { __describe (i_buff,&i_len,o_buf,o_len,errorCode); } This dll function is called by a c# application. When called, it generate access violation exception. After reasearching i found, the cause for my problem. http://social.msdn.microsoft.com/Forums/en-US/csharplanguage/thread/6e843243-baf4-4eb1-8a20-c691ad47762c But could not understand what exactly they are doinng in example code. Can someone explain it so me? And what would be P/Invoke signature in c# after externally allocating memory?

    Read the article

  • HSQLDB Constraint Violation & SQL Query Log for an HSQLDB in-memory setup

    - by shipmaster
    We have a setup where we are using an embedded HSQLDB for backing Hibernate/JPA unit tests in java, and we are using the in-memory database mode since we simply want the database thrown away after the test run. My problem is that one of the tests is failing due to a constraint violation and HSQLDB lists the column as SYS_CT_286, and the query that appears in the log is the prepared statement where I cant see what the actual parameter values are (they are replaced by '?'). My questions are: 1- Is there a way in which I can see the actual SQL being executed? (like the mysql query log for example?). 2- What exactly is SYS_CT_286? it is not one of my columns, is it a generated column? is there something obvious that may be wrong with it? Thanks.

    Read the article

  • Access Violation Exception only appearing when running C# app without debugger attached

    - by Jon
    I have an application that works fine in Visual Studios 2008, and I am trying to get it into VS 2010 in order to use .NET 4, and I have a really weird problem. When I run the code from either Release mode or Debug mode with the debugger attached (F5), I have no problems running the program. However, when I run the program from either Release or Debug without the debugger attached (Shift+F5), I get an Access Violation Exception when I attempt to run some code in a dll from GDCM. I've created the dlls by using CMake and Swig and following the instructions here adjusting the instructions where necessary to build for VS 2010 and .NET 4. Does any one have any ideas why this is happening and how I can fix it?

    Read the article

  • Are concurrency issues possible when using the WCF Service Behavoir attribute set to ConcurrencyMode

    - by Brandon Linton
    We have a WCF service that makes a good deal of transactional NHibernate calls. Occasionally we were seeing SQL timeouts, even though the calls were updating different rows and the tables were set to row level locking. After digging into the logs, it looks like different threads were entering the same point in the code (our transaction using block), and an update was hanging on commit. It didn't make sense, though, because we believed that the following service class attribute was forcing a unique execution thread per service call: [ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Multiple, InstanceContextMode = InstanceContextMode.PerCall)] We recently changed the concurrency mode to ConcurrencyMode.Single and haven't yet run into any issues, but the bug was very difficult to reproduce (if anyone has any thoughts on flushing a bug like that out, let me know!). Anyway, that all brings me to my question: shouldn't an InstanceContextMode of PerCall enforce thread-safety within the service, even if the ConcurrencyMode is set to multiple? How would it be possible for two calls to be serviced by the same service instance? Thanks!

    Read the article

  • How can I find file system concurrency issues ?

    - by krosenvold
    I have an application running on Linux, and I find myself wanting windows (!). The problem is that every 1000 times or so I run into concurrency problems that are consistent with concurrent reading/writing of files. I am fairly sure that this behavior would be prohibited by file locking under Windows, but I don't have any sufficiently fast windows box to check. There is simply too much file access (too much data) to expect strace to work reliably - the sheer volume of output is likely to change the problem too. It also happens on different files every time. Ideally I would like to change/reconfigure the linux file system to be more restrictive (as in fail-fast) wrt concurrent access. Are there any tools/settings I can use to achieve this ?

    Read the article

  • Why does it NOT give a segmentation violation?

    - by user198729
    The code below is said to give a segmentation violation: #include <stdio.h> #include <string.h> void function(char *str) { char buffer[16]; strcpy(buffer,str); } int main() { char large_string[256]; int i; for( i = 0; i < 255; i++) large_string[i] = 'A'; function(large_string); return 1; } It's compiled and run like this: gcc -Wall -Wextra hw.cpp && a.exe But there is nothing output. NOTE The above code indeed overwrites the ret address and so on if you really understand what's going underneath.

    Read the article

  • "SQLSTATE[23000]: Integrity constraint violation" in Doctrine

    - by rags
    Hi, i do get an Integrity constraint violation for Doctrine though i really can't see why. Schema.yml User: columns: id: type: integer primary: true autoincrement: true username: type: varchar(64) notnull: true email: type: varchar(128) notnull: true password: type: varchar(128) notnull: true relations: Websites: class: Website local: id foreign: owner type: many foreignType: one onDelete: CASCADE Website: columns: id: type: integer primary: true autoincrement: true active: type: bool owner: type: integer notnull: true plz: type: integer notnull: true longitude: type: double(10,6) notnull: true latitude: type: double(10,6) notnull: true relations: Owner: type: one foreignType: many class: User local: owner foreign: id And here's my data Fixtures (data.yml) Model_User: User_1: username: as email: as****.com password: ***** Model_Website: Website_1: active: true plz: 34222 latitude: 13.12 longitude: 3.56 Owner: User_1

    Read the article

  • Delphi - Sharing violation opening text file

    - by Simes
    I'm trying to open a text file for reading in a Delphi 7 app, but am getting I/O error 32 (sharing violation) because another application already has the file open. I've tried setting FileMode to "fmOpenRead or fmShareDenyNone" but now realise this doesn't apply to text files anyway. Is there a way of reading text files that are open by another application? var f: TextFile; begin FileMode := fmOpenRead or fmShareDenyNone; // FileMode IS NOT APPLICABLE TO TEXT FILES!! AssignFile(f, FileName); Reset(f);

    Read the article

  • Security sandbox violation when connecting to Socket from flex

    - by KensoDev
    Hi, I am using a Socket (not xmlSocket) connection between flex applications and the server pushing messages. Now, when I connect from the local machine to the server everything is working file and running, connection is succesful and I get data back and forth. When I upload the application (flex) to the server and run it from there, I get a security sandBox violation message. Note: 1. I do have a crossdomain file with * wildcard both on port and on domain. 2. I created a Securiy.allowDomain("*") as well. Another thing. I also created another listener on that same server, listening to connections for port 843 (default) and this service just waited for a connection send policy file to the client and that's it. That did not solve the problem as well... That's next? What should I do to fix the problem? Appreciate your help. Avi

    Read the article

  • Drupal, custom formatter module: PHP has encountered an Access Violation

    - by Patrick
    hi, I'm having a problem with custom formatters in Drupal. I'm using a custom formatter on a CCK file file with the following content: but when I select it to use I get an internal server error: PHP has encountered an Access Violation at 16B357F9 Please note: 1) It sometimes worked, but the page becomes soon unavailable after a while 2) I've tried to replace the custom formatter content with a simple Hello and I get the error anyway, so it should not be related to the content. 3) I'm using another custom formatter with another CCK field and it doesn't give any error. Thanks

    Read the article

  • Loading external Swf - sandbox violation

    - by Yamen Al-Haj
    Hello Mates , I need a help ... an urgent one !!! i tried so hard to figured it out .. but i couldn't .. so I appreciate your help so much .. I'm developing an Air App using flash ... the app loads an external SWF file dynamically through an xml ... the SWF file has a movieclip that has a listener (ON click ) function mouseDownHandler(event:MouseEvent):void { navigateToURL(new URLRequest(clickURL)); } everything is working fine until i click on this movieclip ... it displays the below message SecurityError: Error #2121: Security sandbox violation: navigateToURL: http://www.mydomain.com/maskot/avatar.swf cannot access YAHOO.COM for example. This may be worked around by calling Security.allowDomain. any help !!! because i really have a deadline ! Thank you so much !

    Read the article

  • Memory error, access violation.

    - by Ordo
    Hello! I'm learning C on my own and as a exercise i have written a program but it does not work. The program is splitted into 3 parts. A header file, a main file for executing the program a file to define the functions. I'm not using all the functions yet but that shouldn't be the problem. Here is my header file, nothing special in it. #ifndef EMPLOYEE_H #define EMPLOYEE_H struct Employee { char first[21]; char last[21]; char title[21]; int salary; }; struct Employee* createEmployee(char*, char*, char*, int); // Creates a struct Employee object on the heap. char* getfirstname (struct Employee*); char* getlastname (struct Employee*); char* gettitle (struct Employee*); int getsalary (struct Employee*); void setfirstname (struct Employee*, char*); void setlastname (struct Employee*, char*); void settitle (struct Employee*, char*); void setsalary (struct Employee*, int); void printEmployee(struct Employee*); #endif In this file i define the functions and how they work: #include "7.1.h" #include <stdio.h> #include <stdlib.h> #include <string.h> struct Employee* createEmployee(char* first, char* last, char* title, int salary) // Creates a struct Employee object on the heap. { struct Employee* p = (struct Employee*) malloc(sizeof(struct Employee)); if (p != NULL) { strcpy(p->first, first); strcpy(p->last, last); strcpy(p->title, title); p->salary, salary; } return p; } char* getfirstname (struct Employee* p) { if (p != NULL) return p ? p->first : ""; } char* getlastname (struct Employee* p) { if (p != NULL) return p ? p->last : ""; } char* gettitle (struct Employee* p) { if (p != NULL) return p ? p->title : ""; } int getsalary (struct Employee* p) { if (p != NULL) return p ? p->salary : 0; } void setfirstname (struct Employee* p, char* first) { if (p != NULL) strcpy(p->first, first); } void setlastname (struct Employee* p, char* last) { if (p != NULL) strcpy(p->last, last); } void settitle (struct Employee* p, char* title) { if (p != NULL) strcpy(p->title, title); } void setsalary (struct Employee* p, char* salary) { if (p != NULL) p->salary, salary; } void printEmployee(struct Employee* p) { if (p != NULL) { printf("%s, %s, %s, %d", p->first, p->last, p->salary, p->salary ); } } And the last file is used to executed the program/functions: #include "7.1.h" #include <stdio.h> #include <stdlib.h> int main () { char decision; struct Employee emp; struct Employee* emps[3]; for ( int i = 0; i < 1; i ++) { printf("Please type in the emplooyes data.\nFirstname:"); scanf("%s", emp.first); printf("Lastname:"); scanf("%s", emp.last); printf("Title:"); scanf("%s", emp.title); printf("Salary:"); scanf("%d", &emp.salary); emps[i] = createEmployee(emp.first, emp.last, emp.title, emp.salary); } printf("Do you want to print out your information? (Y/N):"); scanf("%c", &decision); if (decision == 'y' || decision == 'Y') { printEmployee(emps[1]); } } I don't know what the problem is. I 'm always getting the following error message after typing in first, last, title and salary for the first time. The error is written in german. It means: Unhandled exception at 0x102de42e (msvcr100d.dll) in 7.1.exe: 0xC0000005: Access violation when writing to 0xCCCCCCCC position. I could fix the first problem with the hints given below. Now when i want to print out the employee data using the function:printEmployee(emps[1]);, I get the same kind of error with access violation.

    Read the article

  • Access violation C++ (Deleting items in a vector)

    - by Gio Borje
    I'm trying to remove non-matching results from a memory scanner I'm writing in C++ as practice. When the memory is initially scanned, all results are stored into the _results vector. Later, the _results are scanned again and should erase items that no longer match. The error: Unhandled exception at 0x004016f4 in .exe: 0xC0000005: Access violation reading location 0x0090c000. // Receives data DWORD buffer; for (vector<memblock>::iterator it = MemoryScanner::_results.begin(); it != MemoryScanner::_results.end(); ++it) { // Reads data from an area of memory into buffer ReadProcessMemory(MemoryScanner::_hProc, (LPVOID)(*it).address, &buffer, sizeof(buffer), NULL); if (value != buffer) { MemoryScanner::_results.erase(it); // where the program breaks } }

    Read the article

  • memory access violation error - 0xC0000005

    - by nobody
    I got memory access violation error sometimes.... but I don't know where the error comes from... So I reviewed the code and I found some strange code... delete m_p1; A *a = new A(); a->b = *c; m_p1 = a; --> strange code. I think it's a little strange line.... can i use the m_p1 after delete the m_p1? It can make some memory access error??

    Read the article

  • seg violation using pycapsule_new

    - by user1733051
    I am trying some simple c API, where I am using PyCapsule_New to encapsulate a pointer. I am running into segment violation, can some body help me. mystruct *func1(int streamno, char mode,unsigned int options) { char * s; s=malloc(100); return s; } PyObject *Wrapper_func1(PyObject *self, PyObject *args) { int streamno; char mode; unsigned int options; mystruct* result; if (!PyArg_ParseTuple(args,"icI",&streamno,&mode,&options)) return NULL; result = func1(streamno,mode,options); return PyCapsule_New( result,NULL,NULL); }

    Read the article

  • Concurrency handling

    - by Lijo
    Hi, Suppose, I am about to start a project using ASP.NET and SQL Server 2005. I have to design the concurrency requirement for this application. I am planning to add a TimeStamp column in each table. While updating the tables I will check that the TimeStamp column is same, as it was selected. Will this approach be suffice? Or is there any shortcomings for this approach under any circumstances? Please advice. Thanks Lijo

    Read the article

  • Help needed for SOAPUI

    - by Kangkan
    I am trying to test my webservice using SOAPUI (the free version). For testing concurrency, I wished to fire concurrent threads from SOAPUI onto the service. But with the options, the thred count increases gradually (even in the burst mode). The machine where SOAPUI is installed is a WinXP machine. Can I actually do the concurrency testing? If so how? Please guide me.

    Read the article

  • What are all the concurrent things [data structure, algorithm, locking mechanism] missing in .Net 3.

    - by user49767
    First time I am bit disappointed in StackOverflow cause my http://stackoverflow.com/questions/2571727/c-concurrency-vs-java-concurrency-which-is-neatly-designed-which-is-better question was closed. My intension was just trying to gather knowledge from programming guru's who worked in both the programming technologies. Rather closing this question, please help me by discussing what is good, bad, and ugly in multi-threading part in both the platforms. It is also welcome, if someone would like to compare with .Net 4.0 with JDK 6 (or JDK 7)

    Read the article

  • deleting HBITMAP causes an access violation at runtime.

    - by Oliver
    Hi, I have the following code to take a screenshot of a window, and get the colour of a specific pixel in it: void ProcessScreenshot(HWND hwnd){ HDC WinDC; HDC CopyDC; HBITMAP hBitmap; RECT rt; GetClientRect (hwnd, &rt); WinDC = GetDC (hwnd); CopyDC = CreateCompatibleDC (WinDC); //Create a bitmap compatible with the DC hBitmap = CreateCompatibleBitmap (WinDC, rt.right - rt.left, //width rt.bottom - rt.top);//height SelectObject (CopyDC, hBitmap); BitBlt (CopyDC, //destination 0,0, rt.right - rt.left, //width rt.bottom - rt.top, //height WinDC, //source 0, 0, SRCCOPY); COLORREF col = ::GetPixel(CopyDC,145,293); // Do some stuff with the pixel colour.... delete hBitmap; ReleaseDC(hwnd, WinDC); ReleaseDC(hwnd, CopyDC); } the line 'delete hBitmap;' causes a runtime error: an access violation. I guess I can't just delete it like that? Because bitmaps take up a lot of space, if I don't get rid of it I will end up with a huge memory leak. My question is: Does releasing the DC the HBITMAP is from deal with this, or does it stick around even after I have released the DC? If the later is the case, how do I correctly get rid of the HBITMAP?

    Read the article

  • PDCurses TUI C++ Win32 console app - Access violation reading location

    - by Bach
    I have downloaded pdcurses source and was able to successfully include curses.h in my project, linked the pre-compiled library and all good. After few hours of trying out the library, I saw the tuidemo.c in the demos folder, compiled it into an executable and brilliant! exactly what I needed for my project. Now the problem is that it's a C code, and I am working on a C++ project in VS c++ 2008. The files I need are tui.c and tui.h How can I include that C file in my C++ code? I saw few suggestions here but the compiler was not too happy with 100's of warnings and errors. How can I go on including/using that TUI pdcurses includes!? Thanks EDIT: I added extern "C" statement, so my test looks like this now, but I'm getting some other type of error #include <stdio.h> #include <stdlib.h> using namespace std; extern "C" { #include <tui.h> } void sub0(void) { //do nothing } void sub1(void) { //do nothing } int main (int argc, char * const argv[]) { menu MainMenu[] = { { "Asub", sub0, "Go inside first submenu" }, { "Bsub", sub1, "Go inside second submenu" }, { "", (FUNC)0, "" } /* always add this as the last item! */ }; startmenu(MainMenu, "TUI - 'textual user interface' demonstration program"); return 0; } Although it is compiling successfully, it is throwing an Error at runtime, which suggests a bad pointer: 0xC0000005: Access violation reading location 0x021c52f9 at line startmenu(MainMenu, "TUI - 'textual user interface' demonstration program"); Not sure where to go from here. thanks again.

    Read the article

  • read access violation error

    - by user293569
    class Node{ private: string name; Node** adjacent; int adjNum; public: Node(); Node(string, int adj_num); Node(const Node &); bool addAdjacent(const Node &); Node** getAdjacents(); string getName(); ~Node(); }; bool Node::addAdjacent(const Node &anode){ Node** temp; temp= new Node*[adjNum+1]; for(int i=0;i<adjNum+1;i++) temp[i]=adjacent[i]; temp[adjNum]=const_cast<Node *>(&anode); delete[] adjacent; adjacent=new Node*[adjNum+1]; adjacent=temp; delete[] temp; adjNum++; return true; } int main() { Node node1("A",0); Node node2("B",0); node1.getName(); node1.addAdjacent(node2); system("PAUSE"); return 0; } when the program comes to this part: for(int i=0;i<adjNum+1;i++) temp[i]=adjacent[i]; it says Access violation reading location 0xcccccccc. The class must allocate the memory fore adjacent, but I think it didn't how can I solve this problem?

    Read the article

  • Rails: constraint violation on create but not on update

    - by justinbach
    Note: This is a "railsier" (and more succinct) version of this question, which was getting a little long. I'm getting Rails behavior on a production server that I can't replicate on the development server. The codebases are identical save for credentials and caching settings, and both are powered by Oracle 10g databases with identical schema (but different data). My Rails application contains a user model, which has_one registration; registration in turn has_and_belongs_to_many company_ownerships through a registration_ownerships table. Upon registering, users fill out data pertinent to all three models, including a series of checkboxes indicating what registration_ownerships might apply to their account. On the dev server, the registration process is seamless, no matter what data is entered. On production, however, if users check off any of the company ownership fields before submitting their registration, Oracle complains about a constraint violation on the primary key of the company_ownerships table (which is a two-field key based on company_ownership_id and registration_id) and users get the standard Rails 500 error screen. In every case, I've verified that no conflicting record on these two fields exists in the production database, so I don't know why the constraint is getting violated. To further confuse things, if a user registers without listing any ownerships and later goes back and modifies their account to reflect ownership data (which is done through the same interface), the application happily complies with their request and Oracle is well-behaved (this is both on production and dev). I've spent the past couple days trying to figure out what might be causing this problem and am reaching the end of my wits. Any advice would be greatly appreciated!

    Read the article

  • Threads, Sockets, and Designing Low-Latency, High Concurrency Servers

    - by lazyconfabulator
    I've been thinking a lot lately about low-latency, high concurrency servers. Specifically, http servers. http servers (fast ones, anyway) can serve thousands of users simultaneously, with very little latency. So how do they do it? As near as I can tell, they all use events. Cherokee and Lighttpd use libevent. Nginx uses it's own event library performing much the same function of libevent, that is, picking a platform optimal strategy for polling events (like kqueue on *bsd, epoll on linux, /dev/poll on Solaris, etc). They all also seem to employ a strategy of multiprocess or multithread once the connection is made - using worker threads to handle the more cpu intensive tasks while another thread continues to listen and handle connections (via events). This is the extent of my understanding and ability to grok the thousand line sources of these applications. What I really want are finer details about how this all works. In examples of using events I've seen (and written) the events are handling both input and output. To this end, do the workers employ some sort of input/output queue to the event handling thread? Or are these worker threads handling their own input and output? I imagine a fixed amount of worker threads are spawned, and connections are lined up and served on demand, but how does the event thread feed these connections to the workers? I've read about FIFO queues and circular buffers, but I've yet to see any implementations to work from. Are there any? Do any use compare-and-swap instructions to avoid locking or is locking less detrimental to event polling than I think? Or have I misread the design entirely? Ultimately, I'd like to take enough away to improve some of my own event-driven network services. Bonus points to anyone providing solid implementation details (especially for stuff like low-latency queues) in C, as that's the language my network services are written in.

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >