Permlink Replies: 4 - Pages: 1 - Last Post: 7 Nov 25, 21:58 Last Post By: FlaviusV Threads: [ Previous | Next ]
Gagala-van-Org

Posts: 13
Registered: 6-Aug-2023
Error: Cannot get property "image" of null in sections.inc at line number 5
Posted: 4 Nov 25, 06:28
  Click to reply to this thread Reply
I just received this message while trying to create an album. I was asked to post it here:

Stack trace for jAlbum 38 using skin Tiger 7.0.2:

se.datadosen.util.ScriptException: <eval>:171 TypeError: Cannot get property "image" of null in sections.inc at line number 5
at se.datadosen.util.ScriptException.of(ScriptException.java:59)
at se.datadosen.jalbum.ast.ScriptletNode.doEval(ScriptletNode.java:99)
at se.datadosen.jalbum.ast.ASTNode.eval(ASTNode.java:50)
at se.datadosen.jalbum.ast.GroupNode.doEval(GroupNode.java:78)
at se.datadosen.jalbum.ast.IncludeNode.doEval(IncludeNode.java:89)
at se.datadosen.jalbum.ast.ASTNode.eval(ASTNode.java:50)
at se.datadosen.jalbum.ast.GroupNode.doEval(GroupNode.java:78)
at se.datadosen.jalbum.ast.EnterNode.doEval(EnterNode.java:23)
at se.datadosen.jalbum.ast.ASTNode.eval(ASTNode.java:50)
at se.datadosen.jalbum.ast.GroupNode.doEval(GroupNode.java:78)
at se.datadosen.jalbum.ast.ASTNode.eval(ASTNode.java:50)
at se.datadosen.jalbum.AST.eval(AST.java:75)
at se.datadosen.jalbum.AlbumBean.makeIndexPages(AlbumBean.java:4312)
at se.datadosen.jalbum.AlbumBean.makeAlbumForFolder(AlbumBean.java:1976)
at se.datadosen.jalbum.AlbumBean.makeAlbum(AlbumBean.java:3791)
at se.datadosen.jalbum.AlbumBean.smartMakeAlbum(AlbumBean.java:3627)
at se.datadosen.jalbum.MakeAlbumTask.doInBackground(MakeAlbumTask.java:185)
at se.datadosen.jalbum.TaskManager$BackgroundTask.call(TaskManager.java:113)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: javax.script.ScriptException: TypeError: Cannot get property "image" of null in <eval> at line number 171
at org.openjdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(NashornScriptEngine.java:436)
at org.openjdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:420)
at org.openjdk.nashorn.api.scripting.NashornScriptEngine$1.eval(NashornScriptEngine.java:476)
at java.scripting/javax.script.CompiledScript.eval(Unknown Source)
at se.datadosen.jalbum.ast.ScriptletNode.doEval(ScriptletNode.java:67)
... 20 more
Caused by: <eval>:171 TypeError: Cannot get property "image" of null
at org.openjdk.nashorn.internal.runtime.ECMAErrors.error(ECMAErrors.java:57)
at org.openjdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:212)
at org.openjdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:184)
at org.openjdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:171)
at org.openjdk.nashorn.internal.runtime.linker.NashornBottomLinker.linkNull(NashornBottomLinker.java:258)
at org.openjdk.nashorn.internal.runtime.linker.NashornBottomLinker.getGuardedInvocation(NashornBottomLinker.java:69)
at jdk.dynalink/jdk.dynalink.linker.support.CompositeGuardingDynamicLinker.getGuardedInvocation(Unknown Source)
at jdk.dynalink/jdk.dynalink.LinkerServicesImpl.lambda$getGuardedInvocation$0(Unknown Source)
at jdk.dynalink/jdk.dynalink.LinkerServicesImpl.getWithLookupInternal(Unknown Source)
at jdk.dynalink/jdk.dynalink.LinkerServicesImpl.getGuardedInvocation(Unknown Source)
at jdk.dynalink/jdk.dynalink.DynamicLinker.relink(Unknown Source)
at org.openjdk.nashorn.internal.scripts.Script$146$\^eval\_.:program(<eval>:171)
at org.openjdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:646)
at org.openjdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:506)
at org.openjdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:519)
at org.openjdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:415)
... 23 more

Laza

Posts: 1,594
Registered: 6-Sep-2005
Re: Error: Cannot get property "image" of null in sections.inc at line number 5
Posted: 4 Nov 25, 08:15   in response to: Gagala-van-Org in response to: Gagala-van-Org
  Click to reply to this thread Reply
It's likely caused by an error in the skin when it attempts to retrieve mosaic images for an empty folder. I will fix this soon. In the meantime, you can hide that folder or disable the mosaic images functionality.
FlaviusV

Posts: 2
Registered: 1-Nov-2021
Re: Error: Cannot get property "image" of null in sections.inc at line number 5
Posted: 6 Nov 25, 17:28   in response to: Laza in response to: Laza
  Click to reply to this thread Reply
I face also problems with a project. It contains only links (webloc) to other existing album locations.
Addendum: Creating the album only works if there is no folder mentioned at all. Any folder included: Crash!
It's incredibly slow in "preprocessing" and creating index dialog box and finally ends with the following error or or even freezes jalbum entirely:

