Search Results

Search found 13191 results on 528 pages for 'unhandled exception'.

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

  • Method may fail to close stream on exception

    - by 01
    I get the critical error with finbugs The method creates an IO stream object, does not assign it to any fields, pass it to other methods, or return it, and does not appear to close it on all possible exception paths out of the method. This may result in a file descriptor leak. It is generally a good idea to use a finally block to ensure that streams are closed. try { ... stdError = new BufferedReader(new InputStreamReader(p.getErrorStream())); ... } catch (IOException e) { throw new RuntimeException(e); } finally { try { if (stdInput != null) { stdInput.close(); } if (stdError != null) { stdError.close(); } } catch (IOException e) { throw new RuntimeException(e); } } do i need to close also InputStreamReader or p.getErrorStream(it returns InputStream) ??

    Read the article

  • Firefox throwing a exception with HTML Canvas putImageData

    - by mr.doob
    So I was working on this little javascript experiment and I needed a widget to track the FPS of it. I ported a widget I've been using with Actionscript 3 to Javascript and it seems to be working fine with Chrome/Safari but on Firefox is throwing an exception. This is the experiment: Depth of Field This is the error: [Exception... "An invalid or illegal string was specified" code: "12" nsresult: "0x8053000c (NS_ERROR_DOM_SYNTAX_ERR)" location: "http://mrdoob.com/projects/chromeexperiments/depth_of_field__debug/js/net/hires/debug/Stats.js Line: 105"] The line that is complaning about is this one: graph.putImageData(graphData, 1, 0, 0, 0, 69, 50); Which is a crappy code to "scroll" the bitmap pixels. The idea is that I only draw a few pixels on the left of the bitmap and then on the next frame I copy the whole bitmap and paste it on pixel to the right. This error usually is thrown because you're pasting a bitmap bigger than the source and it's going off the limits, but in theory that shouldn't be the case as I'm defining 69 as the width of the rectangle to paste (being the bitmap 70px wide). And this is full code: var Stats = { baseFps: null, timer: null, timerStart: null, timerLast: null, fps: null, ms: null, container: null, fpsText: null, msText: null, memText: null, memMaxText: null, graph: null, graphData: null, init: function(userfps) { baseFps = userfps; timer = 0; timerStart = new Date() - 0; timerLast = 0; fps = 0; ms = 0; container = document.createElement("div"); container.style.fontFamily = 'Arial'; container.style.fontSize = '10px'; container.style.backgroundColor = '#000033'; container.style.width = '70px'; container.style.paddingTop = '2px'; fpsText = document.createElement("div"); fpsText.style.color = '#ffff00'; fpsText.style.marginLeft = '3px'; fpsText.style.marginBottom = '-3px'; fpsText.innerHTML = "FPS:"; container.appendChild(fpsText); msText = document.createElement("div"); msText.style.color = '#00ff00'; msText.style.marginLeft = '3px'; msText.style.marginBottom = '-3px'; msText.innerHTML = "MS:"; container.appendChild(msText); memText = document.createElement("div"); memText.style.color = '#00ffff'; memText.style.marginLeft = '3px'; memText.style.marginBottom = '-3px'; memText.innerHTML = "MEM:"; container.appendChild(memText); memMaxText = document.createElement("div"); memMaxText.style.color = '#ff0070'; memMaxText.style.marginLeft = '3px'; memMaxText.style.marginBottom = '3px'; memMaxText.innerHTML = "MAX:"; container.appendChild(memMaxText); var canvas = document.createElement("canvas"); canvas.width = 70; canvas.height = 50; container.appendChild(canvas); graph = canvas.getContext("2d"); graph.fillStyle = '#000033'; graph.fillRect(0, 0, canvas.width, canvas.height ); graphData = graph.getImageData(0, 0, canvas.width, canvas.height); setInterval(this.update, 1000/baseFps); return container; }, update: function() { timer = new Date() - timerStart; if ((timer - 1000) > timerLast) { fpsText.innerHTML = "FPS: " + fps + " / " + baseFps; timerLast = timer; graph.putImageData(graphData, 1, 0, 0, 0, 69, 50); graph.fillRect(0,0,1,50); graphData = graph.getImageData(0, 0, 70, 50); var index = ( Math.floor(Math.min(50, (fps / baseFps) * 50)) * 280 /* 70 * 4 */ ); graphData.data[index] = graphData.data[index + 1] = 256; index = ( Math.floor(Math.min(50, 50 - (timer - ms) * .5)) * 280 /* 70 * 4 */ ); graphData.data[index + 1] = 256; graph.putImageData (graphData, 0, 0); fps = 0; } ++fps; msText.innerHTML = "MS: " + (timer - ms); ms = timer; } } Any ideas? Thanks in advance.

    Read the article

  • L2E delete exception

    - by 5YrsLaterDBA
    I have following code to delete an user from database: try { var user = from u in db.Users where u.Username == username select u; if (user.Count() > 0) { db.DeleteObject(user.First()); db.SaveChanges(); } } but I got exception like this: at System.Data.Mapping.Update.Internal.UpdateTranslator.Update(IEntityStateManager stateManager, IEntityAdapter adapter) at System.Data.EntityClient.EntityAdapter.Update(IEntityStateManager entityCache) at System.Data.Objects.ObjectContext.SaveChanges(Boolean acceptChangesDuringSave) at System.Data.Objects.ObjectContext.SaveChanges() at MyCompany.SystemSoftware.DQMgr.User.DeleteUser(String username) in C:\workspace\SystemSoftware\SystemSoftware\src\dqm\User.cs:line 479 The Users table is referenced by few other tables. It is probably caused by the foreign key constraint?

    Read the article

  • SQLITE problem in rowid

    - by Saurabh
    I am using SQLite C# library and as per my requirement, before going to add I am retreving the rowid of that table. It is working fine but hetting error when table is empty. Once we add any data(a row) then it’s working fine . mDbCon = GetConnection(); SQLiteCommand cmd = mDbCon.CreateCommand(); cmd.CommandText = " SELECT MAX(rowid) FROM " + “MYTABLE”; cmd.CommandType = CommandType.Text; mDbCon.Open(); SQLiteDataReader sqReader = cmd.ExecuteReader(); while (sqReader.Read()) { if ( sqReader.IsDBNull(0) ) { max = (Int32)sqReader.GetInt32(0); } } mDbCon.Close(); It’s throwing exception when table “MYTABLE” don’t have any data.

    Read the article

  • JBossCacheService: exception occurred in cache put error occurred after changing cache mode to REPL_

    - by logoin
    Hi, we have a horizontal cluster set up on JBoss 4.2. The session replication worked fine until we changed cache mode from REPL_ASYNC to REPL_SYNC to fix a issue. We started to see warning for some session failovers: [org.jboss.web.tomcat.service.session.InstantSnapshotManager.ROOT] Failed to replicate session java.lang.RuntimeException bc [local7.warning] JBossCacheService: exception occurred in cache put ... org.jboss.web.tomcat.service.session.JBossCacheWrapper.put(JBossCacheWrapper.java:147) org.jboss.web.tomcat.service.session.JBossCacheService.putSession(JBossCacheService.java:315) org.jboss.web.tomcat.service.session.JBossCacheClusteredSession.processSessionRepl(JBossCacheClusteredSession.java:125) Does anyone have any idea why this happen and how to fix it if we want to still use REPL_SYNC? Any help is appreciated. Thanks!

    Read the article

  • Objective-c string appending causes exception

    - by Dave C
    Hello Everyone, The following code is causing me some problems. The third line causes a program crash... it doesn't happen the first time I step through but somehow later on in the program. If I comment out that third line, the program runs smoothly. NSString *myRequestString = @"text"; int i = 1; myRequestString = [myRequestString stringByAppendingString:[NSString stringWithFormat: @"t=%d", i]]; That code causes this exception: * -[CFString release]: message sent to deallocated instance 0xb4c43fe0 On a side note, can anyone tell me how to concatenate strings in objective-c like any other normal language... I can't believe that there is no concatenation operator. Any and all help is greatly appreciated.

    Read the article

  • Twitter integration with C#.NET applications - NULL Pointer Exception

    - by Kanini
    Trying to integrate Twitter with ASP.NET application (Code in C#). This is the code I have written for the first sign in to Twitter. When I debug the application, I do get the token response and the response redirect happens appropriately. However, if I host it on IIS and access it, I get a Null Pointer Exception. Why is that? //Retrieve consumerKey and consumerSecret var v_consumerKey = ConfigurationManager.AppSettings["consumerKey"]; var v_consumerSecret = ConfigurationManager.AppSettings["consumerSecret"]; //Check if user is a valid user if (Request.QueryString["oauth_token"] == null) { OAuthTokenResponse t_requestToken = OAuthUtility.GetRequestToken(v_consumerKey, v_consumerSecret); Response.Redirect("http://twitter.com/oauth/authorize?oauth_token=" + t_requestToken.Token); } else { string s_oAuthToken = Request.QueryString["oauth_token"].ToString(); var v_accessToken = OAuthUtility.GetAccessToken(v_consumerKey,v_consumerSecret,s_oAuthToken); }

    Read the article

  • Catching an exception when trying to launch a URL service from within Safari on an iPhone

    - by Ariel
    Hey guys, I was wondering if anyone knows - if I have an iPhone app that is registered with a URL service (e.g. alocola://), which means another app can invoke it by calling its URL - is there any way to embed this URL in an HTML page, and catch the exception if the app is not installed on the user's iPhone? Or in other words / more details: I would like to write an app that conforms to some URL invocation (like alocola:// is doing), but would like this app to be launched from a web page read by mobile Safari. However, if the app is not installed on the user's iphone, I would like to be able to display a note saying "you must have the alocola app installed on your iPhone, please download it from the app store by clicking here". Is there a way (perhaps using javascript) to have Safari indicate that the URL cannot be invoked, and catch this in order to display an intelligent message? Thanks :-) Ariel

    Read the article

  • Chrome error with NO_MODIFICATION_ALLOWED_ERR DOM Exception 7

    - by HP
    I have below code to insert a style into DOM (there is a use case for injecting style into DOM so please don't ask why or say to load the css in .css file). <script type="text/javascript"> window.onload = function() { var bmstyle = document.createElement('style'); bmstyle.setAttribute('type', 'text/css'); var styleStr = "#test-div {background:#FFF;border:2px solid #315300;"; bmstyle.innerHTML = styleStr; document.body.appendChild(bmstyle); } </script> If I run in Firefox, it works fine. But I got this error in Google Chrome: Line bmstyle.innerHTML = styleStr; Uncaught Error: NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7 Does anyone have a fix? Thanks

    Read the article

  • Dynamicdata Validation Exception Message Caught in JavaScript, not DynamicValidator

    - by Perplexed
    I have a page here with a few list views on it that are all bound to Linq data sources and they seem to be working just fine. I want to add validation such that when a checkbox (IsVoid on the object) is checked, comments must be entered (VoidedComments on the object). Here's the bound object's OnValidate method: partial void OnValidate(ChangeAction action) { if (action == ChangeAction.Update) { if (_IsVoid) { string comments = this.VoidedComments; if (string.IsNullOrEmpty(this._VoidedComments)) { throw new ValidationException("Voided Comments are Required to Void an Error"); } } } } Despite there being a dynamic validator on the page referencing the same ValidationGroup as the dynamic control, when the exception fires, it's caught in JavaScript and the debugger wants to break in. The message is never delivered to the UI as expected. Any thoughts as to What's going on?

    Read the article

  • GoDaddy and ASP.NET Security exception thrown

    - by stighy
    Hi guys, i'm having a problem when i try to host my website on godaddy. This is what i receive from website: Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. To discover the problem, i've tried changin my web.config, adding "trust level='Medium'". But i get an error when i try to access godaddy mysql server with the mysql connector. Any ideas ? Thanks in advance !

    Read the article

  • SelectedValue which is invalid because it does not exist in the list of items

    - by Bob Jones
    I encounter this problem repeatedly, and haven't a clue what is causing it. I get an exception in the DataBind: "SelectedValue which is invalid because it does not exist in the list of items". Here are some important pieces of information: 1) I reload listOrgs periodically when the underlying data has changed. 2) The Organization.DTListAll call returns about 500 Int, String pairs. 3) There are no duplicate or null values in the returned data 4) After the first two lines below, listOrgs.Items.Count is 0, and the Selected Value is 0 5) The selected value when the DataBind operation executes is a value that is not in the set of ID values returned 6) All of the stuff I have found on line so far hasn't helped. 7) I am stumped! listOrgs.Items.Clear(); listOrgs.SelectedValue = "0"; listOrgs.DataSource = new Organization().DTListAll(SiteID); listOrgs.DataTextField = "OrganizationName"; listOrgs.DataValueField = "OrganizationID"; listOrgs.DataBind(); Bob Jones

    Read the article

  • in which namespace / package to put exceptions

    - by Fabiano
    Hi What is the common or best practice to structure the location of your exception classes? Let's say you have the packages/namespaces myproject.person (models and DAOs for persons) and myproject.order (models and DAOs for orders) and the exceptions PersonException and OrderException. Should I put the exceptions in their corresponding packages or in a separate package for exceptions (e.g. myproject.exceptions)? The first approach seems more reasonable (because it's sorted by functionality). But there the question arises where you should put exceptions that are related to both? e.g. a ConstraintViolationException Thanks

    Read the article

  • Null Reference Exception on MVVM pattern

    - by Mohit Deshpande
    System.NullReferenceException Object reference not set to an instance of an object. at Microsoft.Windows.Design.DocumentModel.Trees.MarkupDocumentTreeManager.<FindMarkupNodePath>d__0.MoveNext() at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable1 source) at MS.Internal.Services.DocumentInformationServiceImpl.get_Root() at MS.Internal.Designer.VSDesigner.Load() at MS.Internal.Designer.VSIsolatedDesigner.VSIsolatedView.Load() at MS.Internal.Designer.VSIsolatedDesigner.VSIsolatedDesignerFactory.Load(IsolatedView view) at MS.Internal.Host.Isolation.IsolatedDesigner.BootstrapProxy.LoadDesigner(IsolatedDesignerFactory factory, IsolatedView view) at MS.Internal.Host.Isolation.IsolatedDesigner.BootstrapProxy.LoadDesigner(IsolatedDesignerFactory factory, IsolatedView view) at MS.Internal.Host.Isolation.IsolatedDesigner.Load() at MS.Internal.Designer.DesignerPane.LoadDesignerView() I keep getting this exception and then intellisense stops working in a XAML text editor. Any ideas why?

    Read the article

  • Query Cache Issues - releasing cache locks?

    - by Corey Coogan
    I have enabled query caching to use the NHibernate.Caches.Prevalence.PrevalenceCacheProvider provider. This is running on IIS 7, WCF service. I have limited rights to what I can do, but I'm getting an exception about releasing cache locks. I've created the following 2 directories in the system32/inetsrv directory and given full control to the account IIS is using. NHibernate.Cache.StandardQueryCache Some other cache dir I can think of right now This doesn't happen in my local environment so I'm thinking this is somehow related to caching. Do I need to give the IIS account full control to the inetsrv dir as well?

    Read the article

  • Try-Catch-Throw in the same Java class

    - by Carlos
    Is it possible to catch a method in the current class the try-catch block is running on? for example: public static void arrayOutOfBoundsException(){ System.out.println("Array out of bounds"); } ..... public static void doingSomething(){ try { if(something[i] >= something_else); } catch (arrayOutOfBoundsException e) { System.out.println("Method Halted!, continuing doing the next thing"); } } If this is possible how will it be the correct way to call the catch method? If this is not possible, could anyone point me in the right direction, of how to stop an exception from halting my program execution in Java without having to create any new classes in the package, or fixing the code that produces ArrayOutOfBoundsException error. Thanks in Advance, A Java Rookie

    Read the article

  • error with Security Exception

    - by Alexander
    I am getting the following error on my page: Security Exception Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file. The problem is with the following code SmtpClient mailClient = new SmtpClient("smtp.gmail.com", 587); What's weird is that when testing it at my localhost, everything works fine, but when I put it on my 1and1 web host it generates the error above. I contacted their support and here's their answer. We do check the error logs and the operation require a FullTrust environment which currently fall under restriction on .NET Framewor k What should I do?

    Read the article

  • gdi+ removable device IO Safe problem

    - by sxingfeng
    I am using gdi+ for image format checking. It is really surprising that gdi+ Image img(path); does not throw exception when a device is removed. for example, I am checking a list of image files on a removable device. I plug the disk off, Then My Application will crashed. How can I avoid such problem? Many Thanks! I am using c++ gdi+ windows ,many thanks.

    Read the article

  • Outlook MAPI session exception when outlook interface is closed

    - by michele
    I'm developing a email sender that retrieve data from a database, build up a MailItem with the Outlook Interop and send it. My email sender is running by a windows service that is notified everytime there's some data to send. I'm logging on the MAPI session of Outlook without problem and everything seems to work. But... when someone open Outlook interface and then close, my service crash at the first attempt i call a SendAndReceive method, with an exception that report that the session is assigned to another thread. I'm googling around for hours and i'm listening to the application_quit event, raised by the interface closing, trying to logoff and logon again to the application...but i'm still falling in the same error. Where am i wrong?Any suggestion? Thank you in advance

    Read the article

  • Exceptions in constructors

    - by FredOverflow
    In C++, the lifetime of an object begins when the constructor finishes successfully. Inside the constructor, the object does not exist yet. Q: What does emitting an exception from a constructor mean? A: It means that construction has failed, the object never existed, its lifetime never began. [source] My question is: Does the same hold true for Java? What happens, for example, if I hand this to another object, and then my constructor fails? Foo() { Bar.remember(this); throw new IllegalStateException(); } Is this well-defined? Does Bar now have a reference to a non-object?

    Read the article

  • "Could not load file or assembly 'XXX.YYY' or one of its dependencies. The system cannot find the file specified."

    - by Niall Collins
    I have a .net visual studio solution with a number of projects (class libraries and a web application). I did some refractoring which moved files between projects, created new projects, deleted ones not being used and renamed some existing projects. The solution builds without an issue but when I run the web application, the following exception occurs: "Could not load file or assembly 'XXX.YYY' or one of its dependencies. The system cannot find the file specified." The project called XXX.YYY which was deleted in the refractoring outputed a dll called XXX.YYY. But this isnt used anywhere in the application. I deleted the web applications obj directory and bin folder and rebuild but it still occurs. Anyone have any ideas when this might be occurring, any tips??

    Read the article

  • Getting empty result within PHP when in browser I get the JSON exception

    - by Pentium10
    I have this code: $url="https://graph.facebook.com/me/friends?access_token=".$access_token."&fields=id,first_name,last_name&limit=10"; $content=file_get_contents($url); Whenever I use this on a non authenticated user I should get feedback of OAuthException, which doesn't show up in the PHP the $content is empty. While if I copy the URL to the browser I get the result and I see the exception. I want to detect if the user is logged in and the session data is valid. What might be wrong?

    Read the article

  • .Net 3.5 Chart Controls Exception

    - by ChrisHDog
    I am using the new free .net chart controls and they appear to work fine when I run the project up in visual studio, but when hitting the same via IIS I get and exception: [HttpException (0x80004005): No http handler was found for request type 'GET'] System.Web.HttpApplication.MapIntegratedHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig, Boolean convertNativeStaticFileModule) +529 System.Web.HttpServerUtility.Execute(String path, TextWriter writer, Boolean preserveForm) +947 [HttpException (0x80004005): Error executing child request for ChartImg.axd.] System.Web.HttpServerUtility.Execute(String path, TextWriter writer, Boolean preserveForm) +4120098 System.Web.UI.DataVisualization.Charting.ChartHttpHandler.EnsureInitialized(Boolean hardCheck) +266 System.Web.UI.DataVisualization.Charting.Chart.GetImageStorageMode() +25 System.Web.UI.DataVisualization.Charting.Chart.Render(HtmlTextWriter writer) +133 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +240 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +240 System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +253 System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +87 System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +53 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +240 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +240 System.Web.UI.Page.Render(HtmlTextWriter writer) +38 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4240 Any idea what I'm doing wrong? Thanks!

    Read the article

  • Facebook connect | Django exception

    - by MMRUser
    Continue from this question. I'm getting this error when running the application Caught an exception while rendering: Tried xd_receiver in module myfirstapp.fbapp.views. Error was: 'module' object has no attribute 'xd_receiver' <script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/en_US" type="text/javascript"></script> <script type="text/javascript"> FB_RequireFeatures(["XFBML"], function() { FB.Facebook.init("{{ facebook_api_key }}", " {% url facebook_xd_receiver %} ") } ); function facebookConnect(form){ FB.Connect.requireSession(); FB.Facebook.get_sessionState().waitUntilReady( function(){ form.submit(); } ); } PS: Can somebody please tell me a good tutorial on django socialregistration (which covers all the basic steps) I'm a newbe, I tried facebook dev tutorial but that also didn't work..

    Read the article

  • Handling missing resources

    - by Domchi
    I've just found myself in situation where I needed to handle exception I'll probably never get, so out of curiosity, let's do a small poll. Do you validate the presence of resources in your programs? I mean, those resources which are installed with your program, like icons, images and similar. Generally, if those are missing, either your install didn't do its job, or the user randomly deleted files in your app. If you do validate the presence, what do you do when the files are not there? Of course, for web apps, you'll have nice 404 page or broken link, but what about the rest? Fail early, yes, but leave handling failures to your compiler, or what?

    Read the article

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