We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Application crashed when adding image through HTML fragment using Aspose.PDF (Java)

Hello,

when adding image throught HtmlFragment, Aspose Java crashes on getDocument().save()

Here is a Html sample on which it crashes (try it on firefox, there is a picture):

Here is the stacktrace:
Daemon Thread [http-nio-8070-exec-8] (Suspended)
owns: ActionContext (id=21606)
owns: NioEndpoint$NioSocketWrapper (id=21607)
waiting for: Object (id=21605)
Object.wait(long) line: not available [native method]
Object.wait() line: 502
l0t(l3k).lI(int, boolean) line: not available
l0t(l3k).ck_() line: not available
Document$lt(lh).lI(boolean) line: not available
Document$lt(lk).dispose() line: not available
HTMLDocument(Document).navigate(Document$lj) line: not available
HTMLDocument(Document).(lj, Document$lI) line: not available
HTMLDocument.(RequestMessage, Configuration, byte) line: not available
HTMLDocument.(Stream, String, Configuration) line: not available
l6y.lI(Stream, IDocument, HtmlLoadOptions, IGenericList, String, Matrix) line: not available
HtmlFragment.lI(Page, double, double, double, IGenericList, Matrix) line: not available
HtmlFragment(FormattedFragment).lI(double[], double[], boolean, double, double, l0t, l0t, int[], Page, MarginInfo, Table, double[], boolean, boolean) line: not available
l11f.lI(boolean) line: not available
l11f.le() line: not available
FloatingBox.lI(double[], double, MarginInfo, double[], double[], Page, l0t, double, double, double, boolean[], double[], boolean) line: not available
FloatingBox.lI(double[], double[], double, double, MarginInfo, Page, double, l0t, boolean) line: not available
l11f.lI(boolean) line: not available
l11f.le() line: not available
Page.lf(Page) line: not available
Page.lc() line: not available
Document(ADocument).processParagraphs() line: not available
Document.processParagraphs() line: not available
Document(ADocument).lf(Stream, SaveOptions) line: not available
Document(ADocument).saveInternal(Stream) line: not available
Document.saveInternal(Stream) line: not available
ADocument$3.lI(Stream) line: not available
ADocument$3(lf).lf() line: not available
lj.lI(lf) line: not available
Document(ADocument).save(OutputStream) line: not available
Document.save(OutputStream) line: not available
InterviewPrinter.run() line: 409
InterviewPrinter.printReport(IEntity, User) line: 84
JSEvalInterview.jsFunction_getPDF(Object) line: 566
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: 62
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43
Method.invoke(Object, Object…) line: 498
MemberBox.invoke(Object, Object[]) line: 161
FunctionObject.call(Context, Scriptable, Scriptable, Object[]) line: 476
OptRuntime.call1(Callable, Scriptable, Object, Context, Scriptable) line: 66
operationScript_ca2iEvalInterviewEmplRequest_PrintInterview_2c9e83b6598355720159835a1d8e4978_110._c_script_0(operationScript_ca2iEvalInterviewEmplRequest_PrintInterview_2c9e83b6598355720159835a1d8e4978_110, Context, Scriptable, Scriptable, Object[]) line: 1
operationScript_ca2iEvalInterviewEmplRequest_PrintInterview_2c9e83b6598355720159835a1d8e4978_110.call(Context, Scriptable, Scriptable, Object[]) line: not available
ScriptingEvaluator$1(ContextFactory).doTopCall(Callable, Context, Scriptable, Scriptable, Object[]) line: 426
ScriptRuntime.doTopCall(Callable, Context, Scriptable, Scriptable, Object[]) line: 3186
operationScript_ca2iEvalInterviewEmplRequest_PrintInterview_2c9e83b6598355720159835a1d8e4978_110.call(Context, Scriptable, Scriptable, Object[]) line: not available
operationScript_ca2iEvalInterviewEmplRequest_PrintInterview_2c9e83b6598355720159835a1d8e4978_110.exec(Context, Scriptable) line: not available
ScriptingEvaluator.eval(Script, Scriptable, boolean) line: 314
ScriptingEvaluator.eval(Script, Scriptable) line: 262
ScriptingEvaluator.eval(Script) line: 254
OperationContext.executeJavaScriptStep(Registry, IOperation, Script, Object, Object) line: 409
OperationContext.execute(Registry, IApplication, IOperation, Object, Object, boolean) line: 296
RegularRegistry(Registry).executeOperation(IApplication, IOperation, Object, Object, boolean) line: 816
ActionContext.internalExecute(IRegistry) line: 1028
ActionContext.execute(IRegistry, String) line: 795
ActionContext.execute(IRegistry) line: 699
ActionServlet.processNewContext(HttpServletRequest, HttpServletResponse, IRegistry, IParameters, IPage, IEntry, IApplication, IAction, String, IActionContext) line: 2814
ActionServlet.processOperation(HttpServletRequest, HttpServletResponse, IRegistry, IParameters, boolean, boolean, String, IPage, IEntry) line: 1752
ActionServlet.processRequest(HttpServletRequest, HttpServletResponse, IRegistry, IParameters, boolean) line: 673
ActionServlet.process(HttpServletRequest, HttpServletResponse, boolean) line: 276
ActionServlet.doGet(HttpServletRequest, HttpServletResponse) line: 187
ActionServlet(HttpServlet).service(HttpServletRequest, HttpServletResponse) line: 635
ActionServlet(HttpServlet).service(ServletRequest, ServletResponse) line: 742
ServletChain.doFilter(ServletRequest, ServletResponse) line: 72
UserActionLogFilter.doFilter(ServletRequest, ServletResponse, FilterChain) line: 76
ServletChain.doFilter(ServletRequest, ServletResponse) line: 59
IAActionPredictionFilter.doFilter(ServletRequest, ServletResponse, FilterChain) line: 68
ServletChain.doFilter(ServletRequest, ServletResponse) line: 59
GZIPDynamicFilter.doFilter(ServletRequest, ServletResponse, FilterChain) line: 33
ServletChain.doFilter(ServletRequest, ServletResponse) line: 59
LoggingFilter.doFilter(ServletRequest, ServletResponse, FilterChain) line: 51
ServletChain.doFilter(ServletRequest, ServletResponse) line: 59
FilterListChain.doFilter(ServletRequest, ServletResponse) line: 59
TimeCheckFilter.doFilter(ServletRequest, ServletResponse, FilterChain) line: 36
FilterListChain.doFilter(ServletRequest, ServletResponse) line: 53
RequestProcessor.process(ServletRequest, ServletResponse, FilterChain) line: 484
DysowebServlet.service(ServletRequest, ServletResponse) line: 93
ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) line: 231
ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 166
WsFilter.doFilter(ServletRequest, ServletResponse, FilterChain) line: 52
ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) line: 193
ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 166
StandardWrapperValve.invoke(Request, Response) line: 198
StandardContextValve.invoke(Request, Response) line: 96
NonLoginAuthenticator(AuthenticatorBase).invoke(Request, Response) line: 478
StandardHostValve.invoke(Request, Response) line: 140
ErrorReportValve.invoke(Request, Response) line: 80
AccessLogValve(AbstractAccessLogValve).invoke(Request, Response) line: 624
StandardEngineValve.invoke(Request, Response) line: 87
CoyoteAdapter.service(Request, Response) line: 342
Http11Processor.service(SocketWrapperBase<?>) line: 799
Http11Processor(AbstractProcessorLight).process(SocketWrapperBase<?>, SocketEvent) line: 66
AbstractProtocol$ConnectionHandler.process(SocketWrapperBase, SocketEvent) line: 861
NioEndpoint$SocketProcessor.doRun() line: 1455
NioEndpoint$SocketProcessor(SocketProcessorBase).run() line: 49
ThreadPoolExecutor(ThreadPoolExecutor).runWorker(ThreadPoolExecutor$Worker) line: 1149
ThreadPoolExecutor$Worker.run() line: 624
TaskThread$WrappingRunnable.run() line: 61
TaskThread(Thread).run() line: 748

Any help ?

Thanks

@afabreguettes,

Can you please share source files along with complete sample code so that we may further investigate to help you out.