|
| | |||||||
| Tablet PC Developers Show off your work while discussing with others how to create ink enabled applications. |
| | LinkBack | Thread Tools |
| |||
| problem with save method Hi All, I am getting "E_OUTOFMEMORY", while calling "Save" method of "IInkDisp". This occured only if we annotate ink in large scale. Anyone faced similar problem? Please let me know if you have any workaround. I have checked my VC++ code for memory leaks. Thanks in advance. |
| |||
| Re: problem with save method On Jun 12, 3:06 pm, rah <rahulnparad...******.com> wrote: > Hi All, > I am getting "E_OUTOFMEMORY", while calling "Save" method of > "IInkDisp". This occured only if we annotate ink in large scale. > Anyone faced similar problem? Please let me know if you have any > workaround. > I have checked my VC++ code for memory leaks. > Thanks in advance. Anyone faced same issues? |
| |||
| Re: problem with save method Hi rah, can you provide some more details? 1) Is this on XP or Vista? 2) how much ink do you have in your Ink object? (does it matter?) 3) how large is your scale to produce the error? 4) are you using the ViewTransform or the ObjectTransform to scale the ink? Thanks, Stefan Wick "rah" wrote: > On Jun 12, 3:06 pm, rah <rahulnparad...******.com> wrote: > > Hi All, > > I am getting "E_OUTOFMEMORY", while calling "Save" method of > > "IInkDisp". This occured only if we annotate ink in large scale. > > Anyone faced similar problem? Please let me know if you have any > > workaround. > > I have checked my VC++ code for memory leaks. > > Thanks in advance. > > Anyone faced same issues? > > |
| |||
| Re: problem with save method On Jun 13, 6:56 pm, Stefan Wick[MS] <StefanWic...@discussions.microsoft.com> wrote: > Hi rah, > > can you provide some more details? > > 1) Is this on XP or Vista? > 2) how much ink do you have in your Ink object? (does it matter?) > 3) how large is your scale to produce the error? > 4) are you using the ViewTransform or the ObjectTransform to scale the ink? > > Thanks, > Stefan Wick > > > > "rah" wrote: > > On Jun 12, 3:06 pm, rah <rahulnparad...******.com> wrote: > > > Hi All, > > > I am getting "E_OUTOFMEMORY", while calling "Save" method of > > > "IInkDisp". This occured only if we annotate ink in large scale. > > > Anyone faced similar problem? Please let me know if you have any > > > workaround. > > > I have checked my VC++ code for memory leaks. > > > Thanks in advance. > > > Anyone faced same issues?- Hide quoted text - > > - Show quoted text - Hi Stefen, thanks for reply I am developing an acticeX control, using VC++. 1) This control is deployed on XP with SP2, with IE6 and IE7. 2,3) I am annotating ink on image (using InkOverlay object), I can ink on half of the image (I mean I can paint almost half image) without an error. But, not able to find out the exact amount of ink, which can safely annotated. 4) I am not using the ViewTransform or the ObjectTransform to scale the ink. here is code snippet - //declaration IInkDisp *ptrtoinkdispobj; .... //collect the stroke .... //save the ink hrstatus = ptrtoinkdispobj- >Save(IPF_GIF,IPCM_MaximumCompression,&varsaveink) ; Here, I get error 0x8007000e - Not enough storage to complete this operation. I.e. "E_OUTOFMEMORY - Cannot allocate byte array" - as mentioned in Tablet PC SDK help. I think "Save" method is failing to allocate memory for its output parameter "varsaveink", because it might not be able to find enough space in machine's memory as we are inking on large scale (amount). Do you think same? Or is there any other problem? Please advice. |
| |||
| Re: problem with save method On Jun 13, 6:56 pm, Stefan Wick[MS] <StefanWic...@discussions.microsoft.com> wrote: > Hi rah, > > can you provide some more details? > > 1) Is this on XP or Vista? > 2) how much ink do you have in your Ink object? (does it matter?) > 3) how large is your scale to produce the error? > 4) are you using the ViewTransform or the ObjectTransform to scale the ink? > > Thanks, > Stefan Wick > > > > "rah" wrote: > > On Jun 12, 3:06 pm, rah <rahulnparad...******.com> wrote: > > > Hi All, > > > I am getting "E_OUTOFMEMORY", while calling "Save" method of > > > "IInkDisp". This occured only if we annotate ink in large scale. > > > Anyone faced similar problem? Please let me know if you have any > > > workaround. > > > I have checked my VC++ code for memory leaks. > > > Thanks in advance. > > > Anyone faced same issues?- Hide quoted text - > > - Show quoted text - Hi Stefen, thanks for reply I am developing an acticeX control, using VC++. 1) This control is deployed on XP with SP2, with IE6 and IE7. 2,3) I am annotating ink on image (using InkOverlay object), I can ink on half of the image (I mean I can paint almost half image) without an error. But, not able to find out the exact amount of ink, which can safely annotated. 4) I am not using the ViewTransform or the ObjectTransform to scale the ink. here is code snippet - //declaration IInkDisp *ptrtoinkdispobj; .... //collect the stroke .... //save the ink hrstatus = ptrtoinkdispobj- >Save(IPF_GIF,IPCM_MaximumCompression,&varsaveink) ; Here, I get error 0x8007000e - Not enough storage to complete this operation. I.e. "E_OUTOFMEMORY - Cannot allocate byte array" - as mentioned in Tablet PC SDK help. I think "Save" method is failing to allocate memory for its output parameter "varsaveink", because it might not be able to find enough space in machine's memory as we are inking on large scale (amount). Do you think same? Or is there any other problem? Please advice. -Rahul |
| |||
| Re: problem with save method Hi Rahul, can you clarify what you mean by "we are inking on large scale"? Are you inking very long, very thick or very many strokes? Thanks, Stefan Wick "rahul" <rahulnparadkar******.com> wrote in message news:1181744821.472893.46240@i38g2000prf.googlegro ups.com... > On Jun 13, 6:56 pm, Stefan Wick[MS] > <StefanWic...@discussions.microsoft.com> wrote: >> Hi rah, >> >> can you provide some more details? >> >> 1) Is this on XP or Vista? >> 2) how much ink do you have in your Ink object? (does it matter?) >> 3) how large is your scale to produce the error? >> 4) are you using the ViewTransform or the ObjectTransform to scale the >> ink? >> >> Thanks, >> Stefan Wick >> >> >> >> "rah" wrote: >> > On Jun 12, 3:06 pm, rah <rahulnparad...******.com> wrote: >> > > Hi All, >> > > I am getting "E_OUTOFMEMORY", while calling "Save" method of >> > > "IInkDisp". This occured only if we annotate ink in large scale. >> > > Anyone faced similar problem? Please let me know if you have any >> > > workaround. >> > > I have checked my VC++ code for memory leaks. >> > > Thanks in advance. >> >> > Anyone faced same issues?- Hide quoted text - >> >> - Show quoted text - > > Hi Stefen, > thanks for reply > > I am developing an acticeX control, using VC++. > 1) This control is deployed on XP with SP2, with IE6 and IE7. > 2,3) I am annotating ink on image (using InkOverlay object), I can ink > on half of the image (I mean I can paint almost half image) without an > error. But, not able to find out the exact amount of ink, which can > safely annotated. > 4) I am not using the ViewTransform or the ObjectTransform to scale > the ink. > > here is code snippet - > //declaration > IInkDisp *ptrtoinkdispobj; > ... > //collect the stroke > ... > //save the ink > hrstatus = ptrtoinkdispobj- >>Save(IPF_GIF,IPCM_MaximumCompression,&varsaveink ); > > Here, I get error 0x8007000e - Not enough storage to complete this > operation. > I.e. "E_OUTOFMEMORY - Cannot allocate byte array" - as mentioned in > Tablet PC SDK help. > > I think "Save" method is failing to allocate memory for its output > parameter "varsaveink", because it might not be able to find enough > space in machine's memory as we are inking on large scale (amount). > > Do you think same? Or is there any other problem? Please advice. > -Rahul > |
| |||
| Re: problem with save method On Jun 14, 9:40 am, "Stefan Wick[MS]" <s...@online.microsoft.com> wrote: > Hi Rahul, > > can you clarify what you mean by "we are inking on large scale"? > > Are you inking very long, very thick or very many strokes? > > Thanks, > Stefan Wick > > "rahul" <rahulnparad...******.com> wrote in message > > news:1181744821.472893.46240@i38g2000prf.googlegro ups.com... > > > > > On Jun 13, 6:56 pm, Stefan Wick[MS] > > <StefanWic...@discussions.microsoft.com> wrote: > >> Hi rah, > > >> can you provide some more details? > > >> 1) Is this on XP or Vista? > >> 2) how much ink do you have in your Ink object? (does it matter?) > >> 3) how large is your scale to produce the error? > >> 4) are you using the ViewTransform or the ObjectTransform to scale the > >> ink? > > >> Thanks, > >> Stefan Wick > > >> "rah" wrote: > >> > On Jun 12, 3:06 pm, rah <rahulnparad...******.com> wrote: > >> > > Hi All, > >> > > I am getting "E_OUTOFMEMORY", while calling "Save" method of > >> > > "IInkDisp". This occured only if we annotate ink in large scale. > >> > > Anyone faced similar problem? Please let me know if you have any > >> > > workaround. > >> > > I have checked my VC++ code for memory leaks. > >> > > Thanks in advance. > > >> > Anyone faced same issues?- Hide quoted text - > > >> - Show quoted text - > > > Hi Stefen, > > thanks for reply > > > I am developing an acticeX control, using VC++. > > 1) This control is deployed on XP with SP2, with IE6 and IE7. > > 2,3) I am annotating ink on image (using InkOverlay object), I can ink > > on half of the image (I mean I can paint almost half image) without an > > error. But, not able to find out the exact amount of ink, which can > > safely annotated. > > 4) I am not using the ViewTransform or the ObjectTransform to scale > > the ink. > > > here is code snippet - > > //declaration > > IInkDisp *ptrtoinkdispobj; > > ... > > //collect the stroke > > ... > > //save the ink > > hrstatus = ptrtoinkdispobj- > >>Save(IPF_GIF,IPCM_MaximumCompression,&varsaveink ); > > > Here, I get error 0x8007000e - Not enough storage to complete this > > operation. > > I.e. "E_OUTOFMEMORY - Cannot allocate byte array" - as mentioned in > > Tablet PC SDK help. > > > I think "Save" method is failing to allocate memory for its output > > parameter "varsaveink", because it might not be able to find enough > > space in machine's memory as we are inking on large scale (amount). > > > Do you think same? Or is there any other problem? Please advice. > > -Rahul- Hide quoted text - > > - Show quoted text - Hi Stefen, sorry for confusion. Here I am inking very long and very many strokes. Thanks, Rahul |
| |||
| Re: problem with save method Hi Stefen, Sorry for confusion. I am inking very long as well as I have many strokes. Ink Width is 10. Also, If strokes are crossing control's boundary, then I am clipping such strokes, this increases total number of strokes on InkOverlay. Thanks, Rahul Stefan Wick[MS] wrote: > Hi Rahul, > > can you clarify what you mean by "we are inking on large scale"? > > Are you inking very long, very thick or very many strokes? > > Thanks, > Stefan Wick > > "rahul" <rahulnparadkar******.com> wrote in message > news:1181744821.472893.46240@i38g2000prf.googlegro ups.com... > > On Jun 13, 6:56 pm, Stefan Wick[MS] > > <StefanWic...@discussions.microsoft.com> wrote: > >> Hi rah, > >> > >> can you provide some more details? > >> > >> 1) Is this on XP or Vista? > >> 2) how much ink do you have in your Ink object? (does it matter?) > >> 3) how large is your scale to produce the error? > >> 4) are you using the ViewTransform or the ObjectTransform to scale the > >> ink? > >> > >> Thanks, > >> Stefan Wick > >> > >> > >> > >> "rah" wrote: > >> > On Jun 12, 3:06 pm, rah <rahulnparad...******.com> wrote: > >> > > Hi All, > >> > > I am getting "E_OUTOFMEMORY", while calling "Save" method of > >> > > "IInkDisp". This occured only if we annotate ink in large scale. > >> > > Anyone faced similar problem? Please let me know if you have any > >> > > workaround. > >> > > I have checked my VC++ code for memory leaks. > >> > > Thanks in advance. > >> > >> > Anyone faced same issues?- Hide quoted text - > >> > >> - Show quoted text - > > > > Hi Stefen, > > thanks for reply > > > > I am developing an acticeX control, using VC++. > > 1) This control is deployed on XP with SP2, with IE6 and IE7. > > 2,3) I am annotating ink on image (using InkOverlay object), I can ink > > on half of the image (I mean I can paint almost half image) without an > > error. But, not able to find out the exact amount of ink, which can > > safely annotated. > > 4) I am not using the ViewTransform or the ObjectTransform to scale > > the ink. > > > > here is code snippet - > > //declaration > > IInkDisp *ptrtoinkdispobj; > > ... > > //collect the stroke > > ... > > //save the ink > > hrstatus = ptrtoinkdispobj- > >>Save(IPF_GIF,IPCM_MaximumCompression,&varsaveink ); > > > > Here, I get error 0x8007000e - Not enough storage to complete this > > operation. > > I.e. "E_OUTOFMEMORY - Cannot allocate byte array" - as mentioned in > > Tablet PC SDK help. > > > > I think "Save" method is failing to allocate memory for its output > > parameter "varsaveink", because it might not be able to find enough > > space in machine's memory as we are inking on large scale (amount). > > > > Do you think same? Or is there any other problem? Please advice. > > -Rahul > > |
| |||
| Re: problem with save method Hi Rahul, I am unable to reproduce the problem on my machine so far. I must be still missing some detail. Is there anything else special that your code does that might contribute to this problem? For example: Are you using ExtendedProperties on the ink? Have you implemented your own undo/redo stack for inking? etc. Thanks, Stefan Wick |
| |||
| Re: problem with save method Hi Stefan, (sorry to misspell you name in previous posts) I will try to give you detail working of control here. Facts - I am using - XP with SP2, IE6, IE7, Tablet PC SDK 1.7. Its a VC++ windowed activeX control, used in web base application. (we are upgrading from VB control to VC++ control - We dont face such problem in VB) Working - We collect the stroke, here if stroke is crossing left or top boundary of control, we delete the part of stroke which lies out of controls boundary (Using Clip method), when user wish to save data, we encrypt data (output parameter of save method) using Base64 encoding and send to web application. to save ink - hrstatus = ptrtoinkdispobj- >Save(IPF_GIF,IPCM_MaximumCompression,&varsaveink) ; Again when web page having control on it is initialise it get image file and ink data in encoded format. to load ink - hrstatus = ptrtoinkdispobj->Load(varinktoset); Apart from this we provide two options - Clear Ink - Delete all strokes - hrstatus = ptrtoinkdispobj- >DeleteStrokes(0); Erase Ink - Erase part of stroke as user use pen with inverted tip. To achieve this we using event NewPackets, OnMouseMove and APIs like HitTestCircle, DeleteStrokes, get_PolylineCusps, NearestPoint, Split etc. Also, we create composite image (save ink on image) using composite ink utility. Composite command - composite -compose over -geometry +$xpixel+$ypixel $inkfile $fileback $out We do save all ink co-ordiantes in vector, so that we can find minimum X, Y co-ordinates and send to composite command. As and when we add and delete stroke, I am updating this vector. I hope this information is quite helpful. Observation - Thoughts My observation is when I open too many application on my PC, and then try my application, I can ink less stroke than If there is no other application opened on machine. So I think this is an issue with the resource available. But, I am able to reproduce it on 2-3 machines. As Save method is failing, with error E_OUTOFMEMORY - Cannot allocate byte array, I think, save method is not able to allocate memory for its output variable from heap/machine' memory. (So this is depend on memory available on machine. If this is case how can we overcome it? ) Let me know your thoughts on this. Stefan Wick [ MS ] wrote: > Hi Rahul, > > I am unable to reproduce the problem on my machine so far. I must be still > missing some detail. > > Is there anything else special that your code does that might contribute to > this problem? For example: Are you using ExtendedProperties on the ink? Have > you implemented your own undo/redo stack for inking? etc. > > Thanks, > Stefan Wick |
| |||
| Re: problem with save method Hi Rahul, I am still not able to reproduce the problem on my machine. Can you try to narrow it down on your side a bit more - maybe by creating a simplified app that exposes the problem? A few more questions: 1) What is WorkingSet/VMSize of your process before you call Save()? 2) How much memory does your computer have installed? 3) Does the problem also occur if you run your code in a regular app (instead of running it in the browser) Thanks, Stefan Wick Microsoft - Windows Experience |
| |||
| Re: problem with save method Hi Stefan, I was on leave for few days, so could not reply. Here are answers to your questions 1) It is 80000KB (It is mem usage shown in Task Manager). Is it same information you are asking? If no please let me know how to check WorkingSet of an application at given point of time. 2) I have 512 MB RAM installed on my machine. Total paging size for all drives: 1512 MB. 3) Yes. If I use my control in regular application, it gives such error. Hopefully I will be able to post simplified app by monday, 2nd July. Regards, Rahul Stefan Wick [ MS ] wrote: > Hi Rahul, > > I am still not able to reproduce the problem on my machine. Can you try to > narrow it down on your side a bit more - maybe by creating a simplified app > that exposes the problem? > > A few more questions: > 1) What is WorkingSet/VMSize of your process before you call Save()? > 2) How much memory does your computer have installed? > 3) Does the problem also occur if you run your code in a regular app > (instead of running it in the browser) > > Thanks, > Stefan Wick > Microsoft - Windows Experience |
| |||
| Re: problem with save method Hi Stefan, I was on leave for few days, so could not reply. Here are answers to your questions 1) It is 80000KB (It is mem usage shown in Task Manager). Is it same information you are asking? If no please let me know how to check WorkingSet of an application at given point of time. 2) I have 512 MB RAM installed on my machine. Total paging size for all drives: 1512 MB. 3) I could not use this ActiveX control in regular apps, as code to save ink (using composite command) and to support functionality(what we have in web app, or the way we use control in web app), we require Unix m/c, which is not available at my end right now. (I will try to get it done, but it might take some time.) Hopefully I will be able to post simplified app by monday, 2nd July. Regards, Rahul Stefan Wick [ MS ] wrote: > Hi Rahul, > > I am still not able to reproduce the problem on my machine. Can you try to > narrow it down on your side a bit more - maybe by creating a simplified app > that exposes the problem? > > A few more questions: > 1) What is WorkingSet/VMSize of your process before you call Save()? > 2) How much memory does your computer have installed? > 3) Does the problem also occur if you run your code in a regular app > (instead of running it in the browser) > > Thanks, > Stefan Wick > Microsoft - Windows Experience |
| |||
| Re: problem with save method Hi Stefan, I was on leave for few days, so could not reply. Here are answers to your questions 1) It is 80000KB (It is mem usage shown in Task Manager). Is it same information you are asking? If no please let me know how to check WorkingSet of an application at given point of time. 2) I have 512 MB RAM installed on my machine. Total paging size for all drives: 1512 MB. 3) I could not use this ActiveX control in regular apps, as code to save ink (using composite command) and to support functionality(what we have in web app, or the way we use control in web app), we require Unix m/c, which is not available at my end right now. (I will try to get it done, but it might take some time.) Hopefully I will be able to post simplified app by monday, 2nd July. Regards, Rahul Stefan Wick [ MS ] wrote: > Hi Rahul, > > I am still not able to reproduce the problem on my machine. Can you try to > narrow it down on your side a bit more - maybe by creating a simplified app > that exposes the problem? > > A few more questions: > 1) What is WorkingSet/VMSize of your process before you call Save()? > 2) How much memory does your computer have installed? > 3) Does the problem also occur if you run your code in a regular app > (instead of running it in the browser) > > Thanks, > Stefan Wick > Microsoft - Windows Experience |
| |||
| Re: problem with save method On Jun 29, 5:14 pm, rahul <rahulnparad...******.com> wrote: > Hi Stefan, > > I was on leave for few days, so could not reply. > > Here are answers to your questions > 1) It is 80000KB (It is mem usage shown in Task Manager). Is it same > information you are asking? If no please let me know how to check > WorkingSet of an application at given point of time. > 2) I have 512 MB RAM installed on my machine. Total paging size for > all drives: 1512 MB. > 3) I could not use this ActiveX control in regular apps, as code to > save ink (using composite command) and to support functionality(what > we have in web app, or the way we use control in web app), we require > Unix m/c, which is not available at my end right now. (I will try to > get it done, but it might take some time.) > > Hopefully I will be able to post simplified app by monday, 2nd July. > > Regards, > Rahul > > Stefan Wick [ MS ] wrote: > > > > > Hi Rahul, > > > I am still not able to reproduce the problem on my machine. Can you try to > > narrow it down on your side a bit more - maybe by creating a simplified app > > that exposes the problem? > > > A few more questions: > > 1) What is WorkingSet/VMSize of your process before you call Save()? > > 2) How much memory does your computer have installed? > > 3) Does the problem also occur if you run your code in a regular app > > (instead of running it in the browser) > > > Thanks, > > Stefan Wick > > Microsoft - Windows Experience- Hide quoted text - > > - Show quoted text - Hi Stefan, Please let me know your mail id, So I can send you an application. With which you will be able to reproduce the error. I tried to mail you on stefanwickms@discussions.microsoft.com, but my mail was bounced. Thanks and regards, Rahul. |
| Bookmarks |
| Thread Tools | |
| |
| | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Problem with DeleteHierachy method in OneNote 2007 API | dyowee | Microsoft OneNote | 2 | 05-15-2008 03:50 AM |
| cannot save, save as, or modify save settings in microsoft office | scobla | Microsoft Office | 10 | 05-10-2008 06:40 PM |
| problem with "Save Target As" - wants to save mp3 as mpeg | brshooter | Internet Explorer | 4 | 12-21-2007 02:10 PM |
| MSXML 4 error: This method cannot be called after the send method. | Phil_M | Windows XP | 0 | 08-10-2007 08:40 AM |
| IImagingFactory::Problem with Draw method of IImage interface | Herojit | Smartphones | 0 | 01-05-2007 05:17 AM |
| New To Technology Questions? | Do You Need Help with Your Computer or Device? | Do You Need Help with this site? |