Stack trace for jAlbum 37.5.6 using skin Tiger 7.0.2:

se.datadosen.util.ScriptException: <eval>:171 TypeError: Cannot get property "image" of null in sections.inc at line number 6
at se.datadosen.util.ScriptException.of(ScriptException.java:59)
at se.datadosen.jalbum.ast.ScriptletNode.doEval(ScriptletNode.java:99)
at se.datadosen.jalbum.ast.ASTNode.eval(ASTNode.java:50)
at se.datadosen.jalbum.ast.GroupNode.doEval(GroupNode.java:78)
at se.datadosen.jalbum.ast.IncludeNode.doEval(IncludeNode.java:89)
at se.datadosen.jalbum.ast.ASTNode.eval(ASTNode.java:50)
at se.datadosen.jalbum.ast.GroupNode.doEval(GroupNode.java:78)
at se.datadosen.jalbum.ast.EnterNode.doEval(EnterNode.java:23)
at se.datadosen.jalbum.ast.ASTNode.eval(ASTNode.java:50)
at se.datadosen.jalbum.ast.GroupNode.doEval(GroupNode.java:78)
at se.datadosen.jalbum.ast.ASTNode.eval(ASTNode.java:50)
at se.datadosen.jalbum.AST.eval(AST.java:75)
at se.datadosen.jalbum.AlbumBean.makeIndexPages(AlbumBean.java:4219)
at se.datadosen.jalbum.AlbumBean.makeAlbumForFolder(AlbumBean.java:1916)
at se.datadosen.jalbum.AlbumBean.makeAlbumForFolder(AlbumBean.java:2108)
at se.datadosen.jalbum.AlbumBean.makeAlbumForFolder(AlbumBean.java:2108)
at se.datadosen.jalbum.AlbumBean.makeAlbum(AlbumBean.java:3736)
at se.datadosen.jalbum.AlbumBean.smartMakeAlbum(AlbumBean.java:3572)
at se.datadosen.jalbum.JAlbumFrame$7.run(JAlbumFrame.java:1190)
Caused by: javax.script.ScriptException: TypeError: Cannot get property "image" of null in <eval> at line number 171
at org.openjdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(NashornScriptEngine.java:436)
at org.openjdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:420)
at org.openjdk.nashorn.api.scripting.NashornScriptEngine$1.eval(NashornScriptEngine.java:476)
at java.scripting/javax.script.CompiledScript.eval(Unknown Source)
at se.datadosen.jalbum.ast.ScriptletNode.doEval(ScriptletNode.java:67)
... 17 more
Caused by: <eval>:171 TypeError: Cannot get property "image" of null
at org.openjdk.nashorn.internal.runtime.ECMAErrors.error(ECMAErrors.java:57)
at org.openjdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:212)
at org.openjdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:184)
at org.openjdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:171)
at org.openjdk.nashorn.internal.runtime.linker.NashornBottomLinker.linkNull(NashornBottomLinker.java:258)
at org.openjdk.nashorn.internal.runtime.linker.NashornBottomLinker.getGuardedInvocation(NashornBottomLinker.java:69)
at jdk.dynalink/jdk.dynalink.linker.support.CompositeGuardingDynamicLinker.getGuardedInvocation(Unknown Source)
at jdk.dynalink/jdk.dynalink.LinkerServicesImpl.lambda$getGuardedInvocation$0(Unknown Source)
at jdk.dynalink/jdk.dynalink.LinkerServicesImpl.getWithLookupInternal(Unknown Source)
at jdk.dynalink/jdk.dynalink.LinkerServicesImpl.getGuardedInvocation(Unknown Source)
at jdk.dynalink/jdk.dynalink.DynamicLinker.relink(Unknown Source)
at org.openjdk.nashorn.internal.scripts.Script$148$\^eval\_.:program(<eval>:171)
at org.openjdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:646)
at org.openjdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:506)
at org.openjdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:519)
at org.openjdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:415)
... 20 more

Edited by: $1263512 on 6 Nov 2025, 17:35

Laza

Posts: 1,594
Registered: 6-Sep-2005
Re: Error: Cannot get property "image" of null in sections.inc at line number 5
Posted: 6 Nov 25, 17:55   in response to: Gagala-van-Org in response to: Gagala-van-Org
  Click to reply to this thread Reply
I have fixed this error in version 7.0.3.

The slowness might be caused by the Places view, which relies on a web service that doesn't always respond. David is fixing this.

Additionally, when creating a Date or Places view for the first time, it can take a significant amount of time, as all days and places require a folder thumbnail and hero image to be generated.
FlaviusV

Posts: 2
Registered: 1-Nov-2021
Re: Error: Cannot get property "image" of null in sections.inc at line number 5
Posted: 7 Nov 25, 21:58   in response to: Laza in response to: Laza
  Click to reply to this thread Reply
Great! It works. Many thanks for the quick fix. Only if the target site of the weblocation element doesn't exist. jAlbum more or less freezes. But you mentioned that this issue is taken care of. Great product, great team!
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